-
Notifications
You must be signed in to change notification settings - Fork 3
93 lines (78 loc) · 3.05 KB
/
regression-tests.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
name: Regression Tests
on: [push]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
binarybh:
name: BinaryBH
runs-on: ubuntu-24.04
env:
AMREX_HOME: ${{ github.workspace }}/amrex
BINARYBH_EXAMPLE_DIR: ${{ github.workspace }}/GRTeclyn/Examples/BinaryBH
GCC_VERSION: 14
BUILD_ARGS: >
COMP=gnu
USE_MPI=TRUE
USE_CCACHE=TRUE
steps:
- name: Checkout AMReX
uses: actions/checkout@v4
with:
repository: AMReX-Codes/amrex
path: amrex
- name: Checkout GRTeclyn
uses: actions/checkout@v4
with:
path: GRTeclyn
- name: Set Up Cache
uses: actions/cache@v4
with:
path: ~/.cache/ccache
key: ccache-${{ github.workflow }}-${{ github.job }}-git-${{ github.sha }}
restore-keys: |
ccache-${{ github.workflow }}-${{ github.job }}-git-
- name: Update package manager database
id: update-database
continue-on-error: true
run: sudo apt-get update
# This is quite slow so only do this if the previous command fails
- name: Update package repository mirrors if necessary
if: steps.update-database.outcome == 'failure'
run: |
sudo gem install apt-spy2
sudo apt-spy2 fix --commit --launchpad --country=US
sudo apt-get update
- name: Install dependencies
run: sudo apt-get -y --no-install-recommends install libopenmpi-dev cpp-${{ env.GCC_VERSION }} ccache
- name: Set Compilers
run: |
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-${{ env.GCC_VERSION }} 1000
sudo update-alternatives --install /usr/bin/gfortran gfortran /usr/bin/gfortran-${{ env.GCC_VERSION }} 100
# workaround for https://answers.launchpad.net/ubuntu/+question/816000
sudo update-alternatives --remove-all cpp
sudo rm -rf /etc/alternatives/cpp
sudo update-alternatives --install /usr/bin/cpp cpp /usr/bin/cpp-${{ env.GCC_VERSION }} 1000
- name: Build BinaryBH example
run: make -j 4 ${{ env.BUILD_ARGS }}
working-directory: ${{ env.BINARYBH_EXAMPLE_DIR }}
- name: Build fcompare tool
run: make -j 4 ${{ env.BUILD_ARGS }}
working-directory: ${{ env.AMREX_HOME }}/Tools/Plotfile
- name: Run BinaryBH example using test parameters
run: mpiexec -n 2 ./main3d.gnu.MPI.ex ./params_test.txt
working-directory: ${{ env.BINARYBH_EXAMPLE_DIR }}
- name: Compare plotfile from final step with saved plotfile
run: |
mpiexec -n 1 \
${AMREX_HOME}/Tools/Plotfile/fcompare.gnu.MPI.ex \
--abs_tol 1e-10 \
--rel_tol 1e-10 \
--abort_if_not_all_found \
${GITHUB_WORKSPACE}/GRTeclyn/.github/workflows/data/plt00008_compare \
${BINARYBH_EXAMPLE_DIR}/plt00008
- name: Restart from last checkpoint and evolve for a few more steps
run: >
mpiexec -n 2 ./main3d.gnu.MPI.ex ./params_test.txt
amr.restart=chk00008 max_steps=12
working-directory: ${{ env.BINARYBH_EXAMPLE_DIR }}