Add tests #1543
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 | |
env: | |
BUILD_TYPE: Release | |
jobs: | |
build: | |
name: Build | |
runs-on: ${{matrix.config.os}} | |
strategy: | |
matrix: | |
config: | |
- { name: Ubuntu GCC, os: ubuntu-latest, cc: gcc, cxx: g++ } | |
- { name: Ubuntu Clang, os: ubuntu-latest, cc: clang, cxx: clang++ } | |
- { name: macOS GCC, os: macOS-latest, cc: gcc, cxx: g++ } | |
- { 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 | |
- 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 |