diff --git a/.github/workflows/miri-check.yml b/.github/workflows/miri-check.yml new file mode 100644 index 000000000..714a7ca0d --- /dev/null +++ b/.github/workflows/miri-check.yml @@ -0,0 +1,38 @@ +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: | + 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" + + \ No newline at end of file diff --git a/.miri_allowlist b/.miri_allowlist new file mode 100644 index 000000000..5fc769ada --- /dev/null +++ b/.miri_allowlist @@ -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