Additions to the parallelism library. #2227
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
# Part of BlueTit Solver, licensed under Apache 2.0 with Commons Clause. | |
# Commercial use, including SaaS, requires a separate license, see /LICENSE.md | |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
name: Build | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
types: [opened, synchronize, reopened] | |
# Cancel previous runs. | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
name: Build | |
strategy: | |
matrix: | |
os: [ubuntu-24.04, macos-15] | |
compiler: [g++-14, clang++-19] | |
configuration: [Debug, Release] | |
fail-fast: false | |
runs-on: ${{ matrix.os }} | |
env: | |
# To be set by the steps. | |
VCPKG_ROOT: | |
VCPKG_DEFAULT_BINARY_CACHE: | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install packages and tools | |
run: ./build/setup-ci-runner.sh | |
- name: Restore vcpkg packages cache | |
id: vcpkg-cache-restore | |
uses: actions/cache/restore@v4 | |
with: | |
path: | | |
${{ env.VCPKG_ROOT }}/installed | |
${{ env.VCPKG_ROOT }}/buildtrees | |
${{ env.VCPKG_DEFAULT_BINARY_CACHE }} | |
# Use the run ID as the cache key, this way the cache is updated | |
# after each run. | |
key: vcpkg-${{ runner.os }}-${{ matrix.compiler }}-${{ github.run_id }} | |
restore-keys: vcpkg-${{ runner.os }}-${{ matrix.compiler }} | |
- name: Install vcpkg packages | |
run: $VCPKG_ROOT/vcpkg install | |
env: | |
CXX: ${{ matrix.compiler }} | |
- name: Update vcpkg packages cache | |
uses: actions/cache/save@v4 | |
with: | |
path: | | |
${{ env.VCPKG_ROOT }}/installed | |
${{ env.VCPKG_ROOT }}/buildtrees | |
${{ env.VCPKG_DEFAULT_BINARY_CACHE }} | |
key: ${{ steps.vcpkg-cache-restore.outputs.cache-primary-key }} | |
- name: Build | |
run: | | |
./build/build.sh \ | |
--compiler ${{ matrix.compiler }} \ | |
--config ${{ matrix.configuration }} | |
- name: Run tests | |
run: ./build/test.sh | |
- name: Upload test output | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: test-output-${{ runner.os }}-${{ matrix.compiler }}-${{ matrix.configuration }} | |
path: output/test_output |