Skip to content

Commit

Permalink
[eclipse-iceoryx#60] integrate miri in ci
Browse files Browse the repository at this point in the history
Allow CI failures for now
  • Loading branch information
xieyuschen committed Oct 1, 2024
1 parent 5f2174a commit 79709e5
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/miri-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Miri

on:
push:
branches: [ main ]
pull_request:
branches: [ main, release* ]

jobs:
miri:
name: "Miri"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Miri
run: |
rustup toolchain install nightly --component miri
rustup override set nightly
cargo miri setup
- name: Test with Miri
run: |
# the script will be run at the project root, so use filename directly
filename=".miri_allowlist"
while IFS= read -r line; do
if [[ "$line" == \#* ]]; then
echo "$line"
continue
fi
if [[ -d $line ]]; then
cd "$line" || { echo "Failed to change directory to $line"; exit 1; }
echo "Run cargo miri test under: $(pwd)"
cargo miri test
cd -
else
echo "$line is not a valid directory."
fi
done < "$filename"
4 changes: 4 additions & 0 deletions .miri_allowlist
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# .miri_allowlist use hash character to lead a comment
# each line will be treated as a valid path to enter and run 'cargo miri test'
# note that a new line is required at the end of file
./iceoryx2-bb/testing

0 comments on commit 79709e5

Please sign in to comment.