diff --git a/.github/workflows/miri.yml b/.github/workflows/miri.yml new file mode 100644 index 00000000..1d32592a --- /dev/null +++ b/.github/workflows/miri.yml @@ -0,0 +1,38 @@ +# ******************************************************************************* +# Copyright (c) 2025 Contributors to the Eclipse Foundation +# +# See the NOTICE file(s) distributed with this work for additional +# information regarding copyright ownership. +# +# This program and the accompanying materials are made available under the +# terms of the Apache License Version 2.0 which is available at +# https://www.apache.org/licenses/LICENSE-2.0 +# +# SPDX-License-Identifier: Apache-2.0 +# ******************************************************************************* + +name: Miri check + +on: + pull_request: + branches: [main, development] + types: [opened, ready_for_review, reopened, synchronize] + +env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} +jobs: + miri: + runs-on: ubuntu-latest + env: + MIRIFLAGS: "-Zmiri-ignore-leaks -Zmiri-disable-isolation" + steps: + - uses: actions/checkout@v4 + + - uses: dtolnay/rust-toolchain@stable + with: + toolchain: nightly-2025-12-15 + components: miri, rust-src + + - name: Cargo Miri + run: | + cargo +nightly-2025-12-15 miri test --features stub_supervisor_api_client --no-default-features diff --git a/src/health_monitoring_lib/rust/worker.rs b/src/health_monitoring_lib/rust/worker.rs index b7091ad0..508f9732 100644 --- a/src/health_monitoring_lib/rust/worker.rs +++ b/src/health_monitoring_lib/rust/worker.rs @@ -301,6 +301,8 @@ mod tests { } #[test] + // Test is flaky for Miri. + #[cfg_attr(miri, ignore)] fn unique_thread_runner_monitoring_works() { let deadline_monitor = create_monitor_with_deadlines();