-
Notifications
You must be signed in to change notification settings - Fork 238
176 lines (165 loc) · 5.52 KB
/
linux.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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
name: linux
on:
push:
branches:
- 'main'
- 'aspect-*'
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
OMPI_MCA_btl_vader_single_copy_mechanism: none
jobs:
linux-nounity:
#linux build with unity/precompiled headers disabled
name: no-unity-build
runs-on: [ubuntu-20.04]
steps:
- uses: actions/checkout@v4
- name: setup
run: |
sudo apt-get update
sudo apt-get install -y software-properties-common
sudo add-apt-repository ppa:ginggs/deal.ii-9.5.1-backports
sudo apt-get update
sudo apt-get install -yq --no-install-recommends libdeal.ii-dev
- name: compile
run: |
mkdir build-no-unity
cd build-no-unity
cmake -D CMAKE_BUILD_TYPE=Debug -D ASPECT_PRECOMPILE_HEADERS=OFF -D ASPECT_UNITY_BUILD=OFF -D CMAKE_CXX_FLAGS='-Werror' -D ASPECT_ADDITIONAL_CXX_FLAGS='-Wdeprecated-declarations' ..
make -j 4
./aspect --test
linux:
#linux build including indent, examples and documentation
name: indent+documentation
runs-on: [ubuntu-20.04]
steps:
- uses: actions/checkout@v4
- name: setup
run: |
sudo apt-get update
sudo apt-get install -y software-properties-common
sudo add-apt-repository ppa:ginggs/deal.ii-9.5.1-backports
sudo apt-get update
sudo apt-get install -yq --no-install-recommends texlive-plain-generic texlive-base texlive-latex-recommended texlive-latex-base texlive-fonts-recommended texlive-bibtex-extra lmodern texlive-latex-extra texlive-science graphviz python3-pip python-setuptools libdeal.ii-dev doxygen latexmk biber inkscape
doxygen --version
wget https://github.com/tjhei/astyle/releases/download/v2.04/astyle_2.04_linux.tar.gz
tar xf astyle_2.04_linux.tar.gz
cd astyle/build/gcc && make
sudo USER=root make install
cd
rm -rf astyle*
astyle --version
- name: make indent
run: |
./contrib/utilities/indent
git diff > changes-astyle.diff
- name: archive indent results
uses: actions/upload-artifact@v4
with:
name: changes-astyle.diff
path: changes-astyle.diff
- name: check indentation
run: |
git diff --exit-code
- name: citation list
run: |
cd doc
latexmk -pdf -f citations-list.tex
grep WARN citations-list.blg && echo "warnings found!" && exit 1
echo "OK"
- name: compile
run: |
mkdir build
cd build
/usr/bin/cmake -D CMAKE_BUILD_TYPE=Debug -D ASPECT_PRECOMPILE_HEADERS=ON -D ASPECT_UNITY_BUILD=ON \
-D CMAKE_CXX_FLAGS='-Werror' -D ASPECT_INSTALL_EXAMPLES=ON ..
make -j 4
./aspect --test
- name: doc
run: |
cd doc
export OMPI_MCA_btl="self,vader"
./update_parameters.sh $GITHUB_WORKSPACE/build/aspect
tests:
#linux build including tests
name: tests
runs-on: [ubuntu-latest]
strategy:
fail-fast: false
matrix:
include:
- image: "geodynamics/aspect-tester:focal-dealii-9.5-v3"
run-tests: "ON"
compare-tests: "ON"
result-file: "changes-test-results-9.5.diff"
container-options: '--name container'
- image: "geodynamics/aspect-tester:focal-dealii-master"
run-tests: "ON"
compare-tests: "OFF"
result-file: "changes-test-results-master.diff"
container-options: '--user 0 --name container'
container:
image: ${{ matrix.image }}
options: ${{ matrix.container-options }}
steps:
- uses: actions/checkout@v4
- name: compile
run: |
mkdir build
cd build
cmake \
-D CMAKE_BUILD_TYPE=Debug \
-G 'Ninja' \
-D CMAKE_CXX_FLAGS='-Werror' \
-D ASPECT_ADDITIONAL_CXX_FLAGS='-O3 -Wdeprecated-declarations' \
-D ASPECT_TEST_GENERATOR='Ninja' \
-D ASPECT_PRECOMPILE_HEADERS=ON \
-D ASPECT_UNITY_BUILD=ON \
-D ASPECT_RUN_ALL_TESTS='${{ matrix.run-tests }}' \
-D ASPECT_COMPARE_TEST_RESULTS='${{ matrix.compare-tests }}' \
-D CMAKE_UNITY_BUILD_BATCH_SIZE=8 \
..
ninja -j 4
./aspect --test
- name: prebuild tests
run: |
# prebuilding tests...
cd build/tests
ninja -k 0 tests || true
- name: report test results
continue-on-error: true
run: |
cd build
ctest \
--no-compress-output \
--test-action Test \
--output-on-failure || touch test_run_failed
- name: write test results
continue-on-error: true
run: |
cd build
# TODO: temporary fix for a git incompability.
# Can likely be removed when the tester image runs on Ubuntu 22.04
/usr/bin/git config --system --add safe.directory /__w/aspect/aspect
ninja generate_reference_output
git diff ../tests > ${{ matrix.result-file }}
- name: archive test results
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.result-file }}
path: build/${{ matrix.result-file }}
- name: check test results
run: |
if [ -f build/test_run_failed ] || [ -s build/${{ matrix.result-file}} ]; then
exit 1
else
exit 0
fi