diff options
author | Pablo Galindo <Pablogsal@gmail.com> | 2021-06-10 17:47:53 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-10 17:47:53 (GMT) |
commit | f82262b186c4aa944d2ab0a5468724dfca2ecc3d (patch) | |
tree | a8b986372c67b99254d643cb7c30a511ce3c4232 /.github/workflows/build.yml | |
parent | ac867f10b49322e25f34d2d8abd8e63c86834750 (diff) | |
download | cpython-f82262b186c4aa944d2ab0a5468724dfca2ecc3d.zip cpython-f82262b186c4aa944d2ab0a5468724dfca2ecc3d.tar.gz cpython-f82262b186c4aa944d2ab0a5468724dfca2ecc3d.tar.bz2 |
Run address sanitiser in the GitHub CI (GH-26640)
Diffstat (limited to '.github/workflows/build.yml')
-rw-r--r-- | .github/workflows/build.yml | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index aaa95db..00506bd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -218,3 +218,46 @@ jobs: run: make pythoninfo - name: SSL tests run: ./python Lib/test/ssltests.py + + + build_asan: + name: 'Address sanitizer' + runs-on: ubuntu-20.04 + needs: check_source + if: needs.check_source.outputs.run_tests == 'true' + env: + OPENSSL_VER: 1.1.1k + ASAN_OPTIONS: detect_leaks=0:allocator_may_return_null=1:handle_segv=0 + steps: + - uses: actions/checkout@v2 + - name: Register gcc problem matcher + run: echo "::add-matcher::.github/problem-matchers/gcc.json" + - name: Install Dependencies + run: sudo ./.github/workflows/posix-deps-apt.sh + - name: Configure OpenSSL env vars + run: | + echo "MULTISSL_DIR=${GITHUB_WORKSPACE}/multissl" >> $GITHUB_ENV + echo "OPENSSL_DIR=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}" >> $GITHUB_ENV + echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}/lib" >> $GITHUB_ENV + - name: 'Restore OpenSSL build' + id: cache-openssl + uses: actions/cache@v2.1.6 + with: + path: ./multissl/openssl/${{ env.OPENSSL_VER }} + key: ${{ runner.os }}-multissl-openssl-${{ env.OPENSSL_VER }} + - name: Install OpenSSL + if: steps.cache-openssl.outputs.cache-hit != 'true' + run: python3 Tools/ssl/multissltests.py --steps=library --base-directory $MULTISSL_DIR --openssl $OPENSSL_VER --system Linux + - name: Add ccache to PATH + run: | + echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV + - name: Configure ccache action + uses: hendrikmuhs/ccache-action@v1 + - name: Configure CPython + run: ./configure --with-address-sanitizer --without-pymalloc + - name: Build CPython + run: make -j4 + - name: Display build info + run: make pythoninfo + - name: Tests + run: xvfb-run make buildbottest TESTOPTS="-j4 -uall,-cpu -x test_ctypes test_crypt test_decimal test_faulthandler test_interpreters test___all__ test_idle test_tix test_tk test_ttk_guionly test_ttk_textonly" |