name: macos on: pull_request: types: [opened, reopened, synchronize, ready_for_review] push: # If the branches list is ever changed, be sure to change it on all # build/test jobs (nix, macos, windows, instrumentation) branches: # Always build the package branches - develop - release - master # Branches that opt-in to running - "ci/**" concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true # This part of Conan configuration is specific to this workflow only; we do not want # to pollute conan/profiles directory with settings which might not work for others env: CONAN_REMOTE_URL: https://conan.ripplex.io CONAN_REMOTE_USERNAME: ${{ secrets.CONAN_REMOTE_USERNAME }} CONAN_REMOTE_PASSWORD: ${{ secrets.CONAN_REMOTE_PASSWORD }} # This part of the Conan configuration is specific to this workflow only; we # do not want to pollute the 'conan/profiles' directory with settings that # might not work for other workflows. CONAN_GLOBAL_CONF: | core.download:parallel={{os.cpu_count()}} core.upload:parallel={{os.cpu_count()}} tools.build:jobs={{ (os.cpu_count() * 4/5) | int }} tools.build:verbosity=verbose tools.compilation:verbosity=verbose jobs: test: if: ${{ github.event_name == 'push' || github.event.pull_request.draft != true || contains(github.event.pull_request.labels.*.name, 'DraftRunCI') }} strategy: matrix: platform: - macos generator: - Ninja configuration: - Release runs-on: [self-hosted, macOS, mac-runner-m1] env: # The `build` action requires these variables. build_dir: .build NUM_PROCESSORS: 12 steps: - name: checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - name: install Conan run: | brew install conan - name: install Ninja if: matrix.generator == 'Ninja' run: brew install ninja - name: install python run: | if which python > /dev/null 2>&1; then echo "Python executable exists" else brew install python@3.13 ln -s /opt/homebrew/bin/python3 /opt/homebrew/bin/python fi - name: install cmake run: | if which cmake > /dev/null 2>&1; then echo "cmake executable exists" else brew install cmake fi - 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 system_profiler SPHardwareDataType sysctl -n hw.logicalcpu clang --version - name: configure Conan run: | echo "${CONAN_GLOBAL_CONF}" > $(conan config home)/global.conf conan config install conan/profiles/ -tf $(conan config home)/profiles/ conan profile show - name: build dependencies uses: ./.github/actions/dependencies with: configuration: ${{ matrix.configuration }} - name: build uses: ./.github/actions/build with: generator: ${{ matrix.generator }} configuration: ${{ matrix.configuration }} cmake-args: "-Dassert=TRUE -Dwerr=TRUE ${{ matrix.cmake-args }}" - name: test run: | n=$(nproc) echo "Using $n test jobs" cd ${build_dir} ./rippled --unittest --unittest-jobs $n ctest -j $n --output-on-failure