Skip to content

Add support for Ubuntu 24.04 and Fedora 40, and drop Fedora 38 #2287

Add support for Ubuntu 24.04 and Fedora 40, and drop Fedora 38

Add support for Ubuntu 24.04 and Fedora 40, and drop Fedora 38 #2287

Workflow file for this run

# Syntax reference:
# https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions
name: Rust Sanitizers
permissions: read-all
on:
pull_request:
types: [opened, synchronize]
jobs:
miri:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
# Run on PR head instead of merge result. Running on the merge
# result can give confusing results, and we require PR to be up to
# date with target branch before merging, anyway.
# See https://github.com/shadow/shadow/issues/2166
ref: ${{ github.event.pull_request.head.sha }}
- name: Set Rust toolchain
run: ln -s ci/rust-toolchain-nightly.toml rust-toolchain.toml
# See https://github.com/rust-lang/miri#running-miri-on-ci
- name: Install miri
run: |
rustup component add miri
cargo miri setup
- name: Test
run: |
cd src
# Disable isolation for some tests that use the current time (Instant::now).
#
# Disable leak-checking for now. Some tests intentionally panic, causing leaks.
export MIRIFLAGS="-Zmiri-disable-isolation -Zmiri-ignore-leaks"
cargo miri test --workspace
# See <https://docs.rs/loom/latest/loom/>
loom:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
# Run on PR head instead of merge result. Running on the merge
# result can give confusing results, and we require PR to be up to
# date with target branch before merging, anyway.
# See https://github.com/shadow/shadow/issues/2166
ref: ${{ github.event.pull_request.head.sha }}
- name: Set Rust toolchain
run: ln -s ci/rust-toolchain-stable.toml rust-toolchain.toml
- name: Test
run: |
cd src
# Currently only the vasi-sync crate is designed to work with loom.
# This is also the crate that benefits the most from loom testing, since
# it implements synchronization primitives.
#
# If this ever gets too slow, we can consider reducing `LOOM_MAX_PREEMPTIONS`
# to substantially speed it up, at the cost of losing some coverage of possible
# execution paths.
#
# We use `--test-threads 1` as a workaround for
# <https://github.com/tokio-rs/loom/issues/316>
RUST_BACKTRACE=1 \
RUSTFLAGS="--cfg loom" \
cargo test -p vasi-sync -- --test-threads 1