forked from CRPropa/CRPropa3
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request CRPropa#357 from lukasmerten/CICD
Testing of CRPropa
- Loading branch information
Showing
6 changed files
with
116 additions
and
158 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,109 @@ | ||
name: crpropa-testing | ||
on: [push] | ||
|
||
jobs: | ||
linux: | ||
runs-on: ${{ matrix.config.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
config: | ||
- name: "ubuntu-20" | ||
os: ubuntu-latest | ||
cxx: "g++-9" | ||
cc: "gcc-9" | ||
fc: "gfortran-9" | ||
swig_builtin: "Off" #uses swig 4.0.1 | ||
py: "/usr/bin/python3" | ||
cov: "On" | ||
- name: "ubuntu-18_py3" | ||
os: ubuntu-18.04 | ||
cxx: "g++-7" | ||
cc: "gcc-7" | ||
fc: "gfortran-7" | ||
swig_builtin: "Off" #uses swig 3.x | ||
py: "/usr/bin/python3" | ||
- name: "ubuntu-18_py2" | ||
os: ubuntu-18.04 | ||
cxx: "g++-7" | ||
cc: "gcc-7" | ||
fc: "gfortran-7" | ||
swig_builtin: "Off" #uses swig 3.x | ||
py: "/usr/bin/python2" | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
- name: Preinstall | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install libmuparser-dev python3-dev python-dev python3-numpy python-numpy python3-setuptools python-setuptools libhdf5-serial-dev libomp5 libomp-dev libfftw3-dev libcfitsio-dev lcov | ||
- name: Set up the build | ||
env: | ||
CXX: ${{ matrix.config.cxx }} | ||
CC: ${{ matrix.config.cc }} | ||
FC: ${{ matrix.config.fc }} | ||
run: | | ||
mkdir build | ||
cd build | ||
cmake .. -DENABLE_PYTHON=True -DPYTHON_EXECUTABLE=${{ matrix.config.py }} -DENABLE_TESTING=On -DENABLE_SWIG_BUILTIN=${{ matrix.config.swig_builtin }} -DSIMD_EXTENSIONS=native | ||
- name: Build CRPropa | ||
run: | | ||
cd build | ||
make | ||
- name: Run tests | ||
run: | | ||
cd build | ||
make test | ||
- name: Archive test results | ||
if: always() | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: "test-report_${{matrix.config.name}}" | ||
path: build/Testing/Temporary/LastTest.log | ||
mac: | ||
runs-on: ${{ matrix.config.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
config: | ||
- name: "macos-1015" | ||
os: macos-10.15 | ||
cxx: "clang++" | ||
cc: "clang" | ||
fc: "gfortran-11" | ||
swig_builtin: "On" #uses swig 4.0.2 | ||
py: "/usr/bin/python" | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
- name: Preinstall | ||
run: | | ||
brew install hdf5 fftw cfitsio muparser libomp | ||
- name: Set up the build | ||
env: | ||
CXX: ${{ matrix.config.cxx }} | ||
CC: ${{ matrix.config.cc }} | ||
FC: ${{ matrix.config.fc }} | ||
CRPROPA_DATA_PATH: "/Users/runner/work/CRPropa3/CRPropa3/build/data" | ||
run: | | ||
mkdir build | ||
cd build | ||
cmake .. -DENABLE_PYTHON=True -DPYTHON_EXECUTABLE=${{ matrix.config.py }} -DENABLE_TESTING=On -DENABLE_SWIG_BUILTIN=${{ matrix.config.swig_builtin }} | ||
- name: Build CRPropa | ||
run: | | ||
cd build | ||
make | ||
- name: Run tests | ||
env: | ||
CRPROPA_DATA_PATH: "/Users/runner/work/CRPropa3/CRPropa3/build/data" | ||
run: | | ||
cd build | ||
make test | ||
- name: Archive test results | ||
if: always() | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: "test-report_${{matrix.config.name}}" | ||
path: build/Testing/Temporary/LastTest.log | ||
|
||
|
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,6 +1,3 @@ | ||
.* | ||
!.travis.yml | ||
|
||
*~ | ||
|
||
build* | ||
|
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
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
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