-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (57 loc) · 1.6 KB
/
test.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: test
on: push
env:
BUILD_TYPE: Debug
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: 'true'
# - name: Setup Fortran
# uses: awvwgk/setup-fortran@main
# id: setup-fortran
# with:
# compiler: gcc
# version: 11
# - name: Setup Python
# uses: actions/setup-python@v2
# with:
# python-version: 3.9
- uses: mamba-org/setup-micromamba@v2
with:
environment-name: test-env
create-args: >-
python
numpy
h5py
cmake
fypp
clang
gfortran
- name: Install dependencies
run: |
sudo apt update
sudo apt install valgrind
- name: configure cmake
shell: bash -el {0}
run: |
export CC="$(which clang)"
export CXX="$(which clang)"
export FC="$(which gfortran)"
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
shell: bash -el {0}
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: test
shell: bash -el {0}
working-directory: ${{github.workspace}}/build
run: |
./tests/test_radtran
valgrind --error-exitcode=1 --leak-check=full ./tests/test_radtran
./tests/test_adiabat
valgrind --error-exitcode=1 --leak-check=full ./tests/test_adiabat