-
Notifications
You must be signed in to change notification settings - Fork 1
178 lines (170 loc) · 6.49 KB
/
nightly.yml
File metadata and controls
178 lines (170 loc) · 6.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
name: Nightly
on:
schedule:
- cron: "0 3 * * *"
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
mutants:
name: Mutation Testing
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@0f1b44df7e9cbb178d781a242338dfa5e243ad7f # nightly
- uses: taiki-e/install-action@328a871ad8f62ecac78390391f463ccabc974b72 # v2
with:
tool: cargo-mutants
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
- name: Run mutant testing
run: cargo +nightly mutants --timeout 60 -- --all-features
continue-on-error: true
- name: Mutants Summary
if: always()
run: |
echo "## Mutation Testing Results" >> "$GITHUB_STEP_SUMMARY"
if [ -f mutants.out/caught.txt ]; then
echo "Caught: $(wc -l < mutants.out/caught.txt)" >> "$GITHUB_STEP_SUMMARY"
fi
if [ -f mutants.out/missed.txt ]; then
echo "Missed: $(wc -l < mutants.out/missed.txt)" >> "$GITHUB_STEP_SUMMARY"
fi
- name: Upload mutants report
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: mutants-report
path: mutants.out/
miri-extended:
name: Miri Extended
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@0f1b44df7e9cbb178d781a242338dfa5e243ad7f # nightly
with:
components: miri
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
- name: Miri with stacked borrows
run: cargo +nightly miri test -p mantis-queue --lib --all-features
env:
MIRIFLAGS: -Zmiri-strict-provenance -Zmiri-symbolic-alignment-check
- name: Miri with tree borrows
run: cargo +nightly miri test -p mantis-queue --lib --all-features
env:
MIRIFLAGS: -Zmiri-tree-borrows -Zmiri-strict-provenance
coverage-full:
name: Full Coverage Report
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@0f1b44df7e9cbb178d781a242338dfa5e243ad7f # nightly
with:
components: llvm-tools-preview
- uses: taiki-e/install-action@328a871ad8f62ecac78390391f463ccabc974b72 # v2
with:
tool: cargo-llvm-cov
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
- run: cargo +nightly llvm-cov --all-features --branch --html
- name: Upload coverage report
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: coverage-html
path: target/llvm-cov/html/
asm-check:
name: ASM Toggle (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@0f1b44df7e9cbb178d781a242338dfa5e243ad7f # nightly
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
- name: Test with default features
run: cargo +nightly test --all-features
- name: Test with no default features
run: cargo +nightly test -p mantis-core -p mantis-types -p mantis-queue --no-default-features
- name: Install cargo-show-asm
uses: taiki-e/install-action@328a871ad8f62ecac78390391f463ccabc974b72 # v2
with:
tool: cargo-show-asm
- name: Run ASM inspection
run: ./scripts/check-asm.sh
- name: Upload ASM artifacts
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: asm-output-${{ matrix.os }}
path: target/asm/
retention-days: 30
kani:
name: Kani Proofs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
persist-credentials: false
- name: Install Kani
run: |
cargo install --locked kani-verifier
cargo kani setup
- name: Run proofs
run: |
set -o pipefail
cargo kani -p mantis-verify 2>&1 | tee kani-output.txt
- name: Kani Summary
if: always()
run: |
echo "## Kani Proof Results" >> "$GITHUB_STEP_SUMMARY"
grep -E "(VERIFIED|FAILED|harness|error)" kani-output.txt >> "$GITHUB_STEP_SUMMARY" || true
- name: Upload proof output
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
if: always()
with:
name: kani-proofs
path: kani-output.txt
fuzz:
name: Fuzz Testing
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@0f1b44df7e9cbb178d781a242338dfa5e243ad7f # nightly
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
- name: Install cargo-fuzz
uses: taiki-e/install-action@328a871ad8f62ecac78390391f463ccabc974b72 # v2
with:
tool: cargo-fuzz
- name: Run fuzz targets
run: |
for target in $(cargo +nightly fuzz list 2>/dev/null || true); do
echo "Fuzzing: $target (10 min)"
cargo +nightly fuzz run "$target" -- -max_total_time=600 || true
done
continue-on-error: true
- name: Upload corpus
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
if: always()
with:
name: fuzz-corpus
path: fuzz/corpus/
retention-days: 90
- name: Upload crashes
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
if: failure()
with:
name: fuzz-crashes
path: fuzz/artifacts/
- name: Fuzz Summary
if: always()
run: |
echo "## Fuzz Results" >> "$GITHUB_STEP_SUMMARY"
echo "Duration: 10 minutes per target" >> "$GITHUB_STEP_SUMMARY"
echo "Corpus size: $(find fuzz/corpus -type f 2>/dev/null | wc -l) inputs" >> "$GITHUB_STEP_SUMMARY"