-
Notifications
You must be signed in to change notification settings - Fork 21
141 lines (118 loc) · 4.53 KB
/
ubuntu.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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
name: 🐧 OpenMP
on: [push, pull_request]
concurrency:
group: ${{ github.ref }}-${{ github.head_ref }}-ubuntu
cancel-in-progress: true
jobs:
build_gcc:
name: GCC w/ MPI w/ Python
runs-on: ubuntu-22.04
if: github.event.pull_request.draft == false
env:
CMAKE_GENERATOR: Ninja
CXXFLAGS: "-Werror"
OMP_NUM_THREADS: 2
steps:
- uses: actions/checkout@v4
- name: install dependencies
run: |
.github/workflows/dependencies/gcc-openmpi.sh
- name: CCache Cache
uses: actions/cache@v4
# - once stored under a key, they become immutable (even if local cache path content changes)
# - for a refresh the key has to change, e.g., hash of a tracked file in the key
with:
path: |
~/.ccache
~/.cache/ccache
key: ccache-openmp-gcc-${{ hashFiles('.github/workflows/ubuntu.yml') }}-${{ hashFiles('cmake/dependencies/ABLASTR.cmake') }}
restore-keys: |
ccache-openmp-gcc-${{ hashFiles('.github/workflows/ubuntu.yml') }}-
ccache-openmp-gcc-
- name: system info
run: |
cat /proc/cpuinfo
lscpu
- name: build ImpactX
run: |
cmake -S . -B build \
-DCMAKE_BUILD_TYPE=Debug \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DImpactX_FFT=ON \
-DImpactX_PYTHON=ON \
-DMPIEXEC_POSTFLAGS="--use-hwthread-cpus"
cmake --build build -j 4
- name: run tests
run: |
ctest --test-dir build --output-on-failure --label-exclude slow
- name: run installed app
run: |
sudo cmake --build build --target install
impactx.MPI.OMP.DP.OPMD.DEBUG examples/fodo/input_fodo.in algo.particle_shape = 1 || \
{ cat Backtrace.0.0; exit 1; }
impactx.MPI.OMP.DP.OPMD.DEBUG examples/fodo/input_fodo.in algo.particle_shape = 2 || \
{ cat Backtrace.0.0; exit 1; }
impactx.MPI.OMP.DP.OPMD.DEBUG examples/fodo/input_fodo.in algo.particle_shape = 3 || \
{ cat Backtrace.0.0; exit 1; }
- name: run installed python module
run: |
cmake --build build --target pip_install
python3 examples/fodo/run_fodo.py
- name: validate created openPMD files
run: find build -name *.h5 | xargs -n1 -I{} openPMD_check_h5 -i {}
build_gcc_python:
name: GCC w/o MPI w/ Python
runs-on: ubuntu-22.04
if: github.event.pull_request.draft == false
env:
CMAKE_GENERATOR: Ninja
CXXFLAGS: "-Werror"
OMP_NUM_THREADS: 2
steps:
- uses: actions/checkout@v4
- name: install dependencies
run: |
.github/workflows/dependencies/gcc.sh
- name: CCache Cache
uses: actions/cache@v4
# - once stored under a key, they become immutable (even if local cache path content changes)
# - for a refresh the key has to change, e.g., hash of a tracked file in the key
with:
path: |
~/.ccache
~/.cache/ccache
key: ccache-openmp-pygcc-${{ hashFiles('.github/workflows/ubuntu.yml') }}-${{ hashFiles('cmake/dependencies/ABLASTR.cmake') }}
restore-keys: |
ccache-openmp-pygcc-${{ hashFiles('.github/workflows/ubuntu.yml') }}-
ccache-openmp-pygcc-
- name: build ImpactX
run: |
cmake -S . -B build \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DImpactX_FFT=ON \
-DImpactX_MPI=OFF \
-DImpactX_PYTHON=ON
cmake --build build -j 4
- name: run tests
run: |
ctest --test-dir build --output-on-failure --label-exclude slow
- name: run installed app
run: |
sudo cmake --build build --target install
impactx.NOMPI.OMP.DP.OPMD.DEBUG examples/fodo/input_fodo.in algo.particle_shape = 1 || \
{ cat Backtrace.0.0; exit 1; }
impactx.NOMPI.OMP.DP.OPMD.DEBUG examples/fodo/input_fodo.in algo.particle_shape = 2 || \
{ cat Backtrace.0.0; exit 1; }
impactx.NOMPI.OMP.DP.OPMD.DEBUG examples/fodo/input_fodo.in algo.particle_shape = 3 || \
{ cat Backtrace.0.0; exit 1; }
- name: run installed python module
run: |
cmake --build build --target pip_install
python3 examples/fodo/run_fodo.py
- name: validate created openPMD files
run: find build -name *.h5 | xargs -n1 -I{} openPMD_check_h5 -i {}