From 7a790246fbb9889a37822e438632550aafca4a91 Mon Sep 17 00:00:00 2001 From: Niq Dudfield Date: Thu, 14 Aug 2025 14:41:49 +0700 Subject: [PATCH] fix: upgrade CI to GCC 13 and fix compilation issues, fixes #557 (#559) --- .github/actions/xahau-ga-build/action.yml | 1 - .../actions/xahau-ga-dependencies/action.yml | 1 - .github/workflows/xahau-ga-nix.yml | 19 ++++++++----------- src/ripple/app/hook/Enum.h | 1 + src/test/app/SetHook_test.cpp | 2 +- 5 files changed, 10 insertions(+), 14 deletions(-) diff --git a/.github/actions/xahau-ga-build/action.yml b/.github/actions/xahau-ga-build/action.yml index 4b9a637d5..417190472 100644 --- a/.github/actions/xahau-ga-build/action.yml +++ b/.github/actions/xahau-ga-build/action.yml @@ -59,7 +59,6 @@ runs: ${{ runner.os }}-ccache-v${{ inputs.cache_version }}-${{ inputs.compiler-id }}-${{ inputs.configuration }}-${{ inputs.main_branch }} ${{ runner.os }}-ccache-v${{ inputs.cache_version }}-${{ inputs.compiler-id }}-${{ inputs.configuration }}- ${{ runner.os }}-ccache-v${{ inputs.cache_version }}-${{ inputs.compiler-id }}- - ${{ runner.os }}-ccache-v${{ inputs.cache_version }}- - name: Configure project shell: bash diff --git a/.github/actions/xahau-ga-dependencies/action.yml b/.github/actions/xahau-ga-dependencies/action.yml index ae038425c..b57a9e69e 100644 --- a/.github/actions/xahau-ga-dependencies/action.yml +++ b/.github/actions/xahau-ga-dependencies/action.yml @@ -54,7 +54,6 @@ runs: restore-keys: | ${{ runner.os }}-conan-v${{ inputs.cache_version }}-${{ inputs.compiler-id }}-${{ hashFiles('**/conanfile.txt', '**/conanfile.py') }}- ${{ runner.os }}-conan-v${{ inputs.cache_version }}-${{ inputs.compiler-id }}- - ${{ runner.os }}-conan-v${{ inputs.cache_version }}- - name: Export custom recipes shell: bash diff --git a/.github/workflows/xahau-ga-nix.yml b/.github/workflows/xahau-ga-nix.yml index 79a0f23ac..486518033 100644 --- a/.github/workflows/xahau-ga-nix.yml +++ b/.github/workflows/xahau-ga-nix.yml @@ -22,13 +22,14 @@ jobs: configuration: [Debug] include: - compiler: gcc - cc: gcc-11 - cxx: g++-11 - compiler_id: gcc-11 + cc: gcc-13 + cxx: g++-13 + compiler_id: gcc-13 + compiler_version: 13 env: build_dir: .build # Bump this number to invalidate all caches globally. - CACHE_VERSION: 1 + CACHE_VERSION: 2 MAIN_BRANCH_NAME: dev steps: - name: Checkout @@ -58,12 +59,8 @@ jobs: conan profile update env.CXX=/usr/bin/${{ matrix.cxx }} default conan profile update conf.tools.build:compiler_executables='{"c": "/usr/bin/${{ matrix.cc }}", "cpp": "/usr/bin/${{ matrix.cxx }}"}' default - # Set correct compiler version based on matrix.compiler - if [ "${{ matrix.compiler }}" = "gcc" ]; then - conan profile update settings.compiler.version=11 default - elif [ "${{ matrix.compiler }}" = "clang" ]; then - conan profile update settings.compiler.version=14 default - fi + # Set compiler version from matrix + conan profile update settings.compiler.version=${{ matrix.compiler_version }} default # Display profile for verification conan profile show default @@ -120,4 +117,4 @@ jobs: else echo "Error: rippled executable not found in ${{ env.build_dir }}" exit 1 - fi \ No newline at end of file + fi diff --git a/src/ripple/app/hook/Enum.h b/src/ripple/app/hook/Enum.h index 2acf37183..19209389e 100644 --- a/src/ripple/app/hook/Enum.h +++ b/src/ripple/app/hook/Enum.h @@ -1,3 +1,4 @@ +#include #include #include #include diff --git a/src/test/app/SetHook_test.cpp b/src/test/app/SetHook_test.cpp index 6b441287a..c3b336d05 100644 --- a/src/test/app/SetHook_test.cpp +++ b/src/test/app/SetHook_test.cpp @@ -321,7 +321,7 @@ public: HSFEE, ter(temMALFORMED)); - env(ripple::test::jtx::hook(alice, {{}}, 0), + env(ripple::test::jtx::hook(alice, std::vector{}, 0), M("Must have a non-empty hooks field"), HSFEE, ter(temMALFORMED));