-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Combine GitHub Actions workflows for testing into a single file
- Loading branch information
Showing
4 changed files
with
16 additions
and
122 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,37 @@ | ||
name: linux | ||
name: tests | ||
on: [push, pull_request] | ||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
max-parallel: 1 | ||
strategy: | ||
matrix: | ||
os: [ubuntu-20.04] | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
include: | ||
- os: ubuntu-20.04 | ||
- 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 | ||
use_cuda: "OFF" | ||
use_opencl: "OFF" | ||
use_openmp: "ON" | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Get CMake | ||
uses: lukka/get-cmake@latest | ||
- name: Add MSBuild to PATH | ||
uses: microsoft/[email protected] | ||
if: matrix.os == 'windows-latest' | ||
|
||
- name: Install Catch2 | ||
run: | | ||
git clone https://github.com/catchorg/Catch2.git | ||
cd Catch2 | ||
cmake -Bbuild -H. -DBUILD_TESTING=OFF | ||
sudo cmake --build build/ --target install --config Release | ||
${{ matrix.sudo }} cmake --build build/ --target install --config ${{ matrix.build_type }} | ||
shell: bash | ||
|
||
- name: Configure NiftyReg | ||
|
@@ -35,7 +40,7 @@ jobs: | |
cd build | ||
cmake -DCMAKE_CXX_COMPILER=${{ matrix.cxx-compiler }} \ | ||
-DCMAKE_C_COMPILER=${{ matrix.c-compiler }} \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \ | ||
-DBUILD_ALL_DEP=ON \ | ||
-DUSE_CUDA=${{ matrix.use_cuda }} \ | ||
-DUSE_OPENCL=${{ matrix.use_opencl }} \ | ||
|
@@ -46,7 +51,7 @@ jobs: | |
shell: bash | ||
|
||
- name: Build NiftyReg | ||
run: cmake --build build --config Release | ||
run: cmake --build build --config ${{ matrix.build_type }} | ||
shell: bash | ||
|
||
- name: Run tests | ||
|
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
373 | ||
374 |