@@ -373,6 +373,121 @@ jobs:
373373 run : env
374374 if : ${{ always() }}
375375
376+ valgrind_debian :
377+ name : " Valgrind (memcheck)"
378+ runs-on : ubuntu-latest
379+ needs : docker_cache
380+
381+ strategy :
382+ fail-fast : false
383+ matrix :
384+ configuration :
385+ - env_vars : { CC: 'clang', ASM: 'auto' }
386+ - env_vars : { CC: 'i686-linux-gnu-gcc', HOST: 'i686-linux-gnu', ASM: 'auto' }
387+ - env_vars : { CC: 'clang', ASM: 'no', ECMULTGENPRECISION: 2, ECMULTWINDOW: 2 }
388+ - env_vars : { CC: 'i686-linux-gnu-gcc', HOST: 'i686-linux-gnu', ASM: 'no', ECMULTGENPRECISION: 2, ECMULTWINDOW: 2 }
389+
390+ env :
391+ # The `--error-exitcode` is required to make the test fail if valgrind found errors,
392+ # otherwise it will return 0 (https://www.valgrind.org/docs/manual/manual-core.html).
393+ WRAPPER_CMD : ' valgrind --error-exitcode=42'
394+ ECDH : ' yes'
395+ RECOVERY : ' yes'
396+ SCHNORRSIG : ' yes'
397+ ELLSWIFT : ' yes'
398+ CTIMETESTS : ' no'
399+ SECP256K1_TEST_ITERS : 2
400+
401+ steps :
402+ - name : Checkout
403+ uses : actions/checkout@v3
404+
405+ - name : CI script
406+ env : ${{ matrix.configuration.env_vars }}
407+ uses : ./.github/actions/run-in-docker-action
408+ with :
409+ dockerfile : ./ci/linux-debian.Dockerfile
410+ tag : linux-debian-image
411+ command : >
412+ git config --global --add safe.directory ${{ github.workspace }} &&
413+ ./ci/ci.sh
414+
415+ - run : cat tests.log || true
416+ if : ${{ always() }}
417+ - run : cat noverify_tests.log || true
418+ if : ${{ always() }}
419+ - run : cat exhaustive_tests.log || true
420+ if : ${{ always() }}
421+ - run : cat ctime_tests.log || true
422+ if : ${{ always() }}
423+ - run : cat bench.log || true
424+ if : ${{ always() }}
425+ - run : cat config.log || true
426+ if : ${{ always() }}
427+ - run : cat test_env.log || true
428+ if : ${{ always() }}
429+ - name : CI env
430+ run : env
431+ if : ${{ always() }}
432+
433+ sanitizers_debian :
434+ name : " UBSan, ASan, LSan"
435+ runs-on : ubuntu-latest
436+ needs : docker_cache
437+
438+ strategy :
439+ fail-fast : false
440+ matrix :
441+ configuration :
442+ - env_vars : { CC: 'clang', ASM: 'auto' }
443+ - env_vars : { CC: 'i686-linux-gnu-gcc', HOST: 'i686-linux-gnu', ASM: 'auto' }
444+ - env_vars : { CC: 'clang', ASM: 'no', ECMULTGENPRECISION: 2, ECMULTWINDOW: 2 }
445+ - env_vars : { CC: 'i686-linux-gnu-gcc', HOST: 'i686-linux-gnu', ASM: 'no', ECMULTGENPRECISION: 2, ECMULTWINDOW: 2 }
446+
447+ env :
448+ ECDH : ' yes'
449+ RECOVERY : ' yes'
450+ SCHNORRSIG : ' yes'
451+ ELLSWIFT : ' yes'
452+ CTIMETESTS : ' no'
453+ CFLAGS : ' -fsanitize=undefined,address -g'
454+ UBSAN_OPTIONS : ' print_stacktrace=1:halt_on_error=1'
455+ ASAN_OPTIONS : ' strict_string_checks=1:detect_stack_use_after_return=1:detect_leaks=1'
456+ LSAN_OPTIONS : ' use_unaligned=1'
457+ SECP256K1_TEST_ITERS : 32
458+
459+ steps :
460+ - name : Checkout
461+ uses : actions/checkout@v3
462+
463+ - name : CI script
464+ env : ${{ matrix.configuration.env_vars }}
465+ uses : ./.github/actions/run-in-docker-action
466+ with :
467+ dockerfile : ./ci/linux-debian.Dockerfile
468+ tag : linux-debian-image
469+ command : >
470+ git config --global --add safe.directory ${{ github.workspace }} &&
471+ ./ci/ci.sh
472+
473+ - run : cat tests.log || true
474+ if : ${{ always() }}
475+ - run : cat noverify_tests.log || true
476+ if : ${{ always() }}
477+ - run : cat exhaustive_tests.log || true
478+ if : ${{ always() }}
479+ - run : cat ctime_tests.log || true
480+ if : ${{ always() }}
481+ - run : cat bench.log || true
482+ if : ${{ always() }}
483+ - run : cat config.log || true
484+ if : ${{ always() }}
485+ - run : cat test_env.log || true
486+ if : ${{ always() }}
487+ - name : CI env
488+ run : env
489+ if : ${{ always() }}
490+
376491 mingw_debian :
377492 name : ${{ matrix.configuration.job_name }}
378493 runs-on : ubuntu-latest
0 commit comments