Initial implementation of tests with sanitizers #32
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Sanitizers CI | |
on: | |
push: | |
branches: | |
- 'master' | |
pull_request: | |
branches: | |
- 'master' | |
schedule: | |
- cron: '00 2 * * *' # At 02:00 UTC every day (like rustup-components-history). | |
# only one target for now | |
env: | |
TARGET: x86_64-unknown-linux-gnu | |
RUST_BACKTRACE: full | |
jobs: | |
enable_matrix: | |
strategy: | |
max-parallel: 10 # 30 jobs to run... | |
matrix: | |
crate: [core, alloc, std, simd, stdarch] | |
sanitizer: [address, memory, thread, cfi, safestack, leak] | |
# exclude: | |
# FIXME: cfi is a mix of lto, bitcode, 1-cgu, and it doesn't seem to | |
# even compile | |
# - sanitizer: cfi | |
# FIXME: we get some failures pretty early here | |
# - sanitizer: memory | |
# - sanitizer: leak | |
name: Test ${{ matrix.crate }} with ${{ matrix.sanitizer }} sanitizer | |
runs-on: ubuntu-latest | |
# continue running if other tests fail. Disable this once we get out of the | |
# prototype phase | |
if: always() | |
timeout-minutes: 60 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup environment | |
run: bash ./ci-sanitizers-setup.sh | |
- name: Run ${{ matrix.sanitizer }} sanitizer | |
# Mark everything as pass just so GH doesn't cancel on us as soon as there is a failure | |
run: > | |
./ci-sanitizers-test.sh ${{ matrix.crate }} ${{ matrix.sanitizer }} && | |
echo 'good!' || | |
echo "::endgroup::"; echo 'fail!' | |
mark_failure: | |
runs-on: ubuntu-latest | |
steps: | |
- run: sleep 2000 && echo 'that is enough time!'; exit 1 | |
# Send a Zulip notification when a cron job fails | |
# cron-fail-notify: | |
# name: cronjob failure notification | |
# runs-on: ubuntu-latest | |
# needs: [test-core, test-alloc, test-std, test-simd] | |
# if: github.event_name == 'schedule' && (failure() || cancelled()) | |
# steps: | |
# - name: Install zulip-send | |
# run: pip3 install zulip | |
# - name: Send Zulip notification | |
# shell: bash | |
# env: | |
# ZULIP_BOT_EMAIL: ${{ secrets.ZULIP_BOT_EMAIL }} | |
# ZULIP_API_TOKEN: ${{ secrets.ZULIP_API_TOKEN }} | |
# run: | | |
# ~/.local/bin/zulip-send --stream miri --subject "Cron Job Failure (miri-test-libstd, $(date -u +%Y-%m))" \ | |
# --message 'Dear @*T-miri*, | |
# The standard library test suite is [failing under Miri]('"https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID"'). Would you mind investigating this issue? | |
# Thanks in advance! | |
# Sincerely, | |
# The Miri Cronjobs Bot' \ | |
# --user $ZULIP_BOT_EMAIL --api-key $ZULIP_API_TOKEN --site https://rust-lang.zulipchat.com |