Skip to content

Commit 3965993

Browse files
authored
miri ci reporting with GHAS (#7)
1 parent b37dd22 commit 3965993

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

.github/workflows/ci.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,27 @@ jobs:
7070
targets: ${{ matrix.target }}
7171
- name: Rust cache
7272
uses: Swatinem/rust-cache@v2
73+
- name: Install sarif-fmt, miri-sarif & nextest
74+
uses: taiki-e/install-action@v2
75+
with:
76+
tool: sarif-fmt,miri-sarif,nextest
7377
- name: Run miri
74-
run: MIRIFLAGS=-Zmiri-strict-provenance cargo miri test --target ${{ matrix.target }}
78+
shell: bash # this is needed for bash to run with -o pipefail
79+
run: |
80+
MIRIFLAGS="--error-format=json" cargo miri nextest run --target ${{ matrix.target }} -j num-cpus \
81+
--success-output immediate --failure-output immediate --final-status-level all --no-fail-fast 2>&1 \
82+
| tee miri.log
83+
- name: Convert miri log to SARIF
84+
if: always()
85+
run: |
86+
miri-sarif -i miri.log \
87+
| jq '(.runs[] | select(.tool.driver.name == "miri")).tool.driver.name |= "miri [${{ matrix.endianness }}]"' \
88+
| tee results.sarif | sarif-fmt
89+
- name: Upload SARIF file
90+
uses: github/codeql-action/upload-sarif@v3
91+
if: always()
92+
with:
93+
sarif_file: results.sarif
7594

7695
tests:
7796
name: Tests

0 commit comments

Comments
 (0)