3737 WORKER_TOTAL : 4
3838
3939 steps :
40+ - name : Remove unnecessary software to free up disk space
41+ if : matrix.os == 'ubuntu-latest'
42+ run : |
43+ # inspired by https://github.com/easimon/maximize-build-space/blob/master/action.yml
44+ df -h
45+ sudo rm -rf /usr/share/dotnet /usr/local/lib/android /usr/local/.ghcup
46+ df -h
47+
4048 # Step 1: Check out the repository
4149 - name : Checkout Repository
4250 uses : actions/checkout@v4
5361 - name : Run Kani Verification
5462 run : head/scripts/run-kani.sh --path ${{github.workspace}}/head
5563
56- kani-autoharness :
64+ kani_autoharness :
5765 name : Verify std library using autoharness
5866 runs-on : ${{ matrix.os }}
5967 strategy :
6775 fail-fast : false
6876
6977 steps :
78+ - name : Remove unnecessary software to free up disk space
79+ if : matrix.os == 'ubuntu-latest'
80+ run : |
81+ # inspired by https://github.com/easimon/maximize-build-space/blob/master/action.yml
82+ df -h
83+ sudo rm -rf /usr/share/dotnet /usr/local/lib/android /usr/local/.ghcup
84+ df -h
85+
7086 # Step 1: Check out the repository
7187 - name : Checkout Repository
7288 uses : actions/checkout@v4
@@ -78,12 +94,76 @@ jobs:
7894 # possible functions as that may take a lot longer than expected. Instead,
7995 # explicitly list all functions (or prefixes thereof) the proofs of which
8096 # are known to pass.
97+ # Notes:
98+ # - core_arch::x86::__m128d::as_f64x2 is just one example of hundreds of
99+ # core_arch::x86:: functions that are known to verify successfully.
81100 - name : Run Kani Verification
82101 run : |
83102 scripts/run-kani.sh --run autoharness --kani-args \
103+ --include-pattern "<(.+)[[:space:]]as[[:space:]](.+)>::disjoint_bitor" \
104+ --include-pattern "<(.+)[[:space:]]as[[:space:]](.+)>::unchecked_disjoint_bitor" \
105+ --include-pattern "<(.+)[[:space:]]as[[:space:]]iter::range::Step>::backward_unchecked" \
106+ --include-pattern "<(.+)[[:space:]]as[[:space:]]iter::range::Step>::forward_unchecked" \
107+ --include-pattern alloc::__default_lib_allocator:: \
84108 --include-pattern alloc::layout::Layout::from_size_align \
85109 --include-pattern ascii::ascii_char::AsciiChar::from_u8 \
86110 --include-pattern char::convert::from_u32_unchecked \
111+ --include-pattern core_arch::x86::__m128d::as_f64x2 \
112+ --include-pattern "convert::num::<impl.convert::From<num::nonzero::NonZero<" \
113+ --include-pattern "num::<impl.i8>::unchecked_add" \
114+ --include-pattern "num::<impl.i16>::unchecked_add" \
115+ --include-pattern "num::<impl.i32>::unchecked_add" \
116+ --include-pattern "num::<impl.i64>::unchecked_add" \
117+ --include-pattern "num::<impl.i128>::unchecked_add" \
118+ --include-pattern "num::<impl.isize>::unchecked_add" \
119+ --include-pattern "num::<impl.u8>::unchecked_add" \
120+ --include-pattern "num::<impl.u16>::unchecked_add" \
121+ --include-pattern "num::<impl.u32>::unchecked_add" \
122+ --include-pattern "num::<impl.u64>::unchecked_add" \
123+ --include-pattern "num::<impl.u128>::unchecked_add" \
124+ --include-pattern "num::<impl.usize>::unchecked_add" \
125+ --include-pattern "num::<impl.i8>::unchecked_neg" \
126+ --include-pattern "num::<impl.i16>::unchecked_neg" \
127+ --include-pattern "num::<impl.i32>::unchecked_neg" \
128+ --include-pattern "num::<impl.i64>::unchecked_neg" \
129+ --include-pattern "num::<impl.i128>::unchecked_neg" \
130+ --include-pattern "num::<impl.isize>::unchecked_neg" \
131+ --include-pattern "num::<impl.i8>::unchecked_sh" \
132+ --include-pattern "num::<impl.i16>::unchecked_sh" \
133+ --include-pattern "num::<impl.i32>::unchecked_sh" \
134+ --include-pattern "num::<impl.i64>::unchecked_sh" \
135+ --include-pattern "num::<impl.i128>::unchecked_sh" \
136+ --include-pattern "num::<impl.isize>::unchecked_sh" \
137+ --include-pattern "num::<impl.u8>::unchecked_sh" \
138+ --include-pattern "num::<impl.u16>::unchecked_sh" \
139+ --include-pattern "num::<impl.u32>::unchecked_sh" \
140+ --include-pattern "num::<impl.u64>::unchecked_sh" \
141+ --include-pattern "num::<impl.u128>::unchecked_sh" \
142+ --include-pattern "num::<impl.usize>::unchecked_sh" \
143+ --include-pattern "num::<impl.i8>::unchecked_sub" \
144+ --include-pattern "num::<impl.i16>::unchecked_sub" \
145+ --include-pattern "num::<impl.i32>::unchecked_sub" \
146+ --include-pattern "num::<impl.i64>::unchecked_sub" \
147+ --include-pattern "num::<impl.i128>::unchecked_sub" \
148+ --include-pattern "num::<impl.isize>::unchecked_sub" \
149+ --include-pattern "num::<impl.u8>::unchecked_sub" \
150+ --include-pattern "num::<impl.u16>::unchecked_sub" \
151+ --include-pattern "num::<impl.u32>::unchecked_sub" \
152+ --include-pattern "num::<impl.u64>::unchecked_sub" \
153+ --include-pattern "num::<impl.u128>::unchecked_sub" \
154+ --include-pattern "num::<impl.usize>::unchecked_sub" \
155+ --include-pattern "num::<impl.i8>::wrapping_sh" \
156+ --include-pattern "num::<impl.i16>::wrapping_sh" \
157+ --include-pattern "num::<impl.i32>::wrapping_sh" \
158+ --include-pattern "num::<impl.i64>::wrapping_sh" \
159+ --include-pattern "num::<impl.i128>::wrapping_sh" \
160+ --include-pattern "num::<impl.isize>::wrapping_sh" \
161+ --include-pattern "num::<impl.u8>::wrapping_sh" \
162+ --include-pattern "num::<impl.u16>::wrapping_sh" \
163+ --include-pattern "num::<impl.u32>::wrapping_sh" \
164+ --include-pattern "num::<impl.u64>::wrapping_sh" \
165+ --include-pattern "num::<impl.u128>::wrapping_sh" \
166+ --include-pattern "num::<impl.usize>::wrapping_sh" \
87167 --include-pattern "num::nonzero::NonZero::<i8>::count_ones" \
88168 --include-pattern "num::nonzero::NonZero::<i16>::count_ones" \
89169 --include-pattern "num::nonzero::NonZero::<i32>::count_ones" \
@@ -122,14 +202,143 @@ jobs:
122202 --exclude-pattern time::Duration::from_secs_f \
123203 --include-pattern unicode::unicode_data::conversions::to_ \
124204 --exclude-pattern ::precondition_check \
125- --harness-timeout 5m \
205+ --harness-timeout 10m \
126206 --default-unwind 1000 \
127- --jobs=3 --output-format=terse
207+ --jobs=3 --output-format=terse | tee autoharness-verification.log
208+ gzip autoharness-verification.log
209+
210+ - name : Upload Autoharness Verification Log
211+ uses : actions/upload-artifact@v4
212+ with :
213+ name : ${{ matrix.os }}-autoharness-verification.log.gz
214+ path : autoharness-verification.log.gz
215+ if-no-files-found : error
216+ # Aggressively short retention: we don't really need these
217+ retention-days : 3
218+
219+ run_kani_metrics :
220+ name : Kani Metrics
221+ runs-on : ${{ matrix.os }}
222+ strategy :
223+ matrix :
224+ os : [ubuntu-latest, macos-latest]
225+ include :
226+ - os : ubuntu-latest
227+ base : ubuntu
228+ - os : macos-latest
229+ base : macos
230+ fail-fast : true
231+
232+ steps :
233+ - name : Remove unnecessary software to free up disk space
234+ if : matrix.os == 'ubuntu-latest'
235+ run : |
236+ # inspired by https://github.com/easimon/maximize-build-space/blob/master/action.yml
237+ df -h
238+ sudo rm -rf /usr/share/dotnet /usr/local/lib/android /usr/local/.ghcup
239+ df -h
240+
241+ # Step 1: Check out the repository
242+ - name : Checkout Repository
243+ uses : actions/checkout@v4
244+ with :
245+ submodules : true
246+
247+ # The Kani metrics collection uses a Python script (kani_std_analysis.py), so make sure Python is installed
248+ - name : Set up Python
249+ uses : actions/setup-python@v4
250+ with :
251+ python-version : ' 3.x'
252+
253+ # Step 2: Run list on the std library
254+ - name : Run Kani Metrics
255+ run : |
256+ scripts/run-kani.sh --run metrics --with-autoharness
257+ pushd /tmp/std_lib_analysis
258+ tar czf results.tar.gz results
259+ popd
260+
261+ - name : Upload kani-list.json
262+ uses : actions/upload-artifact@v4
263+ with :
264+ name : ${{ matrix.os }}-kani-list.json
265+ path : kani-list.json
266+ if-no-files-found : error
267+ # Aggressively short retention: we don't really need these
268+ retention-days : 3
269+
270+ - name : Upload scanner results
271+ uses : actions/upload-artifact@v4
272+ with :
273+ name : ${{ matrix.os }}-results.tar.gz
274+ path : /tmp/std_lib_analysis/results.tar.gz
275+ if-no-files-found : error
276+ # Aggressively short retention: we don't really need these
277+ retention-days : 3
278+
279+ run-log-analysis :
280+ name : Build JSON from logs
281+ needs : [run_kani_metrics, kani_autoharness]
282+ runs-on : ${{ matrix.os }}
283+ strategy :
284+ matrix :
285+ os : [ubuntu-latest, macos-latest]
286+ include :
287+ - os : ubuntu-latest
288+ base : ubuntu
289+ - os : macos-latest
290+ base : macos
291+ fail-fast : false
292+
293+ steps :
294+ - name : Checkout Repository
295+ uses : actions/checkout@v4
296+ with :
297+ submodules : false
298+
299+ - name : Download log
300+ uses : actions/download-artifact@v4
301+ with :
302+ name : ${{ matrix.os }}-autoharness-verification.log.gz
303+
304+ - name : Download kani-list.json
305+ uses : actions/download-artifact@v4
306+ with :
307+ name : ${{ matrix.os }}-kani-list.json
308+
309+ - name : Download scanner results
310+ uses : actions/download-artifact@v4
311+ with :
312+ name : ${{ matrix.os }}-results.tar.gz
313+
314+ - name : Run log parser
315+ run : |
316+ gunzip autoharness-verification.log.gz
317+ tar xzf results.tar.gz
318+ python3 scripts/kani-std-analysis/log_parser.py \
319+ --kani-list-file kani-list.json \
320+ --analysis-results-dir results/ \
321+ autoharness-verification.log \
322+ -o results.json
323+
324+ - name : Upload JSON
325+ uses : actions/upload-artifact@v4
326+ with :
327+ name : ${{ matrix.os }}-results.json
328+ path : results.json
329+ if-no-files-found : error
128330
129331 run-kani-list :
130332 name : Kani List
131333 runs-on : ubuntu-latest
132334 steps :
335+ - name : Remove unnecessary software to free up disk space
336+ run : |
337+ # inspired by https://github.com/easimon/maximize-build-space/blob/master/action.yml
338+ df -h
339+ sudo rm -rf /usr/share/dotnet /usr/local/lib/android /usr/local/.ghcup
340+ df -h
341+
133342 # Step 1: Check out the repository
134343 - name : Checkout Repository
135344 uses : actions/checkout@v4
@@ -176,12 +385,14 @@ jobs:
176385 # Step 3: Add output to job summary
177386 - name : Add Autoharness Analyzer output to job summary
178387 run : |
388+ pushd scripts/autoharness_analyzer
179389 echo "# Autoharness Failure Summary" >> "$GITHUB_STEP_SUMMARY"
180390 echo "## Crate core, all functions" >> "$GITHUB_STEP_SUMMARY"
181- cat autoharness_analyzer/ core_autoharness_data.md >> "$GITHUB_STEP_SUMMARY"
391+ cat core_autoharness_data.md >> "$GITHUB_STEP_SUMMARY"
182392 echo "## Crate core, unsafe functions" >> "$GITHUB_STEP_SUMMARY"
183- cat autoharness_analyzer/ core_autoharness_data.md >> "$GITHUB_STEP_SUMMARY"
393+ cat core_autoharness_data.md >> "$GITHUB_STEP_SUMMARY"
184394 echo "## Crate std, all functions" >> "$GITHUB_STEP_SUMMARY"
185- cat autoharness_analyzer/ std_autoharness_data.md >> "$GITHUB_STEP_SUMMARY"
395+ cat std_autoharness_data.md >> "$GITHUB_STEP_SUMMARY"
186396 echo "## Crate std, unsafe functions" >> "$GITHUB_STEP_SUMMARY"
187- cat autoharness_analyzer/std_unsafe_autoharness_data.md >> "$GITHUB_STEP_SUMMARY"
397+ cat std_unsafe_autoharness_data.md >> "$GITHUB_STEP_SUMMARY"
398+ popd
0 commit comments