From 7f74c46152ac08e8e195a605cb68ef44af4e8361 Mon Sep 17 00:00:00 2001 From: Ed Hennis Date: Thu, 7 Nov 2024 19:07:57 -0500 Subject: [PATCH] Run MacOS tests with multiple jobs --- .github/actions/dependencies/action.yml | 18 ++++++++++++++++++ .github/workflows/macos.yml | 14 +++++++++++++- 2 files changed, 31 insertions(+), 1 deletion(-) 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 9d23b6dfa9a..749ca6c4455 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -46,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 @@ -53,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 @@ -74,4 +80,10 @@ jobs: 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