Skip to content

Rework exceptions #2011

Rework exceptions

Rework exceptions #2011

Workflow file for this run

name: build
on:
push:
branches: [master]
pull_request:
branches: [master]
defaults:
run:
shell: bash
env:
BUILD_TYPE: Release
jobs:
build:
name: Build
runs-on: ${{matrix.config.os}}
strategy:
matrix:
config:
- { name: Ubuntu GCC, os: ubuntu-latest, cc: gcc-13, cxx: g++-13 }
- { name: Ubuntu Clang, os: ubuntu-latest, cc: clang, cxx: clang++ }
- { name: macOS GCC, os: macOS-latest, cc: gcc-13, cxx: g++-13 }
- { name: macOS Clang, os: macOS-latest, cc: clang, cxx: clang++ }
- { name: Windows GCC, os: windows-latest, cc: gcc, cxx: g++ }
- { name: Windows Clang, os: windows-latest, cc: clang, cxx: clang++ }
- { name: Windows MSVC, os: windows-latest, cc: msvc, cxx: msvc }
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: 'true'
# TODO: remove this step after the default Clang is updated to version 16
- name: Install LLVM and Clang
if: cc == 'clang' and (matrix.config.os == 'ubuntu-latest' or matrix.config.os == 'macOS-latest')

Check failure on line 40 in .github/workflows/build.yml

View workflow run for this annotation

GitHub Actions / build

Invalid workflow file

The workflow is not valid. .github/workflows/build.yml (Line: 40, Col: 13): Unrecognized named-value: 'cc'. Located at position 1 within expression: cc == 'clang' and (matrix.config.os == 'ubuntu-latest' or matrix.config.os == 'macOS-latest')
uses: KyleMayes/install-llvm-action@v1
with:
version: "16.0"
- name: Install GMP and MPFR on Ubuntu
if: matrix.config.os == 'ubuntu-latest'
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: matrix.config.os == 'macOS-13' # TODO: macOS-latest
run: |
brew update
brew install gmp mpfr
- name: Configure CMake
working-directory: ${{github.workspace}}
run: cmake -Bbuild -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -Dfintamath_build_tests=ON -Dfintamath_build_shared=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 ${{env.BUILD_TYPE}}
- name: Test
working-directory: ${{github.workspace}}/build
run: ctest -C${{env.BUILD_TYPE}} --output-on-failure