See if libc++ likes this #328
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
name: CMake | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
env: | |
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) | |
BUILD_TYPE: Release | |
jobs: | |
job: | |
name: ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ ubuntu-22.04, ubuntu-24.04, macos-13, macos-14 ] | |
steps: | |
- name: Telling you what the matrix is | |
run: echo "matrix.os is [$MATRIX_OS]" | |
env: | |
MATRIX_OS: ${{ matrix.os }} | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
cache: 'pip' | |
if: startsWith(matrix.os, 'ubuntu') | |
- name: Fetch VeriPB | |
run: git -c core.hooksPath=/dev/null clone --depth 1 https://gitlab.com/MIAOresearch/software/VeriPB.git | |
- name: Install VeriPB using pip | |
run: pip install ./VeriPB | |
if: startsWith(matrix.os, 'ubuntu') | |
- name: Install VeriPB using pipx | |
run: env CPPFLAGS="-I`brew --prefix gmp`/include" LDFLAGS="-L`brew --prefix gmp`/lib" pipx install ./VeriPB | |
if: startsWith(matrix.os, 'macos') | |
- name: Install MiniZinc using brew | |
run: brew install minizincide | |
if: startsWith(matrix.os, 'macos') | |
- name: Install boost | |
uses: MarkusJx/install-boost@v2.4.5 | |
id: install-boost | |
with: | |
boost_version: '1.84.0' | |
arch: ${{ startsWith(matrix.os, 'macos-14') && 'aarch64' || 'x86' }} | |
- name: Configure CMake | |
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. | |
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type | |
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} | |
env: | |
BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }} | |
- name: Build | |
# Build your program with the given configuration | |
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -j4 | |
- name: Test | |
working-directory: ${{github.workspace}}/build | |
# Execute tests defined by the CMake configuration. | |
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail | |
run: ctest -C ${{env.BUILD_TYPE}} -j4 |