Skip to content

Commit 79709e5

Browse files
committed
[eclipse-iceoryx#60] integrate miri in ci
Allow CI failures for now
1 parent 5f2174a commit 79709e5

File tree

2 files changed

+43
-0
lines changed

2 files changed

+43
-0
lines changed

.github/workflows/miri-check.yml

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Miri
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main, release* ]
8+
9+
jobs:
10+
miri:
11+
name: "Miri"
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
- name: Install Miri
16+
run: |
17+
rustup toolchain install nightly --component miri
18+
rustup override set nightly
19+
cargo miri setup
20+
- name: Test with Miri
21+
run: |
22+
# the script will be run at the project root, so use filename directly
23+
filename=".miri_allowlist"
24+
while IFS= read -r line; do
25+
if [[ "$line" == \#* ]]; then
26+
echo "$line"
27+
continue
28+
fi
29+
if [[ -d $line ]]; then
30+
cd "$line" || { echo "Failed to change directory to $line"; exit 1; }
31+
echo "Run cargo miri test under: $(pwd)"
32+
cargo miri test
33+
cd -
34+
else
35+
echo "$line is not a valid directory."
36+
fi
37+
done < "$filename"
38+
39+

.miri_allowlist

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# .miri_allowlist use hash character to lead a comment
2+
# each line will be treated as a valid path to enter and run 'cargo miri test'
3+
# note that a new line is required at the end of file
4+
./iceoryx2-bb/testing

0 commit comments

Comments
 (0)