-
Notifications
You must be signed in to change notification settings - Fork 59
80 lines (71 loc) · 2.21 KB
/
build_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
name: CI
# Controls when the action will run.
on:
pull_request:
branches:
- main
- '*-devel'
pull_request_review:
branches:
- main
- '*-devel'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build_and_test:
if: github.event_name != 'pull_request_review' ||
contains(github.event.pull_request.labels.*.name, 'auto-pr')
# The type of runner that the job will run on
runs-on: ubuntu-20.04
strategy:
matrix:
include:
- mode: debug
flag: -b
define:
- mode: debug
flag: -b
define: >-
-DPER_SPECIES_WEIGHT -DZERO_CURRENT_PARTICLES -DNO_PARTICLE_PROBES
-DPARTICLE_SHAPE_TOPHAT -DPARTICLE_ID -DPHOTONS -DTRIDENT_PHOTONS
-DBREMSSTRAHLUNG -DPARSER_DEBUG -DNO_IO -DCOLLISIONS_TEST
-DPER_PARTICLE_CHARGE_MASS -DPARSER_CHECKING -DNO_USE_ISATTY
-DWORK_DONE_INTEGRATED -DHC_PUSH -DNO_MPI3 -DDECK_DEBUG
- mode:
flag:
define:
env:
COMPILER: gfortran
MPIPROCS: 2
MODE: ${{ matrix.mode }}
DEFINE: ${{ matrix.define }}
GH_BASE: ${{ github.event.pull_request.base.ref }}
GH_HEAD: ${{ github.event.pull_request.head.ref }}
GH_SHA: ${{ github.event.pull_request.head.sha }}
steps:
- name: Install dependencies
run: sudo apt update &&
sudo apt install -y
python3-dev
python3-numpy
python3-nose
python3-matplotlib
libpython3-dev
mpich
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Merge branch
run: git config user.email "[email protected]" &&
git config user.name "test" &&
git checkout -b $GH_HEAD $GH_SHA &&
git checkout -b $GH_BASE origin/$GH_BASE &&
git merge --no-ff $GH_HEAD
- name: Cleanup
run: cd epoch1d && make cleanall &&
cd ../epoch2d && make cleanall &&
cd ../epoch3d && make cleanall
- name: Compile and run tests
run: ./scripts/run-tests-epoch-all.sh ${{ matrix.flag }}