From d545b2e863c0b1949ac50b19eb6669e372699286 Mon Sep 17 00:00:00 2001 From: Czarek Nakamoto Date: Fri, 20 Feb 2026 08:04:25 +0100 Subject: wip: ci fixes, drop generate_translations_header.c --- .github/workflows/full_check.yaml | 71 +++++++++++----------- contrib/depends/Makefile | 2 + ...enerate_translations_header.c-requirement.patch | 55 +++++++++++++++++ 3 files changed, 91 insertions(+), 37 deletions(-) create mode 100644 patches/monero/0019-drop-generate_translations_header.c-requirement.patch diff --git a/.github/workflows/full_check.yaml b/.github/workflows/full_check.yaml index 7a81837..a0a41b0 100644 --- a/.github/workflows/full_check.yaml +++ b/.github/workflows/full_check.yaml @@ -10,9 +10,7 @@ jobs: matrix: coin: [monero, wownero] target: [x86_64-w64-mingw32, i686-w64-mingw32] - runs-on: ubuntu-latest - container: - image: ubuntu:24.04 + runs-on: ubuntu-22.04 steps: - name: Install dependencies run: | @@ -61,7 +59,12 @@ jobs: fail-fast: false matrix: coin: [monero, wownero, zano] - target: [x86_64-linux-android, armv7a-linux-androideabi, aarch64-linux-android] + target: + [ + x86_64-linux-android, + armv7a-linux-androideabi, + aarch64-linux-android, + ] runs-on: ubuntu-22.04 steps: - name: Free Disk Space @@ -127,9 +130,7 @@ jobs: matrix: coin: [monero, wownero, zano] target: [x86_64-linux-gnu, aarch64-linux-gnu, i686-linux-gnu] - runs-on: ubuntu-latest - container: - image: debian:bookworm + runs-on: ubuntu-22.04 steps: - name: Install dependencies run: | @@ -178,23 +179,19 @@ jobs: fail-fast: false matrix: coin: [monero, wownero, zano] - target: [aarch64-apple-darwin, x86_64-apple-darwin] - name: macos build - runs-on: macos-15 + target: [x86_64-linux-gnu, aarch64-linux-gnu, i686-linux-gnu] + runs-on: ubuntu-22.04 steps: + - name: Install dependencies + run: | + apt update + apt install -y pigz build-essential pkg-config autoconf libtool ccache make cmake gcc g++ git curl lbzip2 libtinfo5 gperf gcc-aarch64-linux-gnu g++-aarch64-linux-gnu gcc-i686-linux-gnu g++-i686-linux-gnu - name: Checkout monero_c repo uses: actions/checkout@v4 with: repository: MrCyjaneK/monero_c fetch-depth: 0 submodules: recursive - - uses: maxim-lobanov/setup-xcode@v1 - with: - xcode-version: '16.4' - - name: install dependencies - run: | - brew uninstall cmake - brew install cmake ccache binutils pigz autoconf automake libtool pkg-config - name: Patch sources run: | git config --global --add safe.directory '*' @@ -246,7 +243,7 @@ jobs: submodules: recursive - uses: maxim-lobanov/setup-xcode@v1 with: - xcode-version: '16.4' + xcode-version: "16.4" - name: install dependencies run: | brew uninstall cmake @@ -287,7 +284,7 @@ jobs: bulk_lib_release: name: create single release file - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 needs: [lib_mingw, lib_android, lib_linux, lib_macos, lib_ios] strategy: matrix: @@ -301,7 +298,7 @@ jobs: steps: - name: Create release directory run: mkdir -p release/${{ matrix.coin }} - + - name: Download Android artifacts if: matrix.platform == 'android' uses: actions/download-artifact@v4 @@ -309,7 +306,7 @@ jobs: pattern: android-${{ matrix.coin }}-* path: temp-android merge-multiple: true - + - name: Download iOS artifacts if: matrix.platform == 'ios' uses: actions/download-artifact@v4 @@ -317,7 +314,7 @@ jobs: pattern: ios-${{ matrix.coin }}-* path: temp-ios merge-multiple: true - + - name: Download Linux artifacts if: matrix.platform == 'linux' uses: actions/download-artifact@v4 @@ -325,7 +322,7 @@ jobs: pattern: linux-${{ matrix.coin }}-* path: temp-linux merge-multiple: true - + - name: Download macOS artifacts if: matrix.platform == 'macos' uses: actions/download-artifact@v4 @@ -333,7 +330,7 @@ jobs: pattern: macos-${{ matrix.coin }}-* path: temp-macos merge-multiple: true - + - name: Download MinGW artifacts if: matrix.platform == 'mingw' && (matrix.coin == 'monero' || matrix.coin == 'wownero') uses: actions/download-artifact@v4 @@ -341,13 +338,13 @@ jobs: pattern: mingw-${{ matrix.coin }}-* path: temp-mingw merge-multiple: true - + - name: Copy artifacts to release directory run: | if [ -d "temp-${{ matrix.platform }}" ]; then cp -r temp-${{ matrix.platform }}/* release/${{ matrix.coin }}/ fi - + - name: Upload consolidated artifacts uses: actions/upload-artifact@v4 with: @@ -356,18 +353,18 @@ jobs: final_bulk_release: name: create final release bundle - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 needs: [bulk_lib_release] steps: - name: Create release directory run: mkdir -p release/{monero,wownero,zano} - + - name: Download all consolidated artifacts uses: actions/download-artifact@v4 with: pattern: "*-all" path: temp-all - + - name: Reorganize artifacts run: | # Move all artifacts to their respective coin directories @@ -378,17 +375,17 @@ jobs: fi done done - + - name: zip release dir run: zip -r release-bundle.zip release - + - name: Release uses: softprops/action-gh-release@v2 if: startsWith(github.ref, 'refs/tags/') with: files: release-bundle.zip token: ${{ secrets.CUSTOM_GITHUB_TOKEN }} - + - name: Upload final bundle uses: actions/upload-artifact@v4 with: @@ -397,7 +394,7 @@ jobs: deno_monerots_test_linux: name: test ts library - runs-on: ubuntu-24.04 + runs-on: ubuntu-22.04 needs: [lib_linux] steps: - uses: actions/checkout@v4 @@ -437,7 +434,7 @@ jobs: matrix: coin: [monero, wownero] needs: [lib_linux] - runs-on: ubuntu-24.04 + runs-on: ubuntu-22.04 steps: - uses: denoland/setup-deno@v2 with: @@ -499,7 +496,7 @@ jobs: matrix: coin: [monero, wownero] needs: [lib_linux] - runs-on: ubuntu-24.04 + runs-on: ubuntu-22.04 steps: - uses: denoland/setup-deno@v2 with: @@ -565,7 +562,7 @@ jobs: comment_pr: name: comment on pr - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 needs: [lib_mingw, lib_android, lib_linux, lib_macos, lib_ios] steps: - uses: actions/github-script@v7 @@ -593,7 +590,7 @@ jobs: id: fc with: issue-number: ${{steps.get_issue_number.outputs.result}} - comment-author: 'github-actions[bot]' + comment-author: "github-actions[bot]" body-includes: download artifacts - name: Update comment continue-on-error: true diff --git a/contrib/depends/Makefile b/contrib/depends/Makefile index eaa5c9a..ffcd6e2 100644 --- a/contrib/depends/Makefile +++ b/contrib/depends/Makefile @@ -1,3 +1,5 @@ +.NOTPARALLEL: + HOST ?= PACKAGES = native/cmake,native/python@3.14,native/git,native/_,boost,zeromq,zlib,unbound,sodium,openssl diff --git a/patches/monero/0019-drop-generate_translations_header.c-requirement.patch b/patches/monero/0019-drop-generate_translations_header.c-requirement.patch new file mode 100644 index 0000000..4c8e781 --- /dev/null +++ b/patches/monero/0019-drop-generate_translations_header.c-requirement.patch @@ -0,0 +1,55 @@ +From d6679d3c35015fe6b32dd945f144edc4e5155515 Mon Sep 17 00:00:00 2001 +From: Czarek Nakamoto +Date: Fri, 20 Feb 2026 08:03:01 +0100 +Subject: [PATCH] drop generate_translations_header.c requirement + +--- + translations/CMakeLists.txt | 31 +++++++++++++++++++++++++------ + 1 file changed, 25 insertions(+), 6 deletions(-) + +diff --git a/translations/CMakeLists.txt b/translations/CMakeLists.txt +index 3b43360f8..55ba3cb96 100644 +--- a/translations/CMakeLists.txt ++++ b/translations/CMakeLists.txt +@@ -69,13 +69,32 @@ else() + endif() + endif() + +-string(REPLACE ".ts" ".qm" qm_files "${ts_files}") ++file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/translation_files.h" ++"#ifndef TRANSLATION_FILES_H ++#define TRANSLATION_FILES_H + +-add_custom_command(TARGET generate_translations_header +- POST_BUILD +- COMMAND $ ${qm_files} +- WORKING_DIRECTORY "${CMAKE_CURRENT_BIN_DIR}" +- COMMENT "Generating embedded translations header") ++#include ++ ++static const struct embedded_file { ++ const std::string *name; ++ const std::string *data; ++} embedded_files[] = { ++ {NULL, NULL} ++}; ++ ++static bool find_embedded_file(const std::string &name, std::string &data) { ++ const struct embedded_file *p; ++ for (p = embedded_files; p->name != NULL; p++) { ++ if (*p->name == name) { ++ data = *p->data; ++ return true; ++ } ++ } ++ return false; ++} ++ ++#endif /* TRANSLATION_FILES_H */ ++") + + # export the generator target to a file, so it can be imported (see above) by another build + IF(NOT CMAKE_CROSSCOMPILING) +-- +2.50.1 (Apple Git-155) + -- cgit v1.2.3