Skip to content

feat(ci): miri test support for CI #1611

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/actions/setup-builder/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,16 @@ runs:
rustup toolchain install ${RUST_VERSION}
rustup override set ${RUST_VERSION}
rustup component add rustfmt clippy

- name: Setup Rust toolchain according to rust-toolchain.toml
shell: bash
if: ${{ inputs.rust-version == '' }}
run: |
echo "Installing toolchain according to rust-toolchain.toml"
rustup show
rustup component add rustfmt clippy
rustup component add rustfmt clippy miri

- name: Fixup git permissions
# https://github.com/actions/checkout/issues/766
shell: bash
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
21 changes: 21 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ concurrency:

env:
rust_msrv: "1.85.0"
# Disable stacked borrows due to crossbeam-epoch limitations
MIRIFLAGS: "-Zmiri-disable-isolation -Zmiri-backtrace=full -Zmiri-disable-stacked-borrows"

jobs:
check:
Expand Down Expand Up @@ -148,15 +150,34 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5

- name: Setup Nightly Rust toolchain
uses: ./.github/actions/setup-builder

- name: Generate minimal versions lockfile
run: |
cargo generate-lockfile -Z direct-minimal-versions -Z minimal-versions

- name: Setup MSRV Rust toolchain
uses: ./.github/actions/setup-builder
with:
rust-version: ${{ env.rust_msrv }}

- name: Check MSRV
run: |
cargo +${{ env.rust_msrv }} check --locked --workspace

miri:
name: Run Miri
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5

- name: Setup Nightly Rust toolchain
uses: ./.github/actions/setup-builder

- name: Miri setup
run: cargo miri setup

- name: Run Miri
run: cargo miri test -- --skip test_compression_codec_zstd
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should add #[cfg(not(miri))] to the test rather skip it here.

Loading