diff options
author | Zack Weinberg <zackw@panix.com> | 2021-07-20 12:07:15 -0400 |
---|---|---|
committer | Zack Weinberg <zackw@panix.com> | 2021-07-22 11:21:16 -0400 |
commit | 139f458f05c1289fe055b1c50483c97e98ee5b71 (patch) | |
tree | 45e056742e6703c99f97646d9e4172f2c5c9b1a3 /.github | |
parent | 66d8342f80155202030ebf2974e2dcba4e297baf (diff) | |
download | libxcrypt-139f458f05c1289fe055b1c50483c97e98ee5b71.tar.gz libxcrypt-139f458f05c1289fe055b1c50483c97e98ee5b71.tar.bz2 libxcrypt-139f458f05c1289fe055b1c50483c97e98ee5b71.zip |
CI: Add workflow to run testsuite under memory checkers.
This tests four configurations: (GCC, Clang) x (Valgrind, ASan+UBSan),
all with everything enabled.
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/memcheck.yml | 162 |
1 files changed, 162 insertions, 0 deletions
diff --git a/.github/workflows/memcheck.yml b/.github/workflows/memcheck.yml new file mode 100644 index 0000000..e3377e9 --- /dev/null +++ b/.github/workflows/memcheck.yml @@ -0,0 +1,162 @@ +name: Memory access checking + +on: + push: + pull_request: + +jobs: + skip_duplicates: + continue-on-error: true + runs-on: ubuntu-latest + outputs: + should_skip: ${{ steps.skip_check.outputs.should_skip }} + steps: + - id: skip_check + # pin to unreleased SHA so we can use 'same_content_newer' + # see https://github.com/fkirc/skip-duplicate-actions/pull/112 + uses: fkirc/skip-duplicate-actions@98d1dc89f43a47f8e4fba8e1c1fb8d6c5fc515ee + with: + concurrent_skipping: 'same_content_newer' + skip_after_successful_duplicate: 'true' + paths_ignore: '["doc/**", "**/*.md", "AUTHORS", "NEWS", "THANKS"]' + do_not_skip: '["workflow_dispatch", "schedule"]' + + Valgrind: + needs: skip_duplicates + if: ${{ needs.skip_duplicates.outputs.should_skip != 'true' }} + + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + compiler: [gcc, clang] + + env: + CC: ${{matrix.compiler}} + VERBOSE: 1 + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Install packages + run: sudo apt-get install clang valgrind + + - name: Versions of build tools + id: build-tools + run: ./build-aux/ci-log-dependency-versions + + - name: Cache bootstrap + id: cache + uses: actions/cache@v2 + with: + path: | + INSTALL + Makefile.in + aclocal.m4 + config.h.in + configure + autom4te.cache/** + build-aux/compile + build-aux/config.guess + build-aux/config.sub + build-aux/depcomp + build-aux/install-sh + build-aux/libtool.m4 + build-aux/ltmain.sh + build-aux/ltoptions.m4 + build-aux/ltsugar.m4 + build-aux/ltversion.m4 + build-aux/lt~obsolete.m4 + build-aux/missing + build-aux/test-driver + key: autoreconf-${{ steps.build-tools.outputs.autotools-ver }}-${{ hashFiles('autogen.sh', 'configure.ac', 'Makefile.am', 'build-aux/*.m4') }} + + - name: Bootstrap + if: steps.cache.outputs.cache-hit != 'true' + run: ./autogen.sh + + - name: Configure + run: ./build-aux/configure-wrapper --enable-obsolete-api --enable-hashes=all --enable-valgrind-memcheck + + - name: Build + run: make all test-programs + + - name: Test + run: make check-valgrind-memcheck + + - name: Detailed error logs + if: failure() + run: ./build-aux/ci-log-logfiles + + ASan-UBSan: + needs: skip_duplicates + if: ${{ needs.skip_duplicates.outputs.should_skip != 'true' }} + + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + compiler: [gcc, clang] + + env: + CC: ${{matrix.compiler}} + DEB_BUILD_MAINT_OPTIONS: hardening=+all sanitize=+address,+leak,+undefined + VERBOSE: 1 + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Install packages + if: ${{ matrix.compiler == 'clang' }} + run: sudo apt-get install clang + + - name: Versions of build tools + id: build-tools + run: ./build-aux/ci-log-dependency-versions + + - name: Cache bootstrap + id: cache + uses: actions/cache@v2 + with: + path: | + INSTALL + Makefile.in + aclocal.m4 + config.h.in + configure + autom4te.cache/** + build-aux/compile + build-aux/config.guess + build-aux/config.sub + build-aux/depcomp + build-aux/install-sh + build-aux/libtool.m4 + build-aux/ltmain.sh + build-aux/ltoptions.m4 + build-aux/ltsugar.m4 + build-aux/ltversion.m4 + build-aux/lt~obsolete.m4 + build-aux/missing + build-aux/test-driver + key: autoreconf-${{ steps.build-tools.outputs.autotools-ver }}-${{ hashFiles('autogen.sh', 'configure.ac', 'Makefile.am', 'build-aux/*.m4') }} + + - name: Bootstrap + if: steps.cache.outputs.cache-hit != 'true' + run: ./autogen.sh + + - name: Configure + run: ./build-aux/configure-wrapper --enable-obsolete-api --enable-hashes=all + + - name: Build + run: make all test-programs UNDEF_FLAG= + + - name: Test + run: make check + + - name: Detailed error logs + if: failure() + run: ./build-aux/ci-log-logfiles |