From 75ca159d2ce90b418b4e56edda30ccde7dda414c Mon Sep 17 00:00:00 2001 From: cyan Date: Sat, 11 Oct 2025 01:09:22 +0200 Subject: [PATCH] ci: use prebuilt monero_c on CI builds (#2569) --- .github/workflows/pr_test_build_android.yml | 39 ++++----------------- .github/workflows/pr_test_build_linux.yml | 39 ++++----------------- Dockerfile | 8 ++--- cw_monero/pubspec.lock | 4 +-- cw_monero/pubspec.yaml | 2 +- cw_wownero/pubspec.lock | 4 +-- cw_wownero/pubspec.yaml | 2 +- cw_zano/pubspec.lock | 4 +-- cw_zano/pubspec.yaml | 2 +- docs/builds/ANDROID.md | 4 +-- docs/builds/LINUX.md | 4 +-- scripts/linux/build_cake_release.sh | 2 +- scripts/prepare_moneroc.sh | 4 ++- 13 files changed, 35 insertions(+), 83 deletions(-) diff --git a/.github/workflows/pr_test_build_android.yml b/.github/workflows/pr_test_build_android.yml index 4a6d49d06..5d5b52782 100644 --- a/.github/workflows/pr_test_build_android.yml +++ b/.github/workflows/pr_test_build_android.yml @@ -9,7 +9,7 @@ jobs: PR_test_build: runs-on: linux-amd64 container: - image: ghcr.io/cake-tech/cake_wallet:debian12-flutter3.32.0-ndkr28-go1.24.1-ruststablenightly + image: ghcr.io/cake-tech/cake_wallet:debian13-flutter3.32.0-ndkr28-go1.24.1-ruststablenightly env: STORE_PASS: test@cake_wallet KEY_PASS: test@cake_wallet @@ -179,34 +179,6 @@ jobs: echo "const kryptonimApiKey = '${{ secrets.KRYPTONIM_API_KEY }}';" >> lib/.secrets.g.dart echo "const walletGroupSalt = '${{ secrets.WALLET_GROUP_SALT }}';" >> lib/.secrets.g.dart - - name: prepare monero_c and cache - run: | - export MONEROC_HASH=$(cat scripts/prepare_moneroc.sh | grep 'git checkout' | xargs | awk '{ print $3 }') - echo MONEROC_HASH=$MONEROC_HASH >> /etc/environment - mkdir -p "$MONEROC_CACHE_DIR_ROOT/moneroc-$MONEROC_HASH/monero_c" - pushd scripts - ln -s "$MONEROC_CACHE_DIR_ROOT/moneroc-$MONEROC_HASH/monero_c" - ./prepare_moneroc.sh - popd - pushd scripts/monero_c - mkdir -p "$MONEROC_CACHE_DIR_ROOT/_cache/contrib/depends/built" || true - mkdir -p "$MONEROC_CACHE_DIR_ROOT/_cache/monero/contrib/depends/built" || true - mkdir -p "$MONEROC_CACHE_DIR_ROOT/_cache/wownero/contrib/depends/built" || true - mkdir -p "$MONEROC_CACHE_DIR_ROOT/_cache/contrib/depends/sources" || true - mkdir -p "$MONEROC_CACHE_DIR_ROOT/_cache/monero/contrib/depends/sources" || true - mkdir -p "$MONEROC_CACHE_DIR_ROOT/_cache/wownero/contrib/depends/sources" || true - - rm -rf "$PWD/contrib/depends/built" "$PWD/monero/contrib/depends/built" "$PWD/wownero/contrib/depends/built" - rm -rf "$PWD/contrib/depends/sources" "$PWD/monero/contrib/depends/sources" "$PWD/wownero/contrib/depends/sources" - mkdir -p contrib/depends || true - ln -sf "$MONEROC_CACHE_DIR_ROOT/_cache/contrib/depends/built" "$PWD/contrib/depends/built" - ln -sf "$MONEROC_CACHE_DIR_ROOT/_cache/monero/contrib/depends/built" "$PWD/monero/contrib/depends/built" - ln -sf "$MONEROC_CACHE_DIR_ROOT/_cache/wownero/contrib/depends/built" "$PWD/wownero/contrib/depends/built" - ln -sf "$MONEROC_CACHE_DIR_ROOT/_cache/contrib/depends/sources" "$PWD/contrib/depends/sources" - ln -sf "$MONEROC_CACHE_DIR_ROOT/_cache/monero/contrib/depends/sources" "$PWD/monero/contrib/depends/sources" - ln -sf "$MONEROC_CACHE_DIR_ROOT/_cache/wownero/contrib/depends/sources" "$PWD/wownero/contrib/depends/sources" - popd - - name: Generate KeyStore run: | pushd /opt/generic_cache @@ -246,9 +218,12 @@ jobs: - name: Build monero_c run: | - pushd scripts/android/ - source ./app_env.sh cakewallet - ./build_monero_all.sh + mkdir -p scripts/monero_c + pushd scripts/monero_c + wget https://github.com/MrCyjaneK/monero_c/releases/download/v0.18.4.0-RC9/release-bundle.zip + unzip release-bundle.zip + rm release-bundle.zip + unxz -fv release/*/*.xz popd - name: Build Bitbox Flutter diff --git a/.github/workflows/pr_test_build_linux.yml b/.github/workflows/pr_test_build_linux.yml index dea882410..40318d36c 100644 --- a/.github/workflows/pr_test_build_linux.yml +++ b/.github/workflows/pr_test_build_linux.yml @@ -9,7 +9,7 @@ jobs: PR_test_build: runs-on: linux-amd64 container: - image: ghcr.io/cake-tech/cake_wallet:debian12-flutter3.32.0-ndkr28-go1.24.1-ruststablenightly + image: ghcr.io/cake-tech/cake_wallet:debian13-flutter3.32.0-ndkr28-go1.24.1-ruststablenightly env: STORE_PASS: test@cake_wallet KEY_PASS: test@cake_wallet @@ -175,34 +175,6 @@ jobs: echo "const kryptonimApiKey = '${{ secrets.KRYPTONIM_API_KEY }}';" >> lib/.secrets.g.dart echo "const walletGroupSalt = '${{ secrets.WALLET_GROUP_SALT }}';" >> lib/.secrets.g.dart - - name: prepare monero_c and cache - run: | - export MONEROC_HASH=$(cat scripts/prepare_moneroc.sh | grep 'git checkout' | xargs | awk '{ print $3 }') - echo MONEROC_HASH=$MONEROC_HASH >> /etc/environment - mkdir -p "$MONEROC_CACHE_DIR_ROOT/moneroc-$MONEROC_HASH/monero_c" - pushd scripts - ln -s "$MONEROC_CACHE_DIR_ROOT/moneroc-$MONEROC_HASH/monero_c" - ./prepare_moneroc.sh - popd - pushd scripts/monero_c - mkdir -p "$MONEROC_CACHE_DIR_ROOT/_cache/contrib/depends/built" || true - mkdir -p "$MONEROC_CACHE_DIR_ROOT/_cache/monero/contrib/depends/built" || true - mkdir -p "$MONEROC_CACHE_DIR_ROOT/_cache/wownero/contrib/depends/built" || true - mkdir -p "$MONEROC_CACHE_DIR_ROOT/_cache/contrib/depends/sources" || true - mkdir -p "$MONEROC_CACHE_DIR_ROOT/_cache/monero/contrib/depends/sources" || true - mkdir -p "$MONEROC_CACHE_DIR_ROOT/_cache/wownero/contrib/depends/sources" || true - - rm -rf "$PWD/contrib/depends/built" "$PWD/monero/contrib/depends/built" "$PWD/wownero/contrib/depends/built" - rm -rf "$PWD/contrib/depends/sources" "$PWD/monero/contrib/depends/sources" "$PWD/wownero/contrib/depends/sources" - mkdir -p contrib/depends || true - ln -sf "$MONEROC_CACHE_DIR_ROOT/_cache/contrib/depends/built" "$PWD/contrib/depends/built" - ln -sf "$MONEROC_CACHE_DIR_ROOT/_cache/monero/contrib/depends/built" "$PWD/monero/contrib/depends/built" - ln -sf "$MONEROC_CACHE_DIR_ROOT/_cache/wownero/contrib/depends/built" "$PWD/wownero/contrib/depends/built" - ln -sf "$MONEROC_CACHE_DIR_ROOT/_cache/contrib/depends/sources" "$PWD/contrib/depends/sources" - ln -sf "$MONEROC_CACHE_DIR_ROOT/_cache/monero/contrib/depends/sources" "$PWD/monero/contrib/depends/sources" - ln -sf "$MONEROC_CACHE_DIR_ROOT/_cache/wownero/contrib/depends/sources" "$PWD/wownero/contrib/depends/sources" - popd - - name: Fetch prebuilt Torch run: | set -x -e @@ -223,9 +195,12 @@ jobs: - name: Build monero_c run: | - pushd scripts/linux/ - source ./app_env.sh cakewallet - ./build_monero_all.sh + mkdir -p scripts/monero_c + pushd scripts/monero_c + wget https://github.com/MrCyjaneK/monero_c/releases/download/v0.18.4.0-RC9/release-bundle.zip + unzip release-bundle.zip + rm release-bundle.zip + unxz -fv release/*/*.xz popd - name: Build Bitbox Flutter diff --git a/Dockerfile b/Dockerfile index 6c66620c2..7c3ce1b9f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -# docker buildx build --push --pull --platform linux/amd64,linux/arm64 . -f Dockerfile -t ghcr.io/cake-tech/cake_wallet:debian12-flutter3.32.0-ndkr28-go1.24.1-ruststablenightly +# docker buildx build --push --pull --platform linux/amd64,linux/arm64 . -f Dockerfile -t ghcr.io/cake-tech/cake_wallet:debian13-flutter3.32.0-ndkr28-go1.24.1-ruststablenightly # Heavily inspired by cirrusci images # https://github.com/cirruslabs/docker-images-android/blob/master/sdk/tools/Dockerfile @@ -6,7 +6,7 @@ # https://github.com/cirruslabs/docker-images-android/blob/master/sdk/34-ndk/Dockerfile # https://github.com/cirruslabs/docker-images-flutter/blob/master/sdk/Dockerfile -FROM docker.io/debian:12 +FROM docker.io/debian:13 LABEL org.opencontainers.image.source=https://github.com/cake-tech/cake_wallet @@ -46,9 +46,9 @@ RUN set -o xtrace \ && cd /opt \ && apt-get install -y --no-install-recommends --no-install-suggests \ # Core dependencies - bc build-essential curl default-jdk git jq lcov libglu1-mesa libpulse0 libsqlite3-dev libstdc++6 locales openssh-client ruby-bundler ruby-full software-properties-common sudo unzip wget zip \ + bc build-essential curl default-jdk git jq lcov libglu1-mesa libpulse0 libsqlite3-dev libstdc++6 locales openssh-client ruby-bundler ruby-full sudo unzip wget zip \ # for x86 emulators - libatk-bridge2.0-0 libgdk-pixbuf2.0-0 libgtk-3-0 libnspr4 libnss3-dev libsqlite3-dev libxtst6 libxss1 lftp sqlite3 xxd \ + libatk-bridge2.0-0 libgdk-pixbuf-xlib-2.0-0 libgtk-3-0 libnspr4 libnss3-dev libsqlite3-dev libxtst6 libxss1 lftp sqlite3 xxd \ # Linux desktop dependencies clang cmake libgtk-3-dev ninja-build pkg-config libsecret-1-0 libsecret-1-dev gir1.2-secret-1 \ # monero_c dependencies diff --git a/cw_monero/pubspec.lock b/cw_monero/pubspec.lock index e04f73f9d..23944e496 100644 --- a/cw_monero/pubspec.lock +++ b/cw_monero/pubspec.lock @@ -573,8 +573,8 @@ packages: dependency: "direct main" description: path: "impls/monero.dart" - ref: "07f7a7f80735130ebfa5842ddee5139076408c0d" - resolved-ref: "07f7a7f80735130ebfa5842ddee5139076408c0d" + ref: "411e8a1cdb3f4c2812d83f28c335d2a4eb18bd29" + resolved-ref: "411e8a1cdb3f4c2812d83f28c335d2a4eb18bd29" url: "https://github.com/mrcyjanek/monero_c" source: git version: "0.0.0" diff --git a/cw_monero/pubspec.yaml b/cw_monero/pubspec.yaml index 2da3023e9..1eb8155a7 100644 --- a/cw_monero/pubspec.yaml +++ b/cw_monero/pubspec.yaml @@ -26,7 +26,7 @@ dependencies: monero: git: url: https://github.com/mrcyjanek/monero_c - ref: 07f7a7f80735130ebfa5842ddee5139076408c0d + ref: 411e8a1cdb3f4c2812d83f28c335d2a4eb18bd29 path: impls/monero.dart mutex: ^3.1.0 ledger_flutter_plus: ^1.4.1 diff --git a/cw_wownero/pubspec.lock b/cw_wownero/pubspec.lock index fbebeab57..8710715d5 100644 --- a/cw_wownero/pubspec.lock +++ b/cw_wownero/pubspec.lock @@ -493,8 +493,8 @@ packages: dependency: "direct main" description: path: "impls/monero.dart" - ref: "07f7a7f80735130ebfa5842ddee5139076408c0d" - resolved-ref: "07f7a7f80735130ebfa5842ddee5139076408c0d" + ref: "411e8a1cdb3f4c2812d83f28c335d2a4eb18bd29" + resolved-ref: "411e8a1cdb3f4c2812d83f28c335d2a4eb18bd29" url: "https://github.com/mrcyjanek/monero_c" source: git version: "0.0.0" diff --git a/cw_wownero/pubspec.yaml b/cw_wownero/pubspec.yaml index b8a6a9e46..44657144f 100644 --- a/cw_wownero/pubspec.yaml +++ b/cw_wownero/pubspec.yaml @@ -24,7 +24,7 @@ dependencies: monero: git: url: https://github.com/mrcyjanek/monero_c - ref: 07f7a7f80735130ebfa5842ddee5139076408c0d # monero_c hash + ref: 411e8a1cdb3f4c2812d83f28c335d2a4eb18bd29 # monero_c hash path: impls/monero.dart mutex: ^3.1.0 diff --git a/cw_zano/pubspec.lock b/cw_zano/pubspec.lock index a333b682d..0ee704606 100644 --- a/cw_zano/pubspec.lock +++ b/cw_zano/pubspec.lock @@ -498,8 +498,8 @@ packages: dependency: "direct main" description: path: "impls/monero.dart" - ref: "07f7a7f80735130ebfa5842ddee5139076408c0d" - resolved-ref: "07f7a7f80735130ebfa5842ddee5139076408c0d" + ref: "411e8a1cdb3f4c2812d83f28c335d2a4eb18bd29" + resolved-ref: "411e8a1cdb3f4c2812d83f28c335d2a4eb18bd29" url: "https://github.com/mrcyjanek/monero_c" source: git version: "0.0.0" diff --git a/cw_zano/pubspec.yaml b/cw_zano/pubspec.yaml index b738028b1..54091a850 100644 --- a/cw_zano/pubspec.yaml +++ b/cw_zano/pubspec.yaml @@ -25,7 +25,7 @@ dependencies: monero: git: url: https://github.com/mrcyjanek/monero_c - ref: 07f7a7f80735130ebfa5842ddee5139076408c0d # monero_c hash + ref: 411e8a1cdb3f4c2812d83f28c335d2a4eb18bd29 # monero_c hash path: impls/monero.dart dev_dependencies: flutter_test: diff --git a/docs/builds/ANDROID.md b/docs/builds/ANDROID.md index 3a7348934..d8e4bd3d9 100644 --- a/docs/builds/ANDROID.md +++ b/docs/builds/ANDROID.md @@ -18,8 +18,8 @@ In order to build the latest version of Cake Wallet, simply run the following: git clone --branch main https://github.com/cake-tech/cake_wallet.git # NOTE: Replace `main` with the latest release tag available at https://github.com/cake-tech/cake_wallet/releases/latest. cd cake_wallet -# docker build -t ghcr.io/cake-tech/cake_wallet:debian12-flutter3.32.0-ndkr28-go1.24.1-ruststablenightly . # Uncomment to build the docker image yourself instead of pulling it from the registry -docker run -v$(pwd):$(pwd) -w $(pwd) -i --rm ghcr.io/cake-tech/cake_wallet:debian12-flutter3.32.0-ndkr28-go1.24.1-ruststablenightly bash -x << EOF +# docker build -t ghcr.io/cake-tech/cake_wallet:debian13-flutter3.32.0-ndkr28-go1.24.1-ruststablenightly . # Uncomment to build the docker image yourself instead of pulling it from the registry +docker run -v$(pwd):$(pwd) -w $(pwd) -i --rm ghcr.io/cake-tech/cake_wallet:debian13-flutter3.32.0-ndkr28-go1.24.1-ruststablenightly bash -x << EOF set -x -e pushd scripts/android ./build_torch.sh diff --git a/docs/builds/LINUX.md b/docs/builds/LINUX.md index b3a4f5758..e7e94ed66 100644 --- a/docs/builds/LINUX.md +++ b/docs/builds/LINUX.md @@ -20,8 +20,8 @@ In order to build the latest version of Cake Wallet, simply run the following: git clone --branch main https://github.com/cake-tech/cake_wallet.git # NOTE: Replace `main` with the latest release tag available at https://github.com/cake-tech/cake_wallet/releases/latest. cd cake_wallet -# docker build -t ghcr.io/cake-tech/cake_wallet:debian12-flutter3.32.0-ndkr28-go1.24.1-ruststablenightly . # Uncomment to build the docker image yourself instead of pulling it from the registry -docker run --privileged -v$(pwd):$(pwd) -w $(pwd) -i --rm ghcr.io/cake-tech/cake_wallet:debian12-flutter3.32.0-ndkr28-go1.24.1-ruststablenightly bash -x << EOF +# docker build -t ghcr.io/cake-tech/cake_wallet:debian13-flutter3.32.0-ndkr28-go1.24.1-ruststablenightly . # Uncomment to build the docker image yourself instead of pulling it from the registry +docker run --privileged -v$(pwd):$(pwd) -w $(pwd) -i --rm ghcr.io/cake-tech/cake_wallet:debian13-flutter3.32.0-ndkr28-go1.24.1-ruststablenightly bash -x << EOF set -x -e pushd scripts ./gen_android_manifest.sh diff --git a/scripts/linux/build_cake_release.sh b/scripts/linux/build_cake_release.sh index afb7fa4c6..efe2891cc 100755 --- a/scripts/linux/build_cake_release.sh +++ b/scripts/linux/build_cake_release.sh @@ -14,7 +14,7 @@ cd "$SCRIPT_DIR" BUILD_AMD64=false BUILD_ARM64=false APP_TYPE="cakewallet" -DOCKER_IMAGE="ghcr.io/cake-tech/cake_wallet:debian12-flutter3.32.0-ndkr28-go1.24.1-ruststablenightly" +DOCKER_IMAGE="ghcr.io/cake-tech/cake_wallet:debian13-flutter3.32.0-ndkr28-go1.24.1-ruststablenightly" # Parse arguments for arg in "$@" diff --git a/scripts/prepare_moneroc.sh b/scripts/prepare_moneroc.sh index 57a6ce741..b5752ad26 100755 --- a/scripts/prepare_moneroc.sh +++ b/scripts/prepare_moneroc.sh @@ -9,7 +9,9 @@ then rm -rf monero_c git clone https://github.com/mrcyjanek/monero_c --branch master monero_c cd monero_c - git checkout 07f7a7f80735130ebfa5842ddee5139076408c0d + # NOTE: Make sure to update monero_c prebuilds link in workflow files + # https://github.com/MrCyjaneK/monero_c/releases/download/v0.18.4.0-RC9/release-bundle.zip + git checkout 411e8a1cdb3f4c2812d83f28c335d2a4eb18bd29 git reset --hard git submodule update --init --force --recursive ./apply_patches.sh monero