forked from xcompact3d/Incompact3d
-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (53 loc) · 2.1 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
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@v2
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 test/data/Taylor-Green-Vortex/
- name: Build Incompact3d and run TGV reference test case
run: |
export PATH=$(pwd)/openmpi-4.1.4/installed/bin/:$PATH
make
cp test/data/Taylor-Green-Vortex/reference_input.i3d input.i3d
mpirun -np 2 xcompact3d
- name: Store new reference output
run: |
cp -v time_evol.dat test/data/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: |
test/data/Taylor-Green-Vortex/reference_time_evol.dat
test/data/Taylor-Green-Vortex/metadata.txt