From 6403b63594c451b17e82821f008c7f0157642450 Mon Sep 17 00:00:00 2001 From: Oleksandr <115580134+oleks-rip@users.noreply.github.com> Date: Thu, 14 Nov 2024 15:59:38 -0500 Subject: [PATCH] Attempt 5 --- .github/actions/dependencies/action.yml | 18 ++++++++++++++++++ .github/workflows/macos.yml | 20 +++++++++++++++++++- src/test/jtx/impl/Env.cpp | 2 +- 3 files changed, 38 insertions(+), 2 deletions(-) diff --git a/.github/actions/dependencies/action.yml b/.github/actions/dependencies/action.yml index 50e2999018a..9a6bd444303 100644 --- a/.github/actions/dependencies/action.yml +++ b/.github/actions/dependencies/action.yml @@ -24,6 +24,11 @@ runs: # Do not quote the URL. An empty string will be accepted (with # a non-fatal warning), but a missing argument will not. conan remote add ripple ${{ env.CONAN_URL }} --insert 0 + if [[ "${RUNNER_OS}" = "macOS" ]] + then + conan profile update 'env.CXXFLAGS="-DBOOST_ASIO_DISABLE_CONCEPTS"' default + conan profile update 'conf.tools.build:cxxflags+=["-DBOOST_ASIO_DISABLE_CONCEPTS"]' default + fi - name: try to authenticate to Ripple Conan remote id: remote shell: bash @@ -47,6 +52,19 @@ runs: run: | mkdir ${build_dir} cd ${build_dir} + # This fixes some dependency build issues, especially on MacOS + if [[ "${RUNNER_OS}" = "macOS" && \ + "${{ steps.binaries.outputs.missing }}" =~ "boost" ]] + then + conan install \ + --output-folder . \ + --build boost \ + --options tests=True \ + --options xrpld=True \ + --settings build_type=${{ inputs.configuration }} \ + .. || \ + rm -rfv ~/.conan + fi conan install \ --output-folder . \ --build missing \ diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index ab4be74fbf4..a09c95081df 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -19,6 +19,7 @@ jobs: test: strategy: + fail-fast: false matrix: platform: - macos @@ -26,6 +27,10 @@ jobs: - Ninja configuration: - Release + - Debug + cmake-args: + - + - "-Dunity=ON" runs-on: [self-hosted, macOS] env: # The `build` action requires these variables. @@ -41,6 +46,9 @@ jobs: - name: install Ninja if: matrix.generator == 'Ninja' run: brew install ninja + name: install nproc + run: | + brew install coreutils - name: check environment run: | env | sort @@ -48,6 +56,9 @@ jobs: python --version conan --version cmake --version + nproc --version + echo -n "nproc returns: " + nproc - name: configure Conan run : | conan profile new default --detect || true @@ -66,6 +77,13 @@ jobs: with: generator: ${{ matrix.generator }} configuration: ${{ matrix.configuration }} + cmake-args: ${{ matrix.cmake-args }} - name: test run: | - ${build_dir}/rippled --unittest + n=$(nproc) + if [[ $n -gt 2 ]] + then + : $[ n/=2 ] + fi + echo "Using $n test jobs" + ${build_dir}/rippled --unittest --unittest-jobs $n diff --git a/src/test/jtx/impl/Env.cpp b/src/test/jtx/impl/Env.cpp index 5381b4335c4..2b1e3c65938 100644 --- a/src/test/jtx/impl/Env.cpp +++ b/src/test/jtx/impl/Env.cpp @@ -565,7 +565,7 @@ Env::do_rpc( ++ctr) { JLOG(journal.error()) - << "Env::do_rpc error, retrying, attempt #" << ctr + 1 << " ..."; + << "Env::do_rpc error, retrying, attempt #" << ctr + 1 << " ..."; std::this_thread::sleep_for(std::chrono::milliseconds(500)); response =