-
Notifications
You must be signed in to change notification settings - Fork 1
124 lines (102 loc) · 4.12 KB
/
gcc_test.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
name: GCC Tests
on:
push:
branches:
- 'main'
pull_request:
branches:
- 'main'
jobs:
build-and-test:
runs-on: ubuntu-22.04
strategy:
matrix:
gcc-version: [9, 10, 11, 12]
mpi: ['FALSE', 'TRUE']
opt: ['FALSE', 'TRUE']
include:
- debug: 'TRUE'
opt: 'FALSE'
- debug: 'FALSE'
opt: 'TRUE'
name: GCC ${{ matrix.gcc-version }}, MPI = ${{ matrix.mpi }}, OPT = ${{ matrix.opt }}
env:
CHOMBO_HOME: ${{ github.workspace }}/Chombo/lib
GRCHOMBO_SOURCE: ${{ github.workspace }}/GRChombo/Source
GRDZHADZHA_SOURCE: ${{ github.workspace }}/GRDzhadzha/Source
OMP_NUM_THREADS: 1
BUILD_ARGS: MPI=${{ matrix.mpi}} OPT=${{ matrix.opt }} DEBUG=${{ matrix.debug }}
steps:
- name: Checkout Chombo from GRTLCollaboration
uses: actions/checkout@master
with:
repository: GRTLCollaboration/Chombo
token: ${{ secrets.CI_SECRET || github.token }}
path: Chombo
- name: Checkout GRChombo from GRTLCollaboration
uses: actions/checkout@master
with:
repository: GRTLCollaboration/GRChombo
token: ${{ secrets.CI_SECRET || github.token }}
path: GRChombo
- name: Checkout GRDzhadzha from GRTLCollaboration
uses: actions/checkout@master
with:
repository: GRTLCollaboration/GRDzhadzha
token: ${{ secrets.CI_SECRET || github.token }}
path: GRDzhadzha
- name: Checkout GRBoondi
uses: actions/checkout@master
with:
repository: ShaunFell/GRBoondi
token: ${{ secrets.CI_SECRET || github.token }}
path: GRBoondi
- 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 common dependencies
run: sudo apt-get -y --no-install-recommends install csh libhdf5-dev libblas-dev liblapack-dev libgetopt-complete-perl
- name: Install MPI dependencies
if: matrix.mpi == 'TRUE'
run: sudo apt-get -y --no-install-recommends install libhdf5-openmpi-dev petsc-dev openmpi-bin
- name: Set Compilers
run: |
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-${{ matrix.gcc-version }} 200
sudo update-alternatives --install /usr/bin/gfortran gfortran /usr/bin/gfortran-${{ matrix.gcc-version }} 200
sudo update-alternatives --install /usr/bin/cpp cpp /usr/bin/cpp-${{ matrix.gcc-version }} 200
# MUST reload intel environment variables to load in mpiicpc after 'Install Intel MPI'
- name: Build Chombo
run: |
cp $GITHUB_WORKSPACE/GRBoondi/InstallNotes/MakeDefsExamples/Make.defs.local.GNU $CHOMBO_HOME/mk/Make.defs.local
make -j 4 AMRTimeDependent AMRTools BaseTools BoxTools $BUILD_ARGS
working-directory: ${{ env.CHOMBO_HOME }}
- name: Build GRChombo Tests
run: |
rm -rf Tests/ApparentHorizonFinderTest2D
make test -j 4 $BUILD_ARGS
working-directory: ${{ github.workspace }}/GRChombo
- name: Run GRChombo Tests
run: |
make test run -j 2 $BUILD_ARGS
working-directory: ${{ github.workspace }}/GRChombo
- name: Build GRBoondi Tests
run: |
make test -j 4 $BUILD_ARGS
working-directory: ${{ github.workspace }}/GRBoondi
- name: Build GRBoondi Examples
run: |
make examples -j 4 $BUILD_ARGS
working-directory: ${{ github.workspace }}/GRBoondi
- name: Run GRBoondi Tests
run: |
export OMP_NUM_THREADS=4
make run -j 1 $BUILD_ARGS TestDirs='Tests/SimpleDataReader_test/'
working-directory: ${{ github.workspace }}/GRBoondi