Skip to content

Commit 4965896

Browse files
committed
Include preliminary job from separate YAML file
1 parent 6e4b089 commit 4965896

File tree

4 files changed

+154
-172
lines changed

4 files changed

+154
-172
lines changed

.azure-pipelines.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ pr:
1515
- Docs
1616
- .github/workflows/**
1717
- .azure-pipelines.yml
18+
- .pre-commit-config.yaml
1819

1920
jobs:
2021
- job:

.github/workflows/clang_sanitizers.yml

Lines changed: 135 additions & 171 deletions
Original file line numberDiff line numberDiff line change
@@ -11,176 +11,140 @@ concurrency:
1111
cancel-in-progress: true
1212

1313
jobs:
14-
15-
skip_checks:
16-
name: Skip checks?
17-
runs-on: macos-latest
18-
steps:
19-
- name: Checkout code
20-
uses: actions/checkout@v4
14+
- skip_checks:
15+
uses: .github/workflows/skip_checks.yml
16+
- build_UB_sanitizer:
17+
name: Clang UB sanitizer
18+
runs-on: ubuntu-22.04
19+
container: ubuntu:23.10
20+
needs: skip_checks
21+
if: ${{ github.event.pull_request.draft == false && needs.skip_checks.outputs.skip == false }}
22+
env:
23+
CC: clang
24+
CXX: clang++
25+
# On CI for this test, Ninja is slower than the default:
26+
#CMAKE_GENERATOR: Ninja
27+
steps:
28+
- uses: actions/checkout@v4
29+
- name: install dependencies
30+
run: |
31+
.github/workflows/dependencies/clang17.sh
32+
- name: CCache Cache
33+
uses: actions/cache@v4
2134
with:
22-
fetch-depth: 0
23-
- name: Run PR analysis script
35+
path: ~/.cache/ccache
36+
key: ccache-${{ github.workflow }}-${{ github.job }}-git-${{ github.sha }}
37+
restore-keys: |
38+
ccache-${{ github.workflow }}-${{ github.job }}-git-
39+
- name: build WarpX
2440
run: |
25-
.github/workflows/scripts/check_diff.sh \
26-
${{ github.event.pull_request.head.ref }} \
27-
${{ github.event.pull_request.base.ref }} \
28-
${{ github.event.pull_request.head.repo.clone_url }}
29-
outputs:
30-
skip: ${{ env.SKIP_CHECKS }}
31-
32-
build_UB_sanitizer:
33-
name: Clang UB sanitizer
34-
runs-on: ubuntu-22.04
35-
container: ubuntu:23.10
36-
needs: skip_checks
37-
if: ${{ github.event.pull_request.draft == false && needs.skip_checks.outputs.skip == false }}
38-
env:
39-
CC: clang
40-
CXX: clang++
41-
# On CI for this test, Ninja is slower than the default:
42-
#CMAKE_GENERATOR: Ninja
43-
steps:
44-
- uses: actions/checkout@v4
45-
- name: install dependencies
46-
run: |
47-
.github/workflows/dependencies/clang17.sh
48-
- name: CCache Cache
49-
uses: actions/cache@v4
50-
with:
51-
path: ~/.cache/ccache
52-
key: ccache-${{ github.workflow }}-${{ github.job }}-git-${{ github.sha }}
53-
restore-keys: |
54-
ccache-${{ github.workflow }}-${{ github.job }}-git-
55-
- name: build WarpX
56-
run: |
57-
export CCACHE_COMPRESS=1
58-
export CCACHE_COMPRESSLEVEL=10
59-
export CCACHE_MAXSIZE=100M
60-
ccache -z
61-
62-
export CXX=$(which clang++-17)
63-
export CC=$(which clang-17)
64-
export CXXFLAGS="-fsanitize=undefined,address,pointer-compare -fno-sanitize-recover=all"
65-
66-
cmake -S . -B build \
67-
-GNinja \
68-
-DCMAKE_VERBOSE_MAKEFILE=ON \
69-
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
70-
-DWarpX_DIMS="RZ;1;2;3" \
71-
-DWarpX_FFT=ON \
72-
-DWarpX_QED=ON \
73-
-DWarpX_QED_TABLE_GEN=ON \
74-
-DWarpX_OPENPMD=ON \
75-
-DWarpX_PRECISION=SINGLE \
76-
-DWarpX_PARTICLE_PRECISION=SINGLE
77-
cmake --build build -j 4
78-
79-
ccache -s
80-
du -hs ~/.cache/ccache
81-
82-
- name: run with UB sanitizer
83-
run: |
84-
85-
# We need these two lines because these tests run inside a docker container
86-
export OMPI_ALLOW_RUN_AS_ROOT=1
87-
export OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1
88-
89-
export OMP_NUM_THREADS=2
90-
91-
#MPI implementations often leak memory
92-
export "ASAN_OPTIONS=detect_leaks=0"
93-
94-
mpirun -n 2 ./build/bin/warpx.rz Examples/Physics_applications/laser_acceleration/inputs_base_rz
95-
mpirun -n 2 ./build/bin/warpx.1d Examples/Physics_applications/laser_acceleration/inputs_base_1d
96-
mpirun -n 2 ./build/bin/warpx.2d Examples/Physics_applications/laser_acceleration/inputs_base_2d
97-
mpirun -n 2 ./build/bin/warpx.3d Examples/Physics_applications/laser_acceleration/inputs_base_3d
98-
99-
build_thread_sanitizer:
100-
name: Clang thread sanitizer
101-
runs-on: ubuntu-22.04
102-
container: ubuntu:23.10
103-
needs: skip_checks
104-
if: ${{ github.event.pull_request.draft == false && needs.skip_checks.outputs.skip == false }}
105-
env:
106-
CC: clang
107-
CXX: clang++
108-
# On CI for this test, Ninja is slower than the default:
109-
#CMAKE_GENERATOR: Ninja
110-
steps:
111-
- uses: actions/checkout@v4
112-
- name: install dependencies
113-
run: |
114-
.github/workflows/dependencies/clang17.sh
115-
- name: CCache Cache
116-
uses: actions/cache@v4
117-
with:
118-
path: ~/.cache/ccache
119-
key: ccache-${{ github.workflow }}-${{ github.job }}-git-${{ github.sha }}
120-
restore-keys: |
121-
ccache-${{ github.workflow }}-${{ github.job }}-git-
122-
- name: build WarpX
123-
run: |
124-
export CCACHE_COMPRESS=1
125-
export CCACHE_COMPRESSLEVEL=10
126-
export CCACHE_MAXSIZE=100M
127-
ccache -z
128-
129-
export CXX=$(which clang++-17)
130-
export CC=$(which clang-17)
131-
export CXXFLAGS="-fsanitize=thread"
132-
133-
cmake -S . -B build \
134-
-GNinja \
135-
-DCMAKE_VERBOSE_MAKEFILE=ON \
136-
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
137-
-DWarpX_DIMS="RZ;1;2;3" \
138-
-DWarpX_FFT=ON \
139-
-DWarpX_QED=ON \
140-
-DWarpX_QED_TABLE_GEN=ON \
141-
-DWarpX_OPENPMD=ON \
142-
-DWarpX_EB=OFF \
143-
-DWarpX_PRECISION=DOUBLE \
144-
-DWarpX_PARTICLE_PRECISION=DOUBLE
145-
cmake --build build -j 4
146-
147-
cmake -S . -B build_EB \
148-
-GNinja \
149-
-DCMAKE_VERBOSE_MAKEFILE=ON \
150-
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
151-
-DWarpX_DIMS="2" \
152-
-DWarpX_FFT=ON \
153-
-DWarpX_QED=ON \
154-
-DWarpX_QED_TABLE_GEN=ON \
155-
-DWarpX_OPENPMD=ON \
156-
-DWarpX_EB=ON \
157-
-DWarpX_PRECISION=DOUBLE \
158-
-DWarpX_PARTICLE_PRECISION=DOUBLE
159-
cmake --build build_EB -j 4
160-
161-
ccache -s
162-
du -hs ~/.cache/ccache
163-
164-
- name: run with thread sanitizer
165-
run: |
166-
export PMIX_MCA_gds=hash
167-
export TSAN_OPTIONS='ignore_noninstrumented_modules=1'
168-
export ARCHER_OPTIONS="verbose=1"
169-
170-
# We need these two lines because these tests run inside a docker container
171-
export OMPI_ALLOW_RUN_AS_ROOT=1
172-
export OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1
173-
174-
export OMP_NUM_THREADS=2
175-
176-
mpirun -n 2 ./build/bin/warpx.rz Examples/Physics_applications/laser_acceleration/inputs_base_rz warpx.serialize_initial_conditions = 0
177-
mpirun -n 2 ./build/bin/warpx.1d Examples/Physics_applications/laser_acceleration/inputs_base_1d warpx.serialize_initial_conditions = 0
178-
mpirun -n 2 ./build/bin/warpx.2d Examples/Physics_applications/laser_acceleration/inputs_base_2d warpx.serialize_initial_conditions = 0
179-
mpirun -n 2 ./build/bin/warpx.3d Examples/Physics_applications/laser_acceleration/inputs_base_3d warpx.serialize_initial_conditions = 0
180-
181-
git clone https://github.com/ECP-WarpX/warpx-data ../warpx-data
182-
cd Examples/Tests/embedded_circle
183-
184-
ulimit -c unlimited
185-
186-
mpirun -n 2 ../../../build_EB/bin/warpx.2d inputs_test_2d_embedded_circle warpx.serialize_initial_conditions = 0
41+
export CCACHE_COMPRESS=1
42+
export CCACHE_COMPRESSLEVEL=10
43+
export CCACHE_MAXSIZE=100M
44+
ccache -z
45+
export CXX=$(which clang++-17)
46+
export CC=$(which clang-17)
47+
export CXXFLAGS="-fsanitize=undefined,address,pointer-compare -fno-sanitize-recover=all"
48+
cmake -S . -B build \
49+
-GNinja \
50+
-DCMAKE_VERBOSE_MAKEFILE=ON \
51+
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
52+
-DWarpX_DIMS="RZ;1;2;3" \
53+
-DWarpX_FFT=ON \
54+
-DWarpX_QED=ON \
55+
-DWarpX_QED_TABLE_GEN=ON \
56+
-DWarpX_OPENPMD=ON \
57+
-DWarpX_PRECISION=SINGLE \
58+
-DWarpX_PARTICLE_PRECISION=SINGLE
59+
cmake --build build -j 4
60+
ccache -s
61+
du -hs ~/.cache/ccache
62+
- name: run with UB sanitizer
63+
run: |
64+
# We need these two lines because these tests run inside a docker container
65+
export OMPI_ALLOW_RUN_AS_ROOT=1
66+
export OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1
67+
export OMP_NUM_THREADS=2
68+
#MPI implementations often leak memory
69+
export "ASAN_OPTIONS=detect_leaks=0"
70+
mpirun -n 2 ./build/bin/warpx.rz Examples/Physics_applications/laser_acceleration/inputs_base_rz
71+
mpirun -n 2 ./build/bin/warpx.1d Examples/Physics_applications/laser_acceleration/inputs_base_1d
72+
mpirun -n 2 ./build/bin/warpx.2d Examples/Physics_applications/laser_acceleration/inputs_base_2d
73+
mpirun -n 2 ./build/bin/warpx.3d Examples/Physics_applications/laser_acceleration/inputs_base_3d
74+
- build_thread_sanitizer:
75+
name: Clang thread sanitizer
76+
runs-on: ubuntu-22.04
77+
container: ubuntu:23.10
78+
needs: skip_checks
79+
if: ${{ github.event.pull_request.draft == false && needs.skip_checks.outputs.skip == false }}
80+
env:
81+
CC: clang
82+
CXX: clang++
83+
# On CI for this test, Ninja is slower than the default:
84+
#CMAKE_GENERATOR: Ninja
85+
steps:
86+
- uses: actions/checkout@v4
87+
- name: install dependencies
88+
run: |
89+
.github/workflows/dependencies/clang17.sh
90+
- name: CCache Cache
91+
uses: actions/cache@v4
92+
with:
93+
path: ~/.cache/ccache
94+
key: ccache-${{ github.workflow }}-${{ github.job }}-git-${{ github.sha }}
95+
restore-keys: |
96+
ccache-${{ github.workflow }}-${{ github.job }}-git-
97+
- name: build WarpX
98+
run: |
99+
export CCACHE_COMPRESS=1
100+
export CCACHE_COMPRESSLEVEL=10
101+
export CCACHE_MAXSIZE=100M
102+
ccache -z
103+
export CXX=$(which clang++-17)
104+
export CC=$(which clang-17)
105+
export CXXFLAGS="-fsanitize=thread"
106+
cmake -S . -B build \
107+
-GNinja \
108+
-DCMAKE_VERBOSE_MAKEFILE=ON \
109+
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
110+
-DWarpX_DIMS="RZ;1;2;3" \
111+
-DWarpX_FFT=ON \
112+
-DWarpX_QED=ON \
113+
-DWarpX_QED_TABLE_GEN=ON \
114+
-DWarpX_OPENPMD=ON \
115+
-DWarpX_EB=OFF \
116+
-DWarpX_PRECISION=DOUBLE \
117+
-DWarpX_PARTICLE_PRECISION=DOUBLE
118+
cmake --build build -j 4
119+
cmake -S . -B build_EB \
120+
-GNinja \
121+
-DCMAKE_VERBOSE_MAKEFILE=ON \
122+
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
123+
-DWarpX_DIMS="2" \
124+
-DWarpX_FFT=ON \
125+
-DWarpX_QED=ON \
126+
-DWarpX_QED_TABLE_GEN=ON \
127+
-DWarpX_OPENPMD=ON \
128+
-DWarpX_EB=ON \
129+
-DWarpX_PRECISION=DOUBLE \
130+
-DWarpX_PARTICLE_PRECISION=DOUBLE
131+
cmake --build build_EB -j 4
132+
ccache -s
133+
du -hs ~/.cache/ccache
134+
- name: run with thread sanitizer
135+
run: |
136+
export PMIX_MCA_gds=hash
137+
export TSAN_OPTIONS='ignore_noninstrumented_modules=1'
138+
export ARCHER_OPTIONS="verbose=1"
139+
# We need these two lines because these tests run inside a docker container
140+
export OMPI_ALLOW_RUN_AS_ROOT=1
141+
export OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1
142+
export OMP_NUM_THREADS=2
143+
mpirun -n 2 ./build/bin/warpx.rz Examples/Physics_applications/laser_acceleration/inputs_base_rz warpx.serialize_initial_conditions = 0
144+
mpirun -n 2 ./build/bin/warpx.1d Examples/Physics_applications/laser_acceleration/inputs_base_1d warpx.serialize_initial_conditions = 0
145+
mpirun -n 2 ./build/bin/warpx.2d Examples/Physics_applications/laser_acceleration/inputs_base_2d warpx.serialize_initial_conditions = 0
146+
mpirun -n 2 ./build/bin/warpx.3d Examples/Physics_applications/laser_acceleration/inputs_base_3d warpx.serialize_initial_conditions = 0
147+
git clone https://github.com/ECP-WarpX/warpx-data ../warpx-data
148+
cd Examples/Tests/embedded_circle
149+
ulimit -c unlimited
150+
mpirun -n 2 ../../../build_EB/bin/warpx.2d inputs_test_2d_embedded_circle warpx.serialize_initial_conditions = 0

.github/workflows/skip_checks.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Skip checks
2+
jobs:
3+
skip_checks:
4+
runs-on: ubuntu-latest
5+
steps:
6+
- name: Checkout code
7+
uses: actions/checkout@v4
8+
with:
9+
fetch-depth: 0
10+
- name: Run PR analysis script
11+
run: |
12+
.github/workflows/scripts/check_diff.sh \
13+
${{ github.event.pull_request.head.ref }} \
14+
${{ github.event.pull_request.base.ref }} \
15+
${{ github.event.pull_request.head.repo.clone_url }}
16+
outputs:
17+
skip: ${{ env.SKIP_CHECKS }}

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ repos:
2727
- id: mixed-line-ending
2828
- id: check-json
2929
- id: check-toml
30-
- id: check-yaml
30+
#- id: check-yaml
3131
- id: check-added-large-files
3232
args: ['--maxkb=40']
3333
- id: requirements-txt-fixer

0 commit comments

Comments
 (0)