mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-26 06:08:40 +01:00
chore: migrate to hosted scalable CI (#3620)
This commit is contained in:
@@ -4,7 +4,7 @@ on: [pull_request]
|
||||
|
||||
jobs:
|
||||
PR_test_build:
|
||||
runs-on: ubuntu-24.04
|
||||
runs-on: puzl-ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
@@ -10,7 +10,7 @@ permissions:
|
||||
|
||||
jobs:
|
||||
compare-overrides:
|
||||
runs-on: ubuntu-24.04
|
||||
runs-on: puzl-ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
@@ -5,11 +5,6 @@ permissions:
|
||||
packages: write
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [dev]
|
||||
paths-ignore:
|
||||
- "**.md"
|
||||
- "docs/**"
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
|
||||
@@ -4,7 +4,7 @@ on: [pull_request]
|
||||
|
||||
jobs:
|
||||
PR_test_build:
|
||||
runs-on: ubuntu-24.04
|
||||
runs-on: puzl-ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
@@ -4,7 +4,7 @@ on: [pull_request]
|
||||
|
||||
jobs:
|
||||
PR_test_build:
|
||||
runs-on: ubuntu-24.04
|
||||
runs-on: puzl-ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
@@ -4,7 +4,7 @@ on: [pull_request]
|
||||
|
||||
jobs:
|
||||
check_restricted_imports:
|
||||
runs-on: ubuntu-24.04
|
||||
runs-on: puzl-ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
@@ -7,6 +7,10 @@ permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
concurrency:
|
||||
group: android-${{ github.event.pull_request.number }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
# -----------------------------------------
|
||||
# PATH A: Internal PRs
|
||||
|
||||
@@ -10,43 +10,241 @@ defaults:
|
||||
run:
|
||||
shell: bash
|
||||
|
||||
env:
|
||||
CW_DOCKER_REGISTRY: ghcr.io/cake-tech/cake_wallet
|
||||
CW_DOCKER_USE_CLOUD: "true"
|
||||
|
||||
concurrency:
|
||||
group: linux-${{ github.event.pull_request.number }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
PR_test_build:
|
||||
guard:
|
||||
# Fork PRs don't have access to repository secrets, so the generated
|
||||
# lib/.secrets.g.dart would be empty and the build fails to compile.
|
||||
# Skip for forks, mirroring the Android workflow's internal-build guard.
|
||||
if: github.event.pull_request.head.repo.fork == false
|
||||
runs-on: [Linux, amd64, forlinux]
|
||||
container:
|
||||
image: ghcr.io/cake-tech/cake_wallet:debian13-flutter3.41.9-ndkr28-go1.24.1-ruststablenightly
|
||||
env:
|
||||
STORE_PASS: test@cake_wallet
|
||||
KEY_PASS: test@cake_wallet
|
||||
MONEROC_CACHE_DIR_ROOT: /opt/generic_cache
|
||||
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
|
||||
volumes:
|
||||
- /opt/cw_cache_linux/root/.cache:/root/.cache
|
||||
- /opt/cw_cache_linux/root/.ccache:/root/.ccache
|
||||
- /opt/cw_cache_linux/root/.pub-cache/:/root/.pub-cache
|
||||
- /opt/cw_cache_linux/root/go/pkg:/root/go/pkg
|
||||
- /opt/cw_cache_linux/opt/generic_cache:/opt/generic_cache
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
|
||||
runs-on: puzl-ubuntu-latest
|
||||
steps:
|
||||
- name: Fix github actions messing up $HOME...
|
||||
run: "echo HOME=/root | sudo tee -a $GITHUB_ENV"
|
||||
- run: echo "internal PR"
|
||||
|
||||
base:
|
||||
needs: guard
|
||||
runs-on: puzl-ubuntu-latest
|
||||
timeout-minutes: 360
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
if: ${{ env.ACT != 'true' }}
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||
- name: Docker sock permissions
|
||||
run: sudo chmod 666 /var/run/docker.sock || true
|
||||
- name: Log in to GitHub Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Build base
|
||||
run: ./scripts/linux/docker/build.sh --only base
|
||||
|
||||
bitbox:
|
||||
needs: base
|
||||
runs-on: puzl-ubuntu-latest
|
||||
timeout-minutes: 360
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
if: ${{ env.ACT != 'true' }}
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||
- name: Docker sock permissions
|
||||
run: sudo chmod 666 /var/run/docker.sock || true
|
||||
- name: Log in to GitHub Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Build bitbox
|
||||
run: ./scripts/linux/docker/build.sh --only bitbox
|
||||
|
||||
mwebd:
|
||||
needs: base
|
||||
runs-on: puzl-ubuntu-latest
|
||||
timeout-minutes: 360
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
if: ${{ env.ACT != 'true' }}
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||
- name: Docker sock permissions
|
||||
run: sudo chmod 666 /var/run/docker.sock || true
|
||||
- name: Log in to GitHub Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Build mwebd
|
||||
run: ./scripts/linux/docker/build.sh --only mwebd
|
||||
|
||||
reown:
|
||||
needs: base
|
||||
runs-on: puzl-ubuntu-latest
|
||||
timeout-minutes: 360
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
if: ${{ env.ACT != 'true' }}
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||
- name: Docker sock permissions
|
||||
run: sudo chmod 666 /var/run/docker.sock || true
|
||||
- name: Log in to GitHub Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Build reown
|
||||
run: ./scripts/linux/docker/build.sh --only reown
|
||||
|
||||
zcash:
|
||||
needs: base
|
||||
runs-on: puzl-ubuntu-latest
|
||||
timeout-minutes: 360
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
if: ${{ env.ACT != 'true' }}
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||
- name: Docker sock permissions
|
||||
run: sudo chmod 666 /var/run/docker.sock || true
|
||||
- name: Log in to GitHub Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Build zcash
|
||||
run: ./scripts/linux/docker/build.sh --only zcash
|
||||
|
||||
torch:
|
||||
needs: base
|
||||
runs-on: puzl-ubuntu-latest
|
||||
timeout-minutes: 360
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
if: ${{ env.ACT != 'true' }}
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||
- name: Docker sock permissions
|
||||
run: sudo chmod 666 /var/run/docker.sock || true
|
||||
- name: Log in to GitHub Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Build torch
|
||||
run: ./scripts/linux/docker/build.sh --only torch
|
||||
|
||||
monero:
|
||||
needs: base
|
||||
runs-on: puzl-ubuntu-latest
|
||||
timeout-minutes: 360
|
||||
strategy:
|
||||
matrix:
|
||||
coin: [monero, wownero]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
if: ${{ env.ACT != 'true' }}
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||
- name: Docker sock permissions
|
||||
run: sudo chmod 666 /var/run/docker.sock || true
|
||||
- name: Log in to GitHub Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Build monero
|
||||
run: ./scripts/linux/docker/build.sh --only monero --coin ${{ matrix.coin }} --target x86_64-linux-gnu
|
||||
|
||||
monero_merge:
|
||||
needs: monero
|
||||
runs-on: puzl-ubuntu-latest
|
||||
timeout-minutes: 360
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
if: ${{ env.ACT != 'true' }}
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||
- name: Docker sock permissions
|
||||
run: sudo chmod 666 /var/run/docker.sock || true
|
||||
- name: Log in to GitHub Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Merge monero
|
||||
run: ./scripts/linux/docker/build.sh --only monero --merge
|
||||
|
||||
final:
|
||||
needs: [bitbox, mwebd, reown, zcash, torch, monero_merge]
|
||||
runs-on: puzl-ubuntu-latest
|
||||
timeout-minutes: 360
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
if: ${{ env.ACT != 'true' }}
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||
- name: Docker sock permissions
|
||||
run: sudo chmod 666 /var/run/docker.sock || true
|
||||
- name: Log in to GitHub Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Build final
|
||||
run: ./scripts/linux/docker/build.sh --only final
|
||||
|
||||
app:
|
||||
needs: final
|
||||
runs-on: puzl-ubuntu-latest
|
||||
timeout-minutes: 360
|
||||
container:
|
||||
image: ghcr.io/cake-tech/cake_wallet:debian13-flutter3.41.9-ndkr28-go1.24.1-ruststablenightly
|
||||
env:
|
||||
STORE_PASS: test@cake_wallet
|
||||
KEY_PASS: test@cake_wallet
|
||||
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
|
||||
DESKTOP_FORCE_MOBILE: Y
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
steps:
|
||||
- name: Fix github actions messing up $HOME...
|
||||
run: "echo HOME=/root | sudo tee -a $GITHUB_ENV"
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
if: ${{ env.ACT != 'true' }}
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||
|
||||
- name: Docker sock permissions
|
||||
run: sudo chmod 666 /var/run/docker.sock || true
|
||||
|
||||
- name: Log in to GitHub Container Registry
|
||||
uses: docker/login-action@v3
|
||||
@@ -88,12 +286,8 @@ jobs:
|
||||
|
||||
echo "${{ secrets.MAIN_SECRETS_FILE }}" | base64 --decode > lib/.secrets.g.dart
|
||||
|
||||
- name: Build dependencies utilizing ghcr cache
|
||||
run: |
|
||||
env \
|
||||
CW_DOCKER_REGISTRY=ghcr.io/cake-tech/cake_wallet \
|
||||
CW_DOCKER_USE_CLOUD=true \
|
||||
./scripts/linux/docker/build.sh
|
||||
- name: Extract native dependencies
|
||||
run: ./scripts/linux/docker/build.sh --extract
|
||||
|
||||
- name: Execute Build and Setup Commands
|
||||
run: |
|
||||
@@ -134,7 +328,6 @@ jobs:
|
||||
path: ${{ github.workspace }}/build/linux/x64/release/cakewallet_linux.zip
|
||||
name: cakewallet_linux
|
||||
|
||||
# Integration tests moved to integration_tests.yml
|
||||
- name: Test [cw_core]
|
||||
timeout-minutes: 15
|
||||
run: cd cw_core && flutter test
|
||||
|
||||
@@ -17,33 +17,276 @@ on:
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
|
||||
env:
|
||||
CW_DOCKER_REGISTRY: ghcr.io/cake-tech/cake_wallet
|
||||
CW_DOCKER_USE_CLOUD: "true"
|
||||
|
||||
jobs:
|
||||
PR_test_build:
|
||||
runs-on: [Linux, amd64, android]
|
||||
base:
|
||||
runs-on: puzl-ubuntu-latest
|
||||
timeout-minutes: 360
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
if: ${{ env.ACT != 'true' }}
|
||||
with:
|
||||
ref: ${{ inputs.ref }}
|
||||
- name: Docker sock permissions
|
||||
run: sudo chmod 666 /var/run/docker.sock || true
|
||||
- name: Log in to GitHub Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Build base
|
||||
run: ./scripts/android/docker/build.sh --only base
|
||||
|
||||
bitbox:
|
||||
needs: base
|
||||
runs-on: puzl-ubuntu-latest
|
||||
timeout-minutes: 360
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
if: ${{ env.ACT != 'true' }}
|
||||
with:
|
||||
ref: ${{ inputs.ref }}
|
||||
- name: Docker sock permissions
|
||||
run: sudo chmod 666 /var/run/docker.sock || true
|
||||
- name: Log in to GitHub Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Build bitbox
|
||||
run: ./scripts/android/docker/build.sh --only bitbox
|
||||
|
||||
mwebd:
|
||||
needs: base
|
||||
runs-on: puzl-ubuntu-latest
|
||||
timeout-minutes: 360
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
if: ${{ env.ACT != 'true' }}
|
||||
with:
|
||||
ref: ${{ inputs.ref }}
|
||||
- name: Docker sock permissions
|
||||
run: sudo chmod 666 /var/run/docker.sock || true
|
||||
- name: Log in to GitHub Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Build mwebd
|
||||
run: ./scripts/android/docker/build.sh --only mwebd
|
||||
|
||||
reown:
|
||||
needs: base
|
||||
runs-on: puzl-ubuntu-latest
|
||||
timeout-minutes: 360
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
if: ${{ env.ACT != 'true' }}
|
||||
with:
|
||||
ref: ${{ inputs.ref }}
|
||||
- name: Docker sock permissions
|
||||
run: sudo chmod 666 /var/run/docker.sock || true
|
||||
- name: Log in to GitHub Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Build reown
|
||||
run: ./scripts/android/docker/build.sh --only reown
|
||||
|
||||
zcash:
|
||||
needs: base
|
||||
runs-on: puzl-ubuntu-latest
|
||||
timeout-minutes: 360
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
if: ${{ env.ACT != 'true' }}
|
||||
with:
|
||||
ref: ${{ inputs.ref }}
|
||||
- name: Docker sock permissions
|
||||
run: sudo chmod 666 /var/run/docker.sock || true
|
||||
- name: Log in to GitHub Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Build zcash
|
||||
run: ./scripts/android/docker/build.sh --only zcash
|
||||
|
||||
torch:
|
||||
needs: base
|
||||
runs-on: puzl-ubuntu-latest
|
||||
timeout-minutes: 360
|
||||
strategy:
|
||||
matrix:
|
||||
target:
|
||||
- aarch64-linux-android
|
||||
- armv7a-linux-androideabi
|
||||
- x86_64-linux-android
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
if: ${{ env.ACT != 'true' }}
|
||||
with:
|
||||
ref: ${{ inputs.ref }}
|
||||
- name: Docker sock permissions
|
||||
run: sudo chmod 666 /var/run/docker.sock || true
|
||||
- name: Log in to GitHub Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Build torch
|
||||
run: ./scripts/android/docker/build.sh --only torch --target ${{ matrix.target }}
|
||||
|
||||
torch_merge:
|
||||
needs: torch
|
||||
runs-on: puzl-ubuntu-latest
|
||||
timeout-minutes: 360
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
if: ${{ env.ACT != 'true' }}
|
||||
with:
|
||||
ref: ${{ inputs.ref }}
|
||||
- name: Docker sock permissions
|
||||
run: sudo chmod 666 /var/run/docker.sock || true
|
||||
- name: Log in to GitHub Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Merge torch
|
||||
run: ./scripts/android/docker/build.sh --only torch --merge
|
||||
|
||||
monero:
|
||||
needs: base
|
||||
runs-on: puzl-ubuntu-latest
|
||||
timeout-minutes: 360
|
||||
strategy:
|
||||
matrix:
|
||||
coin: [monero, wownero, zano]
|
||||
target:
|
||||
- aarch64-linux-android
|
||||
- armv7a-linux-androideabi
|
||||
- x86_64-linux-android
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
if: ${{ env.ACT != 'true' }}
|
||||
with:
|
||||
ref: ${{ inputs.ref }}
|
||||
- name: Docker sock permissions
|
||||
run: sudo chmod 666 /var/run/docker.sock || true
|
||||
- name: Log in to GitHub Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Build monero
|
||||
run: ./scripts/android/docker/build.sh --only monero --coin ${{ matrix.coin }} --target ${{ matrix.target }}
|
||||
|
||||
monero_merge:
|
||||
needs: monero
|
||||
runs-on: puzl-ubuntu-latest
|
||||
timeout-minutes: 360
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
if: ${{ env.ACT != 'true' }}
|
||||
with:
|
||||
ref: ${{ inputs.ref }}
|
||||
- name: Docker sock permissions
|
||||
run: sudo chmod 666 /var/run/docker.sock || true
|
||||
- name: Log in to GitHub Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Merge monero
|
||||
run: ./scripts/android/docker/build.sh --only monero --merge
|
||||
|
||||
decred:
|
||||
needs: [base, torch_merge]
|
||||
runs-on: puzl-ubuntu-latest
|
||||
timeout-minutes: 360
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
if: ${{ env.ACT != 'true' }}
|
||||
with:
|
||||
ref: ${{ inputs.ref }}
|
||||
- name: Docker sock permissions
|
||||
run: sudo chmod 666 /var/run/docker.sock || true
|
||||
- name: Log in to GitHub Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Build decred
|
||||
run: ./scripts/android/docker/build.sh --only decred
|
||||
|
||||
final:
|
||||
needs: [bitbox, mwebd, reown, zcash, torch_merge, monero_merge, decred]
|
||||
runs-on: puzl-ubuntu-latest
|
||||
timeout-minutes: 360
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
if: ${{ env.ACT != 'true' }}
|
||||
with:
|
||||
ref: ${{ inputs.ref }}
|
||||
- name: Docker sock permissions
|
||||
run: sudo chmod 666 /var/run/docker.sock || true
|
||||
- name: Log in to GitHub Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Build final
|
||||
run: ./scripts/android/docker/build.sh --only final
|
||||
|
||||
integration-test:
|
||||
needs: final
|
||||
uses: ./.github/workflows/reusable-integration-test.yml
|
||||
with:
|
||||
ref: ${{ inputs.ref }}
|
||||
suite_dir: integration_test/suites
|
||||
test_tier: tier0
|
||||
slack_notify: true
|
||||
extract_only: true
|
||||
secrets: inherit
|
||||
|
||||
app:
|
||||
needs: final
|
||||
runs-on: puzl-ubuntu-latest
|
||||
timeout-minutes: 360
|
||||
container:
|
||||
image: ghcr.io/cake-tech/cake_wallet:debian13-flutter3.41.9-ndkr28-go1.24.1-ruststablenightly
|
||||
env:
|
||||
STORE_PASS: test@cake_wallet
|
||||
KEY_PASS: test@cake_wallet
|
||||
MONEROC_CACHE_DIR_ROOT: /opt/generic_cache
|
||||
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
|
||||
volumes:
|
||||
- /opt/cw_cache_android/root/.cache:/root/.cache
|
||||
- /opt/cw_cache_android/root/.ccache:/root/.ccache
|
||||
- /opt/cw_cache_android/root/.pub-cache/:/root/.pub-cache
|
||||
- /opt/cw_cache_android/root/.gradle/:/root/.gradle
|
||||
- /opt/cw_cache_android/root/.android/:/root/.android
|
||||
- /opt/cw_cache_android/root/go/pkg:/root/go/pkg
|
||||
- /opt/cw_cache_android/opt/generic_cache:/opt/generic_cache
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
|
||||
steps:
|
||||
- name: Fix github actions messing up $HOME...
|
||||
run: "echo HOME=/root | sudo tee -a $GITHUB_ENV"
|
||||
- uses: actions/checkout@v4
|
||||
if: ${{ env.ACT != 'true' }}
|
||||
with:
|
||||
ref: ${{ inputs.ref }}
|
||||
|
||||
- name: Docker sock permissions
|
||||
run: sudo chmod 666 /var/run/docker.sock || true
|
||||
- name: Log in to GitHub Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
@@ -88,22 +331,10 @@ jobs:
|
||||
|
||||
- name: Generate KeyStore
|
||||
run: |
|
||||
pushd /opt/generic_cache
|
||||
if [[ ! -f key.jks ]];
|
||||
then
|
||||
keytool -genkey -v -keystore key.jks -keyalg RSA -keysize 2048 -validity 10000 -alias testKey -noprompt -dname "CN=CakeWallet, OU=CakeWallet, O=CakeWallet, L=Florida, S=America, C=USA" -storepass $STORE_PASS -keypass $KEY_PASS
|
||||
else
|
||||
echo "$PWD/key.jks exist, not generating"
|
||||
fi
|
||||
popd
|
||||
cp /opt/generic_cache/key.jks android/app
|
||||
./scripts/android/generate_dev_keystore.sh android/app/key.jks
|
||||
|
||||
- name: Build dependencies utilizing ghcr cache
|
||||
run: |
|
||||
env \
|
||||
CW_DOCKER_REGISTRY=ghcr.io/cake-tech/cake_wallet \
|
||||
CW_DOCKER_USE_CLOUD=true \
|
||||
./scripts/android/docker/build.sh
|
||||
- name: Extract native dependencies
|
||||
run: ./scripts/android/docker/build.sh --extract
|
||||
|
||||
- name: Execute Build and Setup Commands
|
||||
run: |
|
||||
@@ -121,7 +352,6 @@ jobs:
|
||||
run: |
|
||||
./model_generator.sh
|
||||
|
||||
|
||||
- name: Generate key properties
|
||||
run: |
|
||||
dart run tool/generate_android_key_properties.dart keyAlias=testKey storeFile=key.jks storePassword=$STORE_PASS keyPassword=$KEY_PASS
|
||||
|
||||
@@ -42,6 +42,10 @@ on:
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
extract_only:
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
defaults:
|
||||
run:
|
||||
@@ -61,24 +65,33 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ inputs.ref }}
|
||||
- name: Authenticate git for package clones
|
||||
run: |
|
||||
git config --global --unset-all credential.helper || true
|
||||
git config --global url."https://x-access-token:${{ github.token }}@github.com/".insteadOf "https://github.com/"
|
||||
- name: Free disk space
|
||||
run: |
|
||||
sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/.ghcup /usr/local/lib/node_modules /opt/hostedtoolcache/CodeQL
|
||||
sudo rm -rf /usr/share/swift /usr/local/share/powershell /usr/share/miniconda /opt/az /usr/local/graalvm
|
||||
sudo docker image prune -af > /dev/null
|
||||
df -h /
|
||||
|
||||
- name: Enable KVM
|
||||
run: |
|
||||
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
|
||||
sudo udevadm control --reload-rules
|
||||
sudo udevadm trigger --name-match=kvm
|
||||
sudo chmod 666 /dev/kvm || true
|
||||
|
||||
if [[ ! -c /dev/kvm ]]; then
|
||||
echo "::error::/dev/kvm is not a character device, this runner has no usable KVM"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Install protobuf compiler
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y protobuf-compiler
|
||||
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: temurin
|
||||
@@ -121,9 +134,8 @@ jobs:
|
||||
key: pub-cache-${{ runner.os }}-${{ hashFiles('pubspec_base.yaml', 'cw_*/pubspec.yaml') }}
|
||||
restore-keys: pub-cache-${{ runner.os }}-
|
||||
|
||||
- name: Add rust android targets
|
||||
run: |
|
||||
rustup target add x86_64-linux-android aarch64-linux-android armv7-linux-androideabi i686-linux-android
|
||||
- name: Docker sock permissions
|
||||
run: sudo chmod 666 /var/run/docker.sock || true
|
||||
|
||||
- name: Log in to GitHub Container Registry
|
||||
uses: docker/login-action@v3
|
||||
@@ -165,44 +177,26 @@ jobs:
|
||||
echo "${{ secrets.FUNDS_SECRETS_FILE }}" | base64 --decode > integration_test/core/funded_wallets.dart
|
||||
|
||||
- name: Build dependencies utilizing ghcr cache
|
||||
if: ${{ !inputs.extract_only }}
|
||||
run: |
|
||||
env \
|
||||
CW_DOCKER_REGISTRY=ghcr.io/cake-tech/cake_wallet \
|
||||
CW_DOCKER_USE_CLOUD=true \
|
||||
./scripts/android/docker/build.sh
|
||||
|
||||
- name: Extract native dependencies
|
||||
if: ${{ inputs.extract_only }}
|
||||
run: |
|
||||
env \
|
||||
CW_DOCKER_REGISTRY=ghcr.io/cake-tech/cake_wallet \
|
||||
CW_DOCKER_USE_CLOUD=true \
|
||||
./scripts/android/docker/build.sh --extract
|
||||
|
||||
- name: Reclaim the space the dependency images took
|
||||
run: |
|
||||
docker system prune -af --volumes > /dev/null
|
||||
df -h /
|
||||
|
||||
- name: Regenerate mweb bindings
|
||||
run: |
|
||||
git checkout -- cw_mweb/pubspec.yaml
|
||||
rm -f cw_mweb/pubspec.lock
|
||||
rm -rf cw_mweb/.dart_tool
|
||||
|
||||
# Hosted runners ship libclang, only install when it is actually missing
|
||||
if ! ldconfig -p | grep -q libclang; then
|
||||
sudo apt-get install -y --no-install-recommends libclang-dev > /dev/null
|
||||
fi
|
||||
|
||||
if ! command -v protoc > /dev/null ||
|
||||
[[ ! -f /usr/include/google/protobuf/descriptor.proto ]]; then
|
||||
sudo apt-get install -y --no-install-recommends protobuf-compiler libprotobuf-dev > /dev/null
|
||||
fi
|
||||
|
||||
pushd cw_mweb
|
||||
flutter pub get
|
||||
dart run ffigen --config ffigen_config.yaml
|
||||
popd
|
||||
|
||||
# Fail here in seconds rather than minutes into the gradle build
|
||||
if ! grep -q "final class GoSlice" cw_mweb/lib/generated_bindings.g.dart; then
|
||||
echo "::error::mweb bindings regenerated without class modifiers, ffigen resolved too old"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Execute Build and Setup Commands
|
||||
run: |
|
||||
pushd scripts/android
|
||||
|
||||
Reference in New Issue
Block a user