mirror of
https://github.com/oxc-project/oxc.git
synced 2026-09-14 19:36:11 +08:00
75dd063560
JavaScript strings can contain lone surrogates that Rust str cannot represent. Introduce arena-backed primitives with explicit encoding invariants before migrating AST consumers. Part of #26242.
74 lines
2.4 KiB
YAML
74 lines
2.4 KiB
YAML
name: Miri
|
|
|
|
permissions: {}
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
pull_request:
|
|
types: [opened, synchronize]
|
|
paths:
|
|
- "crates/oxc_allocator/**"
|
|
- "crates/oxc_ast/src/utf8_to_utf16.rs"
|
|
- "crates/oxc_ast/src/generated/utf8_to_utf16_converter.rs"
|
|
- "crates/oxc_data_structures/**"
|
|
- "crates/oxc_parser/**"
|
|
- "crates/oxc_str/**"
|
|
- "crates/oxc_traverse/**"
|
|
- ".github/workflows/miri.yml"
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- "crates/oxc_allocator/**"
|
|
- "crates/oxc_ast/src/utf8_to_utf16.rs"
|
|
- "crates/oxc_ast/src/generated/utf8_to_utf16_converter.rs"
|
|
- "crates/oxc_data_structures/**"
|
|
- "crates/oxc_parser/**"
|
|
- "crates/oxc_str/**"
|
|
- "crates/oxc_traverse/**"
|
|
- ".github/workflows/miri.yml"
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.pull_request.number || github.sha }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
miri:
|
|
name: Miri
|
|
runs-on: namespace-profile-linux-x64-default
|
|
env:
|
|
# Pin Miri to a known-good nightly.
|
|
MIRI_TOOLCHAIN: nightly-2026-05-01
|
|
steps:
|
|
- name: Checkout
|
|
uses: taiki-e/checkout-action@7d1e50e93dc4fb3bba58f85018fadf77898aee8b # v1.4.2
|
|
|
|
- uses: ./.github/actions/check-changes
|
|
id: filter
|
|
with:
|
|
packages: oxc_allocator,oxc_ast,oxc_data_structures,oxc_parser,oxc_str,oxc_transformer
|
|
paths: .github/workflows/miri.yml
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
pr-number: ${{ github.event.pull_request.number }}
|
|
|
|
- uses: namespacelabs/nscloud-cache-action@c5f8dab7560444c4bf8dbc64f1b203431873c547 # v1.6.1
|
|
if: steps.filter.outputs.changed == 'true'
|
|
with:
|
|
path: /home/runner/.rustup
|
|
cache: rust
|
|
|
|
- name: Install Miri
|
|
if: steps.filter.outputs.changed == 'true'
|
|
run: |
|
|
rustup toolchain install "${MIRI_TOOLCHAIN}" --component miri
|
|
cargo +"${MIRI_TOOLCHAIN}" miri setup
|
|
|
|
- name: Test with Miri
|
|
if: steps.filter.outputs.changed == 'true'
|
|
# Enable strict provenance checks
|
|
env:
|
|
MIRIFLAGS: -Zmiri-strict-provenance -Zmiri-disable-isolation
|
|
run: |
|
|
cargo +"${MIRI_TOOLCHAIN}" miri test --all-features -p oxc_allocator -p oxc_ast -p oxc_data_structures -p oxc_str
|
|
cargo +"${MIRI_TOOLCHAIN}" miri test -p oxc_parser -p oxc_transformer
|