mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-06-28 20:39:51 +00:00
CW-827 CI/CD update (#1948)
* CI update - use existing build outputs in build_monero_all.sh - update $HOME, fix gh actions - add secrets earlier in the runtime (potentially speed up 'Build generated code' step) - add windows dockerfile - add linux/android dockerfile - update android/linux ci script * [skip slack] [run tests] Run tests on CI, fix tests * [skip slack] [run tests] force enable kvm in android * [skip slack] [run tests] remove inexisting flag * [run tests] [skip slack] update tests * add extra dependencies [skip ci] * [skip slack] [run tests] Add secrets * [skip slack] [run tests] Timeout test cases, continue on error * [skip slack] [run tests] Xvfb fix, timeout fix * [skip slack] [run tests] Start dbus to clean up the logs, use SIGKILL * [skip slack] [run tests] Enable network manager * [skip slack] [run tests] Screen record test, resize screen * [skip slack] [run tests] Improve status report for tests * [skip slack] [run tests] Increase framerate * [skip slack] [run tests] Remove test that I am unable to fix locally easily from CI * [skip slack] [run tests] Simplify ffmpeg command * [skip slack] [run tests] Increase timeout, add comment * [skip slack] Update dockerfile, migrate from mrcyjanek to cake-tech for the ghcr org * Update lib/entities/default_settings_migration.dart Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com> --------- Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
This commit is contained in:
parent
80b116b8ae
commit
3e10023e18
32 changed files with 862 additions and 554 deletions
1
scripts/windows/.gitignore
vendored
Normal file
1
scripts/windows/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
actions-runner
|
68
scripts/windows/Dockerfile.windows
Normal file
68
scripts/windows/Dockerfile.windows
Normal file
|
@ -0,0 +1,68 @@
|
|||
# Usage:
|
||||
# docker build . -f Dockerfile.windows -t ghcr.io/cake-tech/cake_wallet:main-windows
|
||||
# docker push ghcr.io/cake-tech/cake_wallet:main-windows
|
||||
|
||||
FROM mcr.microsoft.com/windows/servercore:ltsc2022
|
||||
|
||||
ENV FLUTTER_VERSION=3.24.0
|
||||
ENV GIT_VERSION=2.47.1
|
||||
ENV VS_INSTALLED_DIR="C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools"
|
||||
ENV PATH="C:\Users\ContainerAdministrator\.cargo\bin;C:\ProgramData\chocolatey\bin;C:\flutter\flutter\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Users\ContainerAdministrator\AppData\Local\Microsoft\WindowsApps"
|
||||
ENV RUNNER_VERSION=2.321.0
|
||||
ENV RUNNER_URL=https://github.com/actions/runner/releases/download/v${RUNNER_VERSION}/actions-runner-win-x64-${RUNNER_VERSION}.zip
|
||||
ENV RUNNER_WORKDIR=_work
|
||||
|
||||
RUN powershell -Command \
|
||||
curl.exe -L https://aka.ms/vs/17/release/vc_redist.x64.exe -o vc_redist.x64.exe ; \
|
||||
Start-Process -Wait -FilePath .\vc_redist.x64.exe -ArgumentList '/quiet', '/install' ; \
|
||||
Remove-Item -Force vc_redist.x64.exe
|
||||
|
||||
RUN powershell -Command \
|
||||
$GIT_VERSION = [Environment]::GetEnvironmentVariable('GIT_VERSION'); \
|
||||
curl.exe -L https://github.com/git-for-windows/git/releases/download/v$($GIT_VERSION).windows.1/Git-$($GIT_VERSION)-64-bit.exe -o git_installer.exe ; \
|
||||
Start-Process -Wait -FilePath .\git_installer.exe -ArgumentList '/SILENT', '/NOICONS' ; \
|
||||
Remove-Item -Force git_installer.exe
|
||||
|
||||
RUN powershell -NoProfile -ExecutionPolicy Bypass -Command \
|
||||
Set-ExecutionPolicy RemoteSigned -Scope Process; \
|
||||
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; \
|
||||
Invoke-WebRequest https://chocolatey.org/install.ps1 -UseBasicP -OutFile install.ps1; \
|
||||
powershell -NoProfile -ExecutionPolicy Bypass -File install.ps1; \
|
||||
Remove-Item -Force install.ps1
|
||||
|
||||
RUN choco install -y visualstudio2022community
|
||||
RUN choco install -y visualstudio2022-workload-nativedesktop
|
||||
RUN choco install -y nodejs
|
||||
RUN choco install -y go
|
||||
RUN choco install -y 7zip
|
||||
|
||||
RUN powershell -Command \
|
||||
curl.exe -L https://win.rustup.rs -o rustup-init.exe; \
|
||||
Start-Process -Wait -FilePath .\rustup-init.exe -ArgumentList "-y"; \
|
||||
Remove-Item -Force .\rustup-init.exe
|
||||
|
||||
RUN powershell -Command \
|
||||
curl.exe -L https://dist.nuget.org/win-x86-commandline/latest/nuget.exe -o C:\Windows\System32\nuget.exe
|
||||
|
||||
RUN powershell -Command \
|
||||
$FLUTTER_VERSION = [Environment]::GetEnvironmentVariable('FLUTTER_VERSION'); \
|
||||
curl.exe -L https://storage.googleapis.com/flutter_infra_release/releases/stable/windows/flutter_windows_$($FLUTTER_VERSION)-stable.zip -o flutter.zip ; \
|
||||
7z x flutter.zip -oC:\flutter -bsp1 -bse1 ; \
|
||||
Remove-Item -Force flutter.zip
|
||||
|
||||
RUN flutter precache
|
||||
|
||||
WORKDIR C:\\actions-runner
|
||||
|
||||
RUN powershell -Command \
|
||||
curl.exe -L $env:RUNNER_URL -o 'actions-runner.zip'; \
|
||||
7z x actions-runner.zip -oC:\actions-runner -bsp1 -bse1 ; \
|
||||
Remove-Item -Path 'actions-runner.zip'
|
||||
|
||||
COPY actions-runner/.credentials /actions-runner/.credentials
|
||||
COPY actions-runner/.credentials_rsaparams /actions-runner/.credentials_rsaparams
|
||||
COPY actions-runner/.runner /actions-runner/.runner
|
||||
|
||||
COPY ci_entrypoint.ps1 /actions-runner/ci_entrypoint.ps1
|
||||
|
||||
ENTRYPOINT ["powershell", "-File", "ci_entrypoint.ps1"]
|
5
scripts/windows/ci_entrypoint.ps1
Normal file
5
scripts/windows/ci_entrypoint.ps1
Normal file
|
@ -0,0 +1,5 @@
|
|||
$runnerDir = "C:\actions-runner"
|
||||
$runCmd = "$runnerDir\run.cmd"
|
||||
|
||||
Write-Host "Starting the runner..."
|
||||
& $runCmd
|
30
scripts/windows/ci_register.ps1
Normal file
30
scripts/windows/ci_register.ps1
Normal file
|
@ -0,0 +1,30 @@
|
|||
# Variables for paths and config
|
||||
$runnerDir = "C:\actions-runner"
|
||||
$configCmd = "$runnerDir\config.cmd"
|
||||
$runCmd = "$runnerDir\run.cmd"
|
||||
|
||||
# Check required environment variables
|
||||
if (-not $env:RUNNER_TOKEN) {
|
||||
Write-Error "RUNNER_TOKEN is not set. Exiting."
|
||||
exit 1
|
||||
}
|
||||
if (-not $env:RUNNER_REPO_URL) {
|
||||
Write-Error "RUNNER_REPO_URL is not set. Exiting."
|
||||
exit 1
|
||||
}
|
||||
$env:RUNNER_NAME = "windows-amd64-cake"
|
||||
$env:RUNNER_WORKDIR = "_work"
|
||||
|
||||
# Register the runner
|
||||
Write-Host "Registering the runner..."
|
||||
Write-Host "--url $env:RUNNER_REPO_URL"
|
||||
Write-Host "--token $env:RUNNER_TOKEN"
|
||||
Write-Host "--name $env:RUNNER_NAME"
|
||||
Write-Host "--work $env:RUNNER_WORKDIR"
|
||||
|
||||
& $configCmd --url $env:RUNNER_REPO_URL `
|
||||
--token $env:RUNNER_TOKEN `
|
||||
--name $env:RUNNER_NAME `
|
||||
--work $env:RUNNER_WORKDIR `
|
||||
--unattended `
|
||||
--replace
|
Loading…
Add table
Add a link
Reference in a new issue