Skip to content

Commit

Permalink
chore(ci): Add miri tests (#8847)
Browse files Browse the repository at this point in the history
It can help to find some UB in swc
  • Loading branch information
Brooooooklyn authored Apr 12, 2024
1 parent a5d1e57 commit b0df6e5
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -853,6 +853,53 @@ jobs:
export NODE_OPTIONS="--unhandled-rejections=warn"
(cd crates/swc_node_bundler/tests/integration/react && npm install && npx spack)
miri:
name: Miri
runs-on: ubuntu-latest
if: >-
${{ !contains(github.event.head_commit.message, 'chore: ') }}
strategy:
fail-fast: false
matrix:
crate:
- better_scoped_tls
- string_enum
- swc
- swc_bundler
- swc_ecma_codegen
- swc_ecma_minifier
steps:
- uses: actions/checkout@v4
with:
submodules: true

- uses: actions/setup-node@v4
with:
node-version: "18"
cache: "yarn"

- name: Install node dependencies
shell: bash
run: yarn

- name: Print rustup toolchain version
shell: bash
id: rustup-version
run: |
export RUST_TOOLCHAIN="$(cat rust-toolchain | tr -d '\n')"
echo "Rust toolchain: $RUST_TOOLCHAIN"
echo "RUST_TOOLCHAIN=$RUST_TOOLCHAIN" >> "$GITHUB_OUTPUT"
- name: Install
uses: dtolnay/rust-toolchain@stable
with:
toolchain: "${{ steps.rustup-version.outputs.RUST_TOOLCHAIN }}"
components: miri

- run: cargo miri test -p ${{ matrix.crate }} --no-fail-fast
continue-on-error: true
env:
MIRIFLAGS: "-Zmiri-disable-isolation"
done:
needs:
- cargo-fmt
Expand Down

0 comments on commit b0df6e5

Please sign in to comment.