-
Notifications
You must be signed in to change notification settings - Fork 48
141 lines (121 loc) · 4.25 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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
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
strategy:
matrix:
include:
- mpi: ""
result-file: "changes-tests.diff"
unit-result-file: "changes-unit-tests.diff"
- mpi: "--mpi-f08"
result-file: "changes-tests-f08.diff"
unit-result-file: "changes-unit-tests-f08.diff"
- mpi: "--mpi-f77 --FFLAGS=-fallow-argument-mismatch"
result-file: "changes-tests-f77.diff"
unit-result-file: "changes-unit-tests-f77.diff"
runs-on: [ubuntu-latest]
container: geodynamics/rayleigh-buildenv-jammy
steps:
- uses: actions/checkout@v4
- 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 ${{ matrix.mpi }} --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: |
#Primary test (Chebyshev Mode)
cd "$GITHUB_WORKSPACE"/tests/c2001_case0
mpirun -np 4 ../../bin/rayleigh.dbg
# Finite-difference test (uniform grid)
cd "$GITHUB_WORKSPACE"/tests/c2001_case0_FD_uniform
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
# coupled bc test
cd "$GITHUB_WORKSPACE"
sh ./tests/coupled_bcs/run_test.sh
git diff > changes.diff
git diff --exit-code --name-only
- name: archive results
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.result-file }}
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@v4
with:
name: ${{ matrix.unit-result-file }}
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@v4
- uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: radev
environment-file: environment.yml
channel-priority: strict
auto-update-conda: true
miniconda-version: "latest"
- name: Build documentation
run: |
cd "$GITHUB_WORKSPACE"
make doc
- name: Build Rayleigh
run: |
cd "$GITHUB_WORKSPACE"
./configure --openblas --with-blas=$CONDA_PREFIX --with-fftw=$CONDA_PREFIX --FC=mpifort --FFLAGS_DBG='-O0 -g -fbounds-check -ffpe-trap=invalid,zero,overflow -fbacktrace -ffixed-line-length-132 -Wall'
make -j
make install
- name: Build Rayleigh (CMake)
run: |
cd "$GITHUB_WORKSPACE"
cmake -Bbuild
cmake --build build -j -t install