Generate reference test data #6
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |