-
Notifications
You must be signed in to change notification settings - Fork 135
58 lines (55 loc) · 2.18 KB
/
generate_reference_test_data.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
name: "Generate reference test data"
on:
workflow_dispatch
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# We don't want to build openmpi each time this workflow is
# run. Setup caching of OpenMPI after it is built and installed.
# See "Caching dependencies to speed up workflows" on the GH
# actions docs.
- name: Cache OpenMPI
id: cache-openmpi
uses: actions/cache@v3
with:
path: openmpi-4.1.4/installed
key: openmpi-4.1.4
- name: Build openmpi
if: steps.cache-openmpi.outputs.cache-hit != 'true'
run: |
wget https://download.open-mpi.org/release/open-mpi/v4.1/openmpi-4.1.4.tar.gz
tar -xf openmpi-4.1.4.tar.gz
cd openmpi-4.1.4/ && mkdir installed
./configure --prefix=$(pwd)/installed
make all install
- name: Record metadata
run: |
echo $(date) > metadata.txt
echo "Incompact3d HEAD: $(git rev-parse HEAD)" >> metadata.txt
echo "make cmd: make" >> metadata.txt
echo "run cmd: mpirun -np 2 xcompact3d" >> metadata.txt
export PATH=$(pwd)/openmpi-4.1.4/installed/bin/:$PATH
echo "mpif90 version: $(mpif90 --version | head -1)" >> metadata.txt
echo "mpirun version: $(mpirun --version | head -1)" >> metadata.txt
mv metadata.txt tests/TGV-Taylor-Green-vortex/
- name: Build Incompact3d and run TGV reference test case
run: |
export PATH=$(pwd)/openmpi-4.1.4/installed/bin/:$PATH
export FC=mpif90
cmake -S . -B build
cmake --build build -j 2
cmake --install build
ctest --test-dir build
- name: Store new reference output
run: |
cp -v build/RunTests/RunTests/TGV-Taylor-Green-vortex/time_evol.dat tests/TGV-Taylor-Green-vortex/reference_time_evol.dat
- name: Create new Pull Request updating the reference output
uses: peter-evans/create-pull-request@v4
with:
title: Update reference output TGV data
commit-message: Update reference TGV data and metadata
add-paths: |
tests/TGV-Taylor-Green-vortex/reference_time_evol.dat
tests/TGV-Taylor-Green-vortex/metadata.txt