Skip to content

Commit 63b3fb2

Browse files
committed
Debugging: include preliminary job from separate file
1 parent 6e4b089 commit 63b3fb2

File tree

5 files changed

+26
-39
lines changed

5 files changed

+26
-39
lines changed

.azure-pipelines.yml

+1
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

+1-37
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,8 @@ concurrency:
1111
cancel-in-progress: true
1212

1313
jobs:
14-
1514
skip_checks:
16-
name: Skip checks?
17-
runs-on: macos-latest
18-
steps:
19-
- name: Checkout code
20-
uses: actions/checkout@v4
21-
with:
22-
fetch-depth: 0
23-
- name: Run PR analysis script
24-
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-
15+
uses: ./.github/workflows/skip_checks.yml
3216
build_UB_sanitizer:
3317
name: Clang UB sanitizer
3418
runs-on: ubuntu-22.04
@@ -58,11 +42,9 @@ jobs:
5842
export CCACHE_COMPRESSLEVEL=10
5943
export CCACHE_MAXSIZE=100M
6044
ccache -z
61-
6245
export CXX=$(which clang++-17)
6346
export CC=$(which clang-17)
6447
export CXXFLAGS="-fsanitize=undefined,address,pointer-compare -fno-sanitize-recover=all"
65-
6648
cmake -S . -B build \
6749
-GNinja \
6850
-DCMAKE_VERBOSE_MAKEFILE=ON \
@@ -75,27 +57,20 @@ jobs:
7557
-DWarpX_PRECISION=SINGLE \
7658
-DWarpX_PARTICLE_PRECISION=SINGLE
7759
cmake --build build -j 4
78-
7960
ccache -s
8061
du -hs ~/.cache/ccache
81-
8262
- name: run with UB sanitizer
8363
run: |
84-
8564
# We need these two lines because these tests run inside a docker container
8665
export OMPI_ALLOW_RUN_AS_ROOT=1
8766
export OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1
88-
8967
export OMP_NUM_THREADS=2
90-
9168
#MPI implementations often leak memory
9269
export "ASAN_OPTIONS=detect_leaks=0"
93-
9470
mpirun -n 2 ./build/bin/warpx.rz Examples/Physics_applications/laser_acceleration/inputs_base_rz
9571
mpirun -n 2 ./build/bin/warpx.1d Examples/Physics_applications/laser_acceleration/inputs_base_1d
9672
mpirun -n 2 ./build/bin/warpx.2d Examples/Physics_applications/laser_acceleration/inputs_base_2d
9773
mpirun -n 2 ./build/bin/warpx.3d Examples/Physics_applications/laser_acceleration/inputs_base_3d
98-
9974
build_thread_sanitizer:
10075
name: Clang thread sanitizer
10176
runs-on: ubuntu-22.04
@@ -125,11 +100,9 @@ jobs:
125100
export CCACHE_COMPRESSLEVEL=10
126101
export CCACHE_MAXSIZE=100M
127102
ccache -z
128-
129103
export CXX=$(which clang++-17)
130104
export CC=$(which clang-17)
131105
export CXXFLAGS="-fsanitize=thread"
132-
133106
cmake -S . -B build \
134107
-GNinja \
135108
-DCMAKE_VERBOSE_MAKEFILE=ON \
@@ -143,7 +116,6 @@ jobs:
143116
-DWarpX_PRECISION=DOUBLE \
144117
-DWarpX_PARTICLE_PRECISION=DOUBLE
145118
cmake --build build -j 4
146-
147119
cmake -S . -B build_EB \
148120
-GNinja \
149121
-DCMAKE_VERBOSE_MAKEFILE=ON \
@@ -157,30 +129,22 @@ jobs:
157129
-DWarpX_PRECISION=DOUBLE \
158130
-DWarpX_PARTICLE_PRECISION=DOUBLE
159131
cmake --build build_EB -j 4
160-
161132
ccache -s
162133
du -hs ~/.cache/ccache
163-
164134
- name: run with thread sanitizer
165135
run: |
166136
export PMIX_MCA_gds=hash
167137
export TSAN_OPTIONS='ignore_noninstrumented_modules=1'
168138
export ARCHER_OPTIONS="verbose=1"
169-
170139
# We need these two lines because these tests run inside a docker container
171140
export OMPI_ALLOW_RUN_AS_ROOT=1
172141
export OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1
173-
174142
export OMP_NUM_THREADS=2
175-
176143
mpirun -n 2 ./build/bin/warpx.rz Examples/Physics_applications/laser_acceleration/inputs_base_rz warpx.serialize_initial_conditions = 0
177144
mpirun -n 2 ./build/bin/warpx.1d Examples/Physics_applications/laser_acceleration/inputs_base_1d warpx.serialize_initial_conditions = 0
178145
mpirun -n 2 ./build/bin/warpx.2d Examples/Physics_applications/laser_acceleration/inputs_base_2d warpx.serialize_initial_conditions = 0
179146
mpirun -n 2 ./build/bin/warpx.3d Examples/Physics_applications/laser_acceleration/inputs_base_3d warpx.serialize_initial_conditions = 0
180-
181147
git clone https://github.com/ECP-WarpX/warpx-data ../warpx-data
182148
cd Examples/Tests/embedded_circle
183-
184149
ulimit -c unlimited
185-
186150
mpirun -n 2 ../../../build_EB/bin/warpx.2d inputs_test_2d_embedded_circle warpx.serialize_initial_conditions = 0

.github/workflows/scripts/check_diff.sh

+4-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ base_ref=${2}
1010
clone_url=${3}
1111

1212
# Set paths to ignore (FIXME update this before merging)
13-
paths_ignore="^(Docs|\.github)/|\.azure-pipelines\.yml$"
13+
paths_ignore="^(Docs|\.github)/|\.azure-pipelines\.yml$|\.pre-commit-config\.yaml$"
1414

1515
# Add forked repository as remote
1616
git remote add fork ${clone_url}
@@ -23,13 +23,16 @@ git fetch fork ${head_ref}
2323

2424
# Save output of git diff to inspect files changed
2525
git diff --name-only --diff-filter=ACMRTUXB origin/${base_ref}..fork/${head_ref} > check_diff.txt
26+
cat check_diff.txt
2627

2728
# Set skip variable after inspecting files changed
2829
skip=$(grep -v -E "${paths_ignore}" check_diff.txt)
2930

3031
# Set an environment variable based on the output
3132
if [ -z "$skip" ]; then
33+
echo "skip=true"
3234
echo "SKIP_CHECKS=true" >> $GITHUB_ENV
3335
else
36+
echo "skip=false"
3437
echo "SKIP_CHECKS=false" >> $GITHUB_ENV
3538
fi

.github/workflows/skip_checks.yml

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

.pre-commit-config.yaml

+1-1
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)