Skip to content

Commit

Permalink
Run MacOS tests with multiple jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
ximinez committed Nov 13, 2024
1 parent 315b7dd commit 7f74c46
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
18 changes: 18 additions & 0 deletions .github/actions/dependencies/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 \
Expand Down
14 changes: 13 additions & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,19 @@ 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
echo ${PATH} | tr ':' '\n'
python --version
conan --version
cmake --version
nproc --version
echo -n "nproc returns: "
nproc
- name: configure Conan
run : |
conan profile new default --detect || true
Expand All @@ -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

0 comments on commit 7f74c46

Please sign in to comment.