New MathObjectClass #2135
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: build | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
build: | |
name: Build | |
runs-on: ${{matrix.config.os}} | |
strategy: | |
matrix: | |
config: | |
- { | |
name: Windows MSVC Release Shared, | |
os: windows-latest, | |
cc: msvc, | |
cxx: msvc, | |
build-type: Release, | |
shared: ON, | |
} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: "true" | |
# TODO: remove this step after the default Clang is updated to version 16 | |
- name: Install LLVM and Clang on Ubuntu | |
if: startsWith(matrix.config.os, 'ubuntu') | |
uses: KyleMayes/install-llvm-action@v2 | |
with: | |
version: "16.0" | |
- name: Install GMP and MPFR on Ubuntu | |
if: startsWith(matrix.config.os, 'ubuntu') | |
run: | | |
sudo sed -i 's/azure\.//' /etc/apt/sources.list | |
sudo apt-get update | |
sudo apt-get install libgmp-dev libmpfr-dev | |
- name: Install GMP and MPFR on macOS | |
if: startsWith(matrix.config.os, 'macos') | |
run: | | |
brew update | |
brew install gmp mpfr | |
- name: Configure CMake | |
working-directory: ${{github.workspace}} | |
run: cmake -Bbuild -DCMAKE_BUILD_TYPE=${{matrix.config.build-type}} -Dfintamath_build_shared=${{matrix.config.shared}} -Dfintamath_build_tests=ON -Dfintamath_warnings_as_errors=ON | |
env: | |
CC: ${{matrix.config.cc}} | |
CXX: ${{matrix.config.cxx}} | |
- name: Build | |
working-directory: ${{github.workspace}} | |
run: cmake --build build --config ${{matrix.config.build-type}} | |
- name: Test | |
working-directory: ${{github.workspace}}/build | |
run: ctest -C${{matrix.config.build-type}} --output-on-failure |