Skip to content

Commit f5dd440

Browse files
committed
simplify ci
1 parent 6d76a57 commit f5dd440

File tree

3 files changed

+13
-34
lines changed

3 files changed

+13
-34
lines changed

.github/actions/build_pandas/action.yml

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ inputs:
44
editable:
55
description: Whether to build pandas in editable mode (default true)
66
default: true
7-
sanitize:
8-
description: Whether sanitizers should be used or not
9-
default: false
7+
meson_args:
8+
description: Extra flags to pass to meson
9+
required: false
1010
runs:
1111
using: composite
1212
steps:
@@ -28,20 +28,8 @@ runs:
2828
- name: Build Pandas
2929
run: |
3030
if [[ ${{ inputs.editable }} == "true" ]]; then
31-
if [[ ${{ inputs.sanitize }} == "true" ]]; then
32-
CFLAGS="$CFLAGS -fno-sanitize-recover=all" \
33-
pip install -e . --no-build-isolation -v \
34-
--config-settings=setup-args="-Db_sanitize=address,undefined" --no-deps
35-
else
36-
pip install -e . --no-build-isolation -v --no-deps
37-
fi
31+
pip install -e . --no-build-isolation -v --no-deps ${{ inputs.meson_args }}
3832
else
39-
if [[ ${{ inputs.sanitize }} == "true" ]]; then
40-
CFLAGS="$CFLAGS -fno-sanitize-recover=all" \
41-
pip install . --no-build-isolation -v \
42-
--config-settings=setup-args="-Db_sanitize=address,undefined" --no-deps
43-
else
44-
pip install . --no-build-isolation -v --no-deps
45-
fi
33+
pip install . --no-build-isolation -v --no-deps ${{ inputs.meson_args }}
4634
fi
4735
shell: bash -el {0}

.github/actions/run-tests/action.yml

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,9 @@
11
name: Run tests and report results
2-
inputs:
3-
sanitize:
4-
description: Whether sanitizers should be used or not
5-
default: false
62
runs:
73
using: composite
84
steps:
95
- name: Test
10-
run: |
11-
if [[ ${{ inputs.sanitize }} == "true" ]]; then
12-
ASAN_OPTIONS=detect_leaks=0 \
13-
LD_PRELOAD=$(gcc -print-file-name=libasan.so) \
14-
ci/run_tests.sh
15-
else
16-
ci/run_tests.sh
17-
fi
6+
run: ci/run_tests.sh
187
shell: bash -el {0}
198

209
- name: Publish test results

.github/workflows/unit-tests.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -323,25 +323,27 @@ jobs:
323323
id: build
324324
uses: ./.github/actions/build_pandas
325325
with:
326-
sanitize: true
326+
meson_args: --config-settings=setup-args="-Db_sanitize=address,undefined"
327+
env:
328+
CFLAGS="$CFLAGS -fno-sanitize-recover=all"
327329

328330
- name: Test (not single_cpu)
329331
uses: ./.github/actions/run-tests
330-
with:
331-
sanitize: true
332332
env:
333333
PATTERN: "not slow and not network and not single_cpu and not known_ub"
334334
PYTEST_WORKERS: 'auto'
335335
PYTEST_TARGET: 'pandas'
336+
ASAN_OPTIONS: detect_leaks=0
337+
LD_PRELOAD: $(gcc -print-file-name=libasan.so)
336338

337339
- name: Test (single_cpu)
338340
uses: ./.github/actions/run-tests
339-
with:
340-
sanitize: true
341341
env:
342342
PATTERN: "single_cpu and not known_ub"
343343
PYTEST_WORKERS: 0
344344
PYTEST_TARGET: 'pandas'
345+
ASAN_OPTIONS: detect_leaks=0
346+
LD_PRELOAD: $(gcc -print-file-name=libasan.so)
345347

346348
python-dev:
347349
# This job may or may not run depending on the state of the next

0 commit comments

Comments
 (0)