From cb1d9ac8849f03007322abe24317ace9036d28e7 Mon Sep 17 00:00:00 2001 From: Czarek Nakamoto Date: Tue, 7 Jan 2025 20:53:27 +0100 Subject: [PATCH] ci: do not increment build_number.txt scripts: improve cache on linux --- .github/workflows/pr_test_build_android.yml | 27 --------------------- scripts/android/build_monero_all.sh | 1 - scripts/linux/build_monero_all.sh | 18 ++++++++------ 3 files changed, 11 insertions(+), 35 deletions(-) diff --git a/.github/workflows/pr_test_build_android.yml b/.github/workflows/pr_test_build_android.yml index fc655751a1..44f66179fb 100644 --- a/.github/workflows/pr_test_build_android.yml +++ b/.github/workflows/pr_test_build_android.yml @@ -226,34 +226,7 @@ jobs: echo -e "id=com.cakewallet.test_${sanitized_branch_name}\nname=${BRANCH_NAME}" > android/app.properties - # Step 3: Download previous build number - - name: Download previous build number - id: download-build-number - run: | - # Download the artifact if it exists - if [[ ! -f build_number.txt ]]; then - echo "1" > build_number.txt - fi - - # Step 4: Read and Increment Build Number - - name: Increment Build Number - id: increment-build-number - run: | - # Read current build number from file - BUILD_NUMBER=$(cat build_number.txt) - BUILD_NUMBER=$((BUILD_NUMBER + 1)) - echo "New build number: $BUILD_NUMBER" - # Save the incremented build number - echo "$BUILD_NUMBER" > build_number.txt - - # Export the build number to use in later steps - echo "BUILD_NUMBER=$BUILD_NUMBER" >> $GITHUB_ENV - - # Step 5: Update pubspec.yaml with new build number - - name: Update build number - run: | - sed -i "s/^version: .*/version: 1.0.$BUILD_NUMBER/" pubspec.yaml - name: Build run: | diff --git a/scripts/android/build_monero_all.sh b/scripts/android/build_monero_all.sh index f7292977ed..71a6b62282 100755 --- a/scripts/android/build_monero_all.sh +++ b/scripts/android/build_monero_all.sh @@ -10,7 +10,6 @@ NPROC="-j$(nproc)" ../prepare_moneroc.sh -# NOTE: -j1 is intentional. Otherwise you will run into weird behaviour on macos for COIN in monero wownero; do pushd ../monero_c diff --git a/scripts/linux/build_monero_all.sh b/scripts/linux/build_monero_all.sh index 5dc5125271..1b1c95af40 100755 --- a/scripts/linux/build_monero_all.sh +++ b/scripts/linux/build_monero_all.sh @@ -1,9 +1,5 @@ #!/bin/bash - -. ./config.sh - - set -x -e cd "$(dirname "$0")" @@ -15,7 +11,15 @@ NPROC="-j$(nproc)" for COIN in monero wownero; do pushd ../monero_c - ./build_single.sh ${COIN} $(gcc -dumpmachine) $NPROC + for target in x86_64-linux-gnu + do + if [[ -f "release/${COIN}/${target}_libwallet2_api_c.so" ]]; + then + echo "file exist, not building monero_c for ${COIN}/$target."; + else + env -i ./build_single.sh ${COIN} $target $NPROC + unxz -f ../monero_c/release/${COIN}/${target}_libwallet2_api_c.so.xz + fi + done popd - unxz -f ../monero_c/release/${COIN}/$(gcc -dumpmachine)_libwallet2_api_c.so.xz -done +done \ No newline at end of file