Skip to content

Commit

Permalink
Create test_examples.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
JulienDoerner authored Oct 26, 2023
1 parent a007462 commit 4ac1307
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/test_examples.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: crpropa-testing
on: [push, pull_request]

jobs:
linux:
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- name: "ubuntu-20"
os: ubuntu-20.04
cxx: "g++-9"
cc: "gcc-9"
fc: "gfortran-9"
swig_builtin: "Off" #uses swig 4.0.1
py: "/usr/bin/python3" #python 3.8
steps:
- name: Checkout repository
uses: actions/checkout@v3
- 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
pip install jupyter
- 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=Off -DENABLE_SWIG_BUILTIN=${{ matrix.config.swig_builtin }} -DSIMD_EXTENSIONS=native
- name: Build CRPropa
run: |
cd build
make -j
make install
- name: convert notebooks to python
run: |
cd doc/pages/example_notebooks
export runfolder="notebook_run"
mkdir "$runfolder"
for file in ./*/*.ipynb; do
if [ -f "$file" ]; then
jupyter-nbconvert --to python "$file" --output-dir "$runfolder"
fi
done

0 comments on commit 4ac1307

Please sign in to comment.