-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial implementation of tests with sanitizers
- Loading branch information
Showing
14 changed files
with
411 additions
and
27 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
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). | ||
|
||
jobs: | ||
test-core: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup environment | ||
run: bash ./ci-sanitizers-setup.sh | ||
- name: Test ASAN | ||
run: bash ./ci-sanitizers-test.sh core address | ||
- name: Test MSAN | ||
run: bash ./ci-sanitizers-test.sh core memory | ||
- name: Test TSAN | ||
run: bash ./ci-sanitizers-test.sh core thread | ||
- name: Test CFISAN | ||
run: bash ./ci-sanitizers-test.sh core cfi | ||
|
||
# test-alloc: | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - uses: actions/checkout@v3 | ||
# - name: Setup environment | ||
# run: bash ./ci-sanitizers-setup.sh | ||
# - name: Test | ||
# run: bash ./ci-sanitizers-test.sh alloc | ||
|
||
# test-std: | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - uses: actions/checkout@v3 | ||
# - name: Setup environment | ||
# run: bash ./ci-sanitizers-setup.sh | ||
# - name: Test | ||
# run: bash ./ci-sanitizers-test.sh std | ||
|
||
# test-simd: | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - uses: actions/checkout@v3 | ||
# - name: Setup environment | ||
# run: bash ./ci-sanitizers-setup.sh | ||
# - name: Test | ||
# run: bash ./ci-sanitizers-test.sh simd | ||
|
||
# test-stdarch: | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - uses: actions/checkout@v3 | ||
# - name: Setup environment | ||
# run: bash ./ci-sanitizers-setup.sh | ||
# - name: Test | ||
# run: bash ./ci-sanitizers-test.sh stdarch | ||
|
||
# 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 |
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
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
File renamed without changes.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/bash | ||
set -eauxo pipefail | ||
|
||
## Shared setup code for CI jobs | ||
|
||
# We need 'ts' | ||
sudo apt-get -y install moreutils | ||
echo | ||
|
||
# And of course we need Rust | ||
if [[ "$GITHUB_EVENT_NAME" == 'schedule' ]]; then | ||
RUST_TOOLCHAIN=nightly | ||
else | ||
RUST_TOOLCHAIN=$(cat rust-version) | ||
fi | ||
echo "Installing Rust version: $RUST_TOOLCHAIN" | ||
rustup toolchain install "$RUST_TOOLCHAIN" | ||
rustup override set "$RUST_TOOLCHAIN" |
Oops, something went wrong.