Skip to content

Commit fdf445b

Browse files
committed
github: run integration tests with sanitizers
Running with sanitizers in CI will help prevent us from introducing new memory safety errors.
1 parent 01f9fa5 commit fdf445b

File tree

1 file changed

+71
-0
lines changed

1 file changed

+71
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,77 @@ jobs:
400400
sed -i 's/VALGRIND=0/VALGRIND=1/g' config.vars
401401
poetry run pytest tests/ -vvv -n 3 ${PYTEST_OPTS} ${{ matrix.PYTEST_OPTS }}
402402
403+
integration-sanitizers:
404+
name: Sanitizers Test CLN
405+
runs-on: ubuntu-22.04
406+
timeout-minutes: 120
407+
env:
408+
COMPAT: 1
409+
BITCOIN_VERSION: "25.0"
410+
ELEMENTS_VERSION: 22.0.2
411+
RUST_PROFILE: release
412+
ASAN: 1
413+
UBSAN: 1
414+
VALGRIND: 0
415+
DEVELOPER: 1
416+
SLOW_MACHINE: 1
417+
TEST_DEBUG: 1
418+
PYTEST_OPTS: --test-group-random-seed=42 --timeout=1800
419+
needs:
420+
- prebuild
421+
strategy:
422+
fail-fast: true
423+
matrix:
424+
include:
425+
- NAME: Sanitizers (01/10)
426+
PYTEST_OPTS: --test-group=1 --test-group-count=10
427+
- NAME: Sanitizers (02/10)
428+
PYTEST_OPTS: --test-group=2 --test-group-count=10
429+
- NAME: Sanitizers (03/10)
430+
PYTEST_OPTS: --test-group=3 --test-group-count=10
431+
- NAME: Sanitizers (04/10)
432+
PYTEST_OPTS: --test-group=4 --test-group-count=10
433+
- NAME: Sanitizers (05/10)
434+
PYTEST_OPTS: --test-group=5 --test-group-count=10
435+
- NAME: Sanitizers (06/10)
436+
PYTEST_OPTS: --test-group=6 --test-group-count=10
437+
- NAME: Sanitizers (07/10)
438+
PYTEST_OPTS: --test-group=7 --test-group-count=10
439+
- NAME: Sanitizers (08/10)
440+
PYTEST_OPTS: --test-group=8 --test-group-count=10
441+
- NAME: Sanitizers (09/10)
442+
PYTEST_OPTS: --test-group=9 --test-group-count=10
443+
- NAME: Sanitizers (10/10)
444+
PYTEST_OPTS: --test-group=10 --test-group-count=10
445+
steps:
446+
- name: Checkout
447+
uses: actions/checkout@v3
448+
449+
- name: Set up Python 3.7
450+
uses: actions/setup-python@v4
451+
with:
452+
python-version: 3.7
453+
454+
- name: Install dependencies
455+
run: |
456+
bash -x .github/scripts/setup.sh
457+
pip install -U pip wheel poetry
458+
# Export and then use pip to install into the current env
459+
poetry export -o /tmp/requirements.txt --without-hashes --with dev
460+
pip install -r /tmp/requirements.txt
461+
462+
- name: Install bitcoind
463+
run: .github/scripts/install-bitcoind.sh
464+
465+
- name: Build
466+
run: |
467+
./configure CC=clang
468+
make -j $(nproc)
469+
470+
- name: Test
471+
run: |
472+
poetry run pytest tests/ -vvv -n 3 ${PYTEST_OPTS} ${{ matrix.PYTEST_OPTS }}
473+
403474
gather:
404475
# A dummy task that depends on the full matrix of tests, and
405476
# signals successful completion. Used for the PR status to pass

0 commit comments

Comments
 (0)