-
Notifications
You must be signed in to change notification settings - Fork 324
132 lines (117 loc) · 3.96 KB
/
ubuntu-parallel.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
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
name: ubuntu-parallel
on:
push:
paths-ignore:
- '**.nix'
- 'flake.lock'
pull_request:
paths-ignore:
- '**.nix'
- 'flake.lock'
workflow_dispatch:
jobs:
ubuntu:
runs-on: self-hosted
name: ubuntu-parallel (${{ matrix.compiler }})
strategy:
# Allow other runners in the matrix to continue if some fail
fail-fast: false
matrix:
compiler: [gcc]
include:
- compiler: gcc
compiler-pkgs: "g++ gcc"
cc: "gcc"
cxx: "g++"
openmp-cmake-flags: "-WITH_OpenMP=ON"
env:
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}
steps:
- name: get CPU information
run: lscpu
- name: checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: install dependencies
run: |
sudo apt -qq update
sudo apt install -y ${{ matrix.compiler-pkgs }} cmake gfortran \
libhypre-dev libopenblas-dev libopenmpi-dev libmumps-dev \
libparmetis-dev libqwt-qt5-dev qtscript5-dev libqt5svg5-dev
- name: configure
run: |
mkdir ${GITHUB_WORKSPACE}/build
cd ${GITHUB_WORKSPACE}/build
cmake \
-DCMAKE_BUILD_TYPE="Release" \
-DCMAKE_INSTALL_PREFIX="${GITHUB_WORKSPACE}/usr" \
-DBLA_VENDOR="OpenBLAS" \
${{ matrix.openmp-cmake-flags }} \
-DWITH_LUA=ON \
-DWITH_Zoltan=ON \
-DWITH_Mumps=ON \
-DWITH_Hypre=ON \
-DHypre_INCLUDE_DIR="/usr/include/hypre" \
-DWITH_ELMERGUI=ON \
-DWITH_PARAVIEW=ON \
-DWITH_ELMERICE=ON \
-DCREATE_PKGCONFIG_FILE=ON \
-DWITH_MPI=ON \
-DMPI_TEST_MAXPROC=$(nproc) \
-DMPIEXEC_PREFLAGS="--allow-run-as-root" \
..
- name: build
run: |
cd ${GITHUB_WORKSPACE}/build
cmake --build . -j$(nproc)
- name: install
run: |
cd ${GITHUB_WORKSPACE}/build
cmake --install .
- name: check
id: run-ctest
timeout-minutes: 150
env:
CTEST_OUTPUT_ON_FAILURE: 1
run: |
cd ${GITHUB_WORKSPACE}/build
ctest . -j$(nproc) -L "parallel|fast"
- name: re-run tests
if: always() && (steps.run-ctest.outcome == 'failure')
timeout-minutes: 60
env:
CTEST_OUTPUT_ON_FAILURE: 1
run: |
cd ${GITHUB_WORKSPACE}/build
# get names of failed tests and strip potential "_np*" suffix
failed_tests=($(ctest . -N --rerun-failed | grep -E "Test\s+#.*" | awk '{print $3}' | sed -e 's/_np[0-9]*$//g'))
# remove duplicate test names
unique_failed_tests=($(echo "${failed_tests[@]}" | tr ' ' '\n' | sort -u | tr '\n' ' '))
for test in "${unique_failed_tests[@]}"; do
# check if test is from fem or ElmerIce
if [ -d fem/tests/${test} ]; then
test_root=fem/tests
else
test_root=elmerice/Tests
fi
echo "::group::Content of ${test_root}/${test}"
echo ---- Files ----
ls -Rl ${test_root}/${test}
if [ -f ${test_root}/${test}/test-stderr*.log ]; then
echo ---- Content of test-stderr*.log ----
cat ${test_root}/${test}/test-stderr*.log
fi
if [ -f ${test_root}/${test}/test-stdout*.log ]; then
echo ---- Content of test-stdout*.log ----
cat ${test_root}/${test}/test-stdout*.log
fi
echo "::endgroup::"
done
echo "::group::Re-run failing tests"
ctest --rerun-failed --output-on-failure || true
echo "::endgroup::"
echo "::group::Log from these tests"
[ ! -f Testing/Temporary/LastTest.log ] || cat Testing/Temporary/LastTest.log
echo "::endgroup::"