-
Notifications
You must be signed in to change notification settings - Fork 48
115 lines (97 loc) · 3.27 KB
/
main.yml
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
name: continuous-integration
on: pull_request
concurrency:
group: ${{ github.actor }}-${{ github.ref }}
cancel-in-progress: true
env:
OMPI_MCA_btl_base_warn_component_unused: 0
OMPI_MCA_mpi_yield_when_idle: 1
OMPI_MCA_rmaps_base_oversubscribe: 1
OMPI_ALLOW_RUN_AS_ROOT: 1
OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1
# Fix OpenMPI issue in Docker : https://github.com/open-mpi/ompi/issues/4948
OMPI_MCA_btl_vader_single_copy_mechanism: none
jobs:
test:
name: linux-jammy-container-build
runs-on: [ubuntu-latest]
container: geodynamics/rayleigh-buildenv-jammy
steps:
- uses: actions/checkout@v3
- name: Build documentation
# First make sure notebooks do not contain output, then build doc
run: |
# this is to fix GIT not liking owner of the checkout dir
# see https://github.com/actions/runner/issues/2033
chown -R $(id -u):$(id -g) $PWD
cd "$GITHUB_WORKSPACE"
make clear_ipynb && git diff --exit-code --name-only
make doc
- name: Build Rayleigh
# Now build Rayleigh itself
run: |
./configure -debian-mkl --FFLAGS_DBG='-O0 -g -fbounds-check -ffpe-trap=invalid,zero,overflow -fbacktrace -ffixed-line-length-132 -Wall'
make fdeps && git diff --exit-code
make -j
make install
- name: Test
run: |
cd "$GITHUB_WORKSPACE"/tests/c2001_case0
mpirun -np 4 ../../bin/rayleigh.dbg
# Generic input test
cd "$GITHUB_WORKSPACE"
sh ./tests/generic_input/run_test.sh
# chi scalar test
cd "$GITHUB_WORKSPACE"
sh ./tests/chi_scalar/run_test.sh
# custom reference state test
cd "$GITHUB_WORKSPACE"
sh ./tests/custom_reference/run_test.sh
git diff > changes.diff
git diff --exit-code --name-only
- name: archive results
uses: actions/upload-artifact@v2
with:
name: changes-tests.diff
path: changes.diff
- name: Unit Tests
run: |
cd "$GITHUB_WORKSPACE"/tests/unit_tests/SHT
mpirun -np 4 ../../../bin/rayleigh.dbg > expected_output.out
git diff > changes.diff
git diff --exit-code --name-only
- name: archive results
uses: actions/upload-artifact@v2
with:
name: changes-unit-tests.diff
path: tests/unit_tests/SHT/changes.diff
conda:
name: conda-build
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
# Needs to be here to properly detect changes to conda
# see https://github.com/conda-incubator/setup-miniconda#IMPORTANT
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: radev
environment-file: environment.yml
channel-priority: strict
- name: Build documentation
continue-on-error: true
run: |
cd "$GITHUB_WORKSPACE"
make doc
- name: Build Rayleigh
run: |
cd "$GITHUB_WORKSPACE"
export MKLROOT=$CONDA_PREFIX
./configure -conda-mkl --FC=mpifort --FFLAGS_DBG='-O0 -g -fbounds-check -ffpe-trap=invalid,zero,overflow -fbacktrace -ffixed-line-length-132 -Wall'
make -j
make install