github actions #270
Workflow file for this run
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: test | |
on: push | |
env: | |
BUILD_TYPE: Release | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Fortran | |
uses: awvwgk/setup-fortran@main | |
id: setup-fortran | |
with: | |
compiler: gcc | |
version: 11 | |
- uses: mamba-org/setup-micromamba@v2 | |
with: | |
environment-name: test-env | |
create-args: >- | |
photochem_clima_data | |
python | |
numpy | |
scipy | |
pyyaml | |
numba | |
astropy | |
h5py | |
threadpoolctl | |
scikit-build | |
cmake | |
ninja | |
cython | |
fypp | |
pip | |
c-compiler | |
cxx-compiler | |
fortran-compiler | |
- name: Install Valgrind | |
run: | | |
sudo apt install valgrind | |
- name: configure cmake | |
shell: bash -el {0} | |
run: | | |
export CONDA_PREFIX_SAVE=$CONDA_PREFIX | |
unset CONDA_PREFIX | |
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_PREFIX_PATH=$CONDA_PREFIX_SAVE | |
export CONDA_PREFIX=$CONDA_PREFIX_SAVE | |
- name: build fortran | |
shell: bash -el {0} | |
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} | |
- name: test fortran | |
working-directory: ${{github.workspace}}/build | |
run: | | |
valgrind --error-exitcode=1 --leak-check=full ./tests/memtest | |
valgrind --error-exitcode=1 --leak-check=full ./tests/memtest_evo | |
- name: build python | |
shell: bash -el {0} | |
run: | | |
export CMAKE_ARGS="-DCMAKE_PREFIX_PATH=$CONDA_PREFIX -DCMAKE_POSITION_INDEPENDENT_CODE=ON" | |
export CONDA_PREFIX_SAVE=$CONDA_PREFIX | |
unset CONDA_PREFIX | |
python -m pip install --no-deps --no-build-isolation . -v | |
export CONDA_PREFIX=$CONDA_PREFIX_SAVE |