Refactorisations #30
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: Tests | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
include: | |
- sudo: "sudo" # For ubuntu and macos | |
c-compiler: "gcc" | |
cxx-compiler: "g++" | |
- os: windows-latest # For windows only | |
sudo: "" | |
c-compiler: "cl.exe" | |
cxx-compiler: "cl.exe" | |
- build_type: "Debug" # For all platforms | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Add MSBuild to PATH | |
uses: microsoft/[email protected] | |
if: matrix.os == 'windows-latest' | |
- name: Install Catch2 | |
shell: bash | |
run: | | |
git clone https://github.com/catchorg/Catch2.git | |
cd Catch2 | |
cmake -Bbuild -H. -DBUILD_TESTING=OFF | |
${{ matrix.sudo }} cmake --build build/ --target install --config ${{ matrix.build_type }} | |
- name: Configure NiftyReg | |
shell: bash | |
run: | | |
mkdir build | |
cd build | |
cmake -DCMAKE_C_COMPILER=${{ matrix.c-compiler }} \ | |
-DCMAKE_CXX_COMPILER=${{ matrix.cxx-compiler }} \ | |
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \ | |
-DBUILD_ALL_DEP=ON \ | |
-DUSE_CUDA=OFF \ | |
-DUSE_OPENCL=OFF \ | |
-DUSE_SSE=ON \ | |
-DUSE_OPENMP=ON \ | |
-DBUILD_TESTING=ON \ | |
.. | |
- name: Build NiftyReg | |
shell: bash | |
run: cmake --build build --config ${{ matrix.build_type }} | |
- name: Run tests | |
shell: bash | |
working-directory: build | |
run: ctest -V |