-
Notifications
You must be signed in to change notification settings - Fork 247
237 lines (205 loc) · 7.93 KB
/
nightly_build.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
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
name: Nightly Build
on:
pull_request:
paths:
- '.github/workflows/nightly_build.yml'
- '.github/workflows/configure.sh'
- '.github/workflows/configure.cmd'
- '.github/workflows/rocky_configure.sh'
schedule:
- cron: '0 1 * * *'
workflow_dispatch:
# for cancelling redundant runs
concurrency:
group: nightly-build-${{ github.head_ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
ubuntu-nightly:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
compiler: [gcc, clang]
env:
KRATOS_BUILD_TYPE: Release
KRATOS_CI_CORES: 4 # Current limits are 4 CPU and 16 GB Ram
OMPI_MCA_rmaps_base_oversubscribe: 1 # Allow oversubscription for MPI (needed for OpenMPI >= 3.0)
OMPI_MCA_btl_vader_single_copy_mechanism: none # suppressing some annoying OpenMPI messages
container:
image: kratosmultiphysics/kratos-image-ci-ubuntu-22-04:latest
options: --user 1001
steps:
- uses: actions/checkout@v4
- name: Installing dependencies
shell: bash
run: |
python3 -m pip install parameterized
- name: Build
shell: bash
run: |
if [ ${{ matrix.compiler }} = gcc ]; then
export CC=/usr/bin/gcc-12
export CXX=/usr/bin/g++-12
export KRATOS_CMAKE_OPTIONS_FLAGS="-DTRILINOS_EXCLUDE_AMESOS2_SOLVER=OFF"
export KRATOS_CMAKE_CXX_FLAGS="-Wignored-qualifiers"
elif [ ${{ matrix.compiler }} = clang ]; then
export CC=/usr/bin/clang-14
export CXX=/usr/bin/clang++-14
export KRATOS_CMAKE_OPTIONS_FLAGS="-DTRILINOS_EXCLUDE_AMESOS2_SOLVER=OFF"
else
echo 'Unsupported compiler: ${{ matrix.compiler }}'
exit 1
fi
source /opt/intel/oneapi/setvars.sh
cp .github/workflows/configure_core.sh configure.sh
bash configure.sh
rm -r ${GITHUB_WORKSPACE}/build
- name: Build Dependencies
shell: bash
run: |
if [ ${{ matrix.compiler }} = gcc ]; then
export CC=/usr/bin/gcc-12
export CXX=/usr/bin/g++-12
export KRATOS_CMAKE_OPTIONS_FLAGS="-DUSE_EIGEN_MKL=ON -DUSE_EIGEN_FEAST=ON -DMMG_ROOT=/external_libraries/mmg/mmg_5_5_1/ -DPMMG_ROOT=/external_libraries/ParMmg_5ffc6ad -DINCLUDE_PMMG=ON"
export KRATOS_CMAKE_CXX_FLAGS="-Wignored-qualifiers"
elif [ ${{ matrix.compiler }} = clang ]; then
export CC=/usr/bin/clang-14
export CXX=/usr/bin/clang++-14
export KRATOS_CMAKE_OPTIONS_FLAGS="-DMMG_ROOT=/external_libraries/mmg/mmg_5_5_1/"
else
echo 'Unsupported compiler: ${{ matrix.compiler }}'
exit 1
fi
source /opt/intel/oneapi/setvars.sh
cp .github/workflows/configure_dependencies.sh configure.sh
bash configure.sh
rm -r ${GITHUB_WORKSPACE}/build
- name: Build Core Apps
shell: bash
run: |
if [ ${{ matrix.compiler }} = gcc ]; then
export CC=/usr/bin/gcc-12
export CXX=/usr/bin/g++-12
export KRATOS_CMAKE_OPTIONS_FLAGS=""
export KRATOS_CMAKE_CXX_FLAGS="-Wignored-qualifiers"
elif [ ${{ matrix.compiler }} = clang ]; then
export CC=/usr/bin/clang-14
export CXX=/usr/bin/clang++-14
export KRATOS_CMAKE_OPTIONS_FLAGS=""
else
echo 'Unsupported compiler: ${{ matrix.compiler }}'
exit 1
fi
source /opt/intel/oneapi/setvars.sh
cp .github/workflows/configure_core_applications.sh configure.sh
bash configure.sh
rm -r ${GITHUB_WORKSPACE}/build
- name: Build Research Apps
shell: bash
run: |
if [ ${{ matrix.compiler }} = gcc ]; then
export CC=/usr/bin/gcc-12
export CXX=/usr/bin/g++-12
export KRATOS_CMAKE_OPTIONS_FLAGS=""
export KRATOS_CMAKE_CXX_FLAGS="-Wignored-qualifiers"
elif [ ${{ matrix.compiler }} = clang ]; then
export CC=/usr/bin/clang-14
export CXX=/usr/bin/clang++-14
export KRATOS_CMAKE_OPTIONS_FLAGS=""
else
echo 'Unsupported compiler: ${{ matrix.compiler }}'
exit 1
fi
source /opt/intel/oneapi/setvars.sh
cp .github/workflows/configure_research_applications.sh configure.sh
bash configure.sh
rm -r ${GITHUB_WORKSPACE}/build
- name: Running tests
shell: bash
run: |
source /opt/intel/oneapi/setvars.sh
export PYTHONPATH=${PYTHONPATH}:${GITHUB_WORKSPACE}/bin/${KRATOS_BUILD_TYPE}
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${GITHUB_WORKSPACE}/bin/${KRATOS_BUILD_TYPE}/libs
python3 kratos/python_scripts/testing/run_tests.py -l nightly -c python3
- name: Running Python MPI tests (2 Cores)
shell: bash
run: |
source /opt/intel/oneapi/setvars.sh
export OMP_NUM_THREADS=1
export PYTHONPATH=${PYTHONPATH}:${GITHUB_WORKSPACE}/bin/${KRATOS_BUILD_TYPE}
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${GITHUB_WORKSPACE}/bin/${KRATOS_BUILD_TYPE}/libs
python3 kratos/python_scripts/testing/run_python_mpi_tests.py -l mpi_nightly -n 2
- name: Running Python MPI tests (3 Cores)
shell: bash
run: |
source /opt/intel/oneapi/setvars.sh
export OMP_NUM_THREADS=1
export PYTHONPATH=${PYTHONPATH}:${GITHUB_WORKSPACE}/bin/${KRATOS_BUILD_TYPE}
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${GITHUB_WORKSPACE}/bin/${KRATOS_BUILD_TYPE}/libs
python3 kratos/python_scripts/testing/run_python_mpi_tests.py -l mpi_nightly -n 3
- name: Running Python MPI tests (4 Cores)
shell: bash
run: |
source /opt/intel/oneapi/setvars.sh
export OMP_NUM_THREADS=1
export PYTHONPATH=${PYTHONPATH}:${GITHUB_WORKSPACE}/bin/${KRATOS_BUILD_TYPE}
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${GITHUB_WORKSPACE}/bin/${KRATOS_BUILD_TYPE}/libs
python3 kratos/python_scripts/testing/run_python_mpi_tests.py -l mpi_nightly -n 4
windows-nightly:
runs-on: windows-2019
env:
KRATOS_BUILD_TYPE: Custom
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.8'
- name: Download boost
run: |
$url = "https://archives.boost.io/release/1.74.0/source/boost_1_74_0.tar.gz"
(New-Object System.Net.WebClient).DownloadFile($url, "$env:TEMP\boost.tar.gz")
7z.exe x "$env:TEMP\boost.tar.gz" -o"$env:TEMP\boostArchive" -y | Out-Null
7z.exe x "$env:TEMP\boostArchive" -o"$env:TEMP\boost" -y | Out-Null
- name: Installing dependencies
shell: cmd
run: |
pip install numpy
pip install h5py
pip install sympy
pip install scipy
pip install parameterized
- name: Build
shell: cmd
run: |
copy .\.github\workflows\configure.cmd
configure.cmd
- name: Running nightly tests
shell: cmd
run: |
set PYTHONPATH=%PYTHONPATH%;%GITHUB_WORKSPACE%/bin/%KRATOS_BUILD_TYPE%
set PATH=%PATH%;%GITHUB_WORKSPACE%/bin/%KRATOS_BUILD_TYPE%/libs
python kratos/python_scripts/testing/run_tests.py -l nightly -c python
rocky-nightly:
runs-on: ubuntu-latest
env:
KRATOS_BUILD_TYPE: Custom
container:
image: kratosmultiphysics/kratos-image-ci-rockylinux-8:latest
options: --user 1001
steps:
- uses: actions/checkout@v3
- name: Installing dependencies
shell: bash
run: |
python3.8 -m pip install parameterized
- name: Build
run: |
cp .github/workflows/rocky_configure.sh rocky_configure.sh
bash rocky_configure.sh
- name: Running nightly tests
run: |
export PYTHONPATH=${PYTHONPATH}:${GITHUB_WORKSPACE}/bin/Custom
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${GITHUB_WORKSPACE}/bin/Custom/libs
python3.8 kratos/python_scripts/testing/run_tests.py -l nightly -c python3.8