-
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.
85 need to update cmake files and cd environment (#87)
* Issue #85: removal of mention of cdash has server is not available anymore * Issue #85: Adding a .ignore file * Issue #86 (#85): removed matlab dependent tests. Added a new one with Catch2 as a dependency * Issue #85 removing gitlab ci yaml file * Issue #85: Adding initial github action yaml file * Issue #85: Adding Catch2 * Issue #85: Adding macos and win
- Loading branch information
Showing
79 changed files
with
309 additions
and
17,960 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,106 @@ | ||
name: build-and-test | ||
on: [push, pull_request] | ||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
max-parallel: 3 | ||
matrix: | ||
os: [ubuntu-20.04, macos-11, windows-2022] | ||
include: | ||
- os: ubuntu-20.04 | ||
c-compiler: "gcc" | ||
cxx-compiler: "g++" | ||
use_cuda: "OFF" | ||
use_opencl: "OFF" | ||
use_openmp: "ON" | ||
- os: macos-11 | ||
c-compiler: "gcc" | ||
cxx-compiler: "g++" | ||
use_cuda: "OFF" | ||
use_opencl: "OFF" | ||
use_openmp: "OFF" | ||
- os: windows-2022 | ||
c-compiler: "cl.exe" | ||
cxx-compiler: "cl.exe" | ||
use_cuda: "OFF" | ||
use_opencl: "OFF" | ||
use_openmp: "ON" | ||
vcvars64: "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvars64.bat" | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Get CMake | ||
uses: lukka/get-cmake@latest | ||
|
||
- name: Install Catch2 | ||
if: matrix.os != 'windows-2022' | ||
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 | ||
shell: bash | ||
|
||
- name: Install Catch2 (windows) | ||
if: matrix.os == 'windows-2022' | ||
run: | | ||
call "${{ matrix.vcvars64 }}" | ||
git clone https://github.com/catchorg/Catch2.git | ||
cd Catch2 | ||
cmake -Bbuild -H. -DBUILD_TESTING=OFF | ||
cmake --build build/ --target install --config Release | ||
shell: cmd | ||
|
||
- name: Configure NiftyReg | ||
if: matrix.os != 'windows-2022' | ||
run: | | ||
mkdir build | ||
cd build | ||
cmake -DCMAKE_CXX_COMPILER=${{ matrix.cxx-compiler }} \ | ||
-DCMAKE_C_COMPILER=${{ matrix.c-compiler }} \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
-DBUILD_ALL_DEP=ON \ | ||
-DUSE_CUDA=${{ matrix.use_cuda }} \ | ||
-DUSE_OPENCL=${{ matrix.use_opencl }} \ | ||
-DUSE_SSE=ON \ | ||
-DUSE_OPENMP=${{ matrix.use_openmp }} \ | ||
-DBUILD_TESTING=ON \ | ||
.. | ||
shell: bash | ||
|
||
- name: Configure NiftyReg (windows) | ||
if: matrix.os == 'windows-2022' | ||
run: | | ||
mkdir build | ||
cd build | ||
call "${{ matrix.vcvars64 }}" | ||
cmake -DCMAKE_CXX_COMPILER=${{ matrix.cxx-compiler }} -DCMAKE_C_COMPILER=${{ matrix.c-compiler }} -DCMAKE_BUILD_TYPE=Release -DBUILD_ALL_DEP=ON -DUSE_CUDA=${{ matrix.use_cuda }} -DUSE_OPENCL=${{ matrix.use_opencl }} -DUSE_SSE=ON -DUSE_OPENMP=${{ matrix.use_openmp }} -DBUILD_TESTING=ON .. | ||
shell: cmd | ||
|
||
- name: Build NiftyReg | ||
if: matrix.os != 'windows-2022' | ||
run: cmake --build build --config Release | ||
shell: bash | ||
|
||
- name: Build NiftyReg (windows) | ||
if: matrix.os == 'windows-2022' | ||
run: | | ||
call "${{ matrix.vcvars64 }}" | ||
cmake --build build --config Release | ||
shell: cmd | ||
|
||
- name: Run tests | ||
if: matrix.os != 'windows-2022' | ||
run: ctest -V | ||
working-directory: build | ||
shell: bash | ||
|
||
- name: Run tests (windows) | ||
if: matrix.os == 'windows-2022' | ||
run: | | ||
call "${{ matrix.vcvars64 }}" | ||
ctest -V | ||
working-directory: build | ||
shell: cmd | ||
|
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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Prerequisites | ||
*.d | ||
|
||
# Compiled Object files | ||
*.slo | ||
*.lo | ||
*.o | ||
*.obj | ||
|
||
# Precompiled Headers | ||
*.gch | ||
*.pch | ||
|
||
# Compiled Dynamic libraries | ||
*.so | ||
*.dylib | ||
*.dll | ||
|
||
# Fortran module files | ||
*.mod | ||
*.smod | ||
|
||
# Compiled Static libraries | ||
*.lai | ||
*.la | ||
*.a | ||
*.lib | ||
|
||
# Executables | ||
*.exe | ||
*.out | ||
*.app | ||
|
||
# IDE | ||
.idea | ||
|
||
# Mac trash folder | ||
.DS_Store | ||
|
||
# Build | ||
build |
Oops, something went wrong.