Skip to content

Commit 63c9c06

Browse files
committed
[eclipse-iceoryx#60] integrate miri in ci with an allow list
1 parent aec86ae commit 63c9c06

File tree

3 files changed

+40
-0
lines changed

3 files changed

+40
-0
lines changed

.github/workflows/miri-check.yml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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: ./miri_check.sh

miri_allowlist

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
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 each line should end up with a newline character,
4+
# otherwise the ci shell will skip the last line
5+
./iceoryx2-bb/testing

miri_check.sh

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
filename="miri_allowlist"
2+
while IFS= read -r line; do
3+
if [[ "$line" == \#* ]]; then
4+
continue
5+
fi
6+
if [[ -d $line ]]; then
7+
cd "$line" || { echo "Failed to change directory to $line"; exit 1; }
8+
echo "Run cargo miri test under: $(pwd)"
9+
cargo miri test
10+
cd -
11+
else
12+
echo "$line is not a valid directory."
13+
fi
14+
done < "$filename"

0 commit comments

Comments
 (0)