|
37 | 37 | WORKER_TOTAL: 4 |
38 | 38 |
|
39 | 39 | 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 | +
|
40 | 48 | # Step 1: Check out the repository |
41 | 49 | - name: Checkout Repository |
42 | 50 | uses: actions/checkout@v4 |
|
53 | 61 | - name: Run Kani Verification |
54 | 62 | run: head/scripts/run-kani.sh --path ${{github.workspace}}/head |
55 | 63 |
|
56 | | - kani-autoharness: |
| 64 | + kani_autoharness: |
57 | 65 | name: Verify std library using autoharness |
58 | 66 | runs-on: ${{ matrix.os }} |
59 | 67 | strategy: |
|
67 | 75 | fail-fast: false |
68 | 76 |
|
69 | 77 | 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 | +
|
70 | 86 | # Step 1: Check out the repository |
71 | 87 | - name: Checkout Repository |
72 | 88 | uses: actions/checkout@v4 |
|
78 | 94 | # possible functions as that may take a lot longer than expected. Instead, |
79 | 95 | # explicitly list all functions (or prefixes thereof) the proofs of which |
80 | 96 | # are known to pass. |
| 97 | + # Notes: |
| 98 | + # - We use >::disjoint_bitor (and >::unchecked_disjoint_bitor) as pattern |
| 99 | + # as whitespace is not supported, cf. |
| 100 | + # https://github.com/model-checking/kani/issues/4046 |
81 | 101 | - name: Run Kani Verification |
82 | 102 | run: | |
83 | 103 | scripts/run-kani.sh --run autoharness --kani-args \ |
| 104 | + --include-pattern ">::disjoint_bitor" \ |
| 105 | + --include-pattern ">::unchecked_disjoint_bitor" \ |
| 106 | + --include-pattern alloc::__default_lib_allocator:: \ |
84 | 107 | --include-pattern alloc::layout::Layout::from_size_align \ |
85 | 108 | --include-pattern ascii::ascii_char::AsciiChar::from_u8 \ |
86 | 109 | --include-pattern char::convert::from_u32_unchecked \ |
@@ -122,14 +145,143 @@ jobs: |
122 | 145 | --exclude-pattern time::Duration::from_secs_f \ |
123 | 146 | --include-pattern unicode::unicode_data::conversions::to_ \ |
124 | 147 | --exclude-pattern ::precondition_check \ |
125 | | - --harness-timeout 5m \ |
| 148 | + --harness-timeout 10m \ |
126 | 149 | --default-unwind 1000 \ |
127 | | - --jobs=3 --output-format=terse |
| 150 | + --jobs=3 --output-format=terse | tee autoharness-verification.log |
| 151 | + gzip autoharness-verification.log |
| 152 | +
|
| 153 | + - name: Upload Autoharness Verification Log |
| 154 | + uses: actions/upload-artifact@v4 |
| 155 | + with: |
| 156 | + name: ${{ matrix.os }}-autoharness-verification.log.gz |
| 157 | + path: autoharness-verification.log.gz |
| 158 | + if-no-files-found: error |
| 159 | + # Aggressively short retention: we don't really need these |
| 160 | + retention-days: 3 |
| 161 | + |
| 162 | + run_kani_metrics: |
| 163 | + name: Kani Metrics |
| 164 | + runs-on: ${{ matrix.os }} |
| 165 | + strategy: |
| 166 | + matrix: |
| 167 | + os: [ubuntu-latest, macos-latest] |
| 168 | + include: |
| 169 | + - os: ubuntu-latest |
| 170 | + base: ubuntu |
| 171 | + - os: macos-latest |
| 172 | + base: macos |
| 173 | + fail-fast: true |
| 174 | + |
| 175 | + steps: |
| 176 | + - name: Remove unnecessary software to free up disk space |
| 177 | + if: matrix.os == 'ubuntu-latest' |
| 178 | + run: | |
| 179 | + # inspired by https://github.com/easimon/maximize-build-space/blob/master/action.yml |
| 180 | + df -h |
| 181 | + sudo rm -rf /usr/share/dotnet /usr/local/lib/android /usr/local/.ghcup |
| 182 | + df -h |
| 183 | +
|
| 184 | + # Step 1: Check out the repository |
| 185 | + - name: Checkout Repository |
| 186 | + uses: actions/checkout@v4 |
| 187 | + with: |
| 188 | + submodules: true |
| 189 | + |
| 190 | + # The Kani metrics collection uses a Python script (kani_std_analysis.py), so make sure Python is installed |
| 191 | + - name: Set up Python |
| 192 | + uses: actions/setup-python@v4 |
| 193 | + with: |
| 194 | + python-version: '3.x' |
| 195 | + |
| 196 | + # Step 2: Run list on the std library |
| 197 | + - name: Run Kani Metrics |
| 198 | + run: | |
| 199 | + scripts/run-kani.sh --run metrics --with-autoharness |
| 200 | + pushd /tmp/std_lib_analysis |
| 201 | + tar czf results.tar.gz results |
| 202 | + popd |
| 203 | +
|
| 204 | + - name: Upload kani-list.json |
| 205 | + uses: actions/upload-artifact@v4 |
| 206 | + with: |
| 207 | + name: ${{ matrix.os }}-kani-list.json |
| 208 | + path: kani-list.json |
| 209 | + if-no-files-found: error |
| 210 | + # Aggressively short retention: we don't really need these |
| 211 | + retention-days: 3 |
| 212 | + |
| 213 | + - name: Upload scanner results |
| 214 | + uses: actions/upload-artifact@v4 |
| 215 | + with: |
| 216 | + name: ${{ matrix.os }}-results.tar.gz |
| 217 | + path: /tmp/std_lib_analysis/results.tar.gz |
| 218 | + if-no-files-found: error |
| 219 | + # Aggressively short retention: we don't really need these |
| 220 | + retention-days: 3 |
| 221 | + |
| 222 | + run-log-analysis: |
| 223 | + name: Build JSON from logs |
| 224 | + needs: [run_kani_metrics, kani_autoharness] |
| 225 | + runs-on: ${{ matrix.os }} |
| 226 | + strategy: |
| 227 | + matrix: |
| 228 | + os: [ubuntu-latest, macos-latest] |
| 229 | + include: |
| 230 | + - os: ubuntu-latest |
| 231 | + base: ubuntu |
| 232 | + - os: macos-latest |
| 233 | + base: macos |
| 234 | + fail-fast: false |
| 235 | + |
| 236 | + steps: |
| 237 | + - name: Checkout Repository |
| 238 | + uses: actions/checkout@v4 |
| 239 | + with: |
| 240 | + submodules: false |
| 241 | + |
| 242 | + - name: Download log |
| 243 | + uses: actions/download-artifact@v4 |
| 244 | + with: |
| 245 | + name: ${{ matrix.os }}-autoharness-verification.log.gz |
| 246 | + |
| 247 | + - name: Download kani-list.json |
| 248 | + uses: actions/download-artifact@v4 |
| 249 | + with: |
| 250 | + name: ${{ matrix.os }}-kani-list.json |
| 251 | + |
| 252 | + - name: Download scanner results |
| 253 | + uses: actions/download-artifact@v4 |
| 254 | + with: |
| 255 | + name: ${{ matrix.os }}-results.tar.gz |
| 256 | + |
| 257 | + - name: Run log parser |
| 258 | + run: | |
| 259 | + gunzip autoharness-verification.log.gz |
| 260 | + tar xzf results.tar.gz |
| 261 | + python3 scripts/kani-std-analysis/log_parser.py \ |
| 262 | + --kani-list-file kani-list.json \ |
| 263 | + --analysis-results-dir results/ \ |
| 264 | + autoharness-verification.log \ |
| 265 | + -o results.json |
| 266 | +
|
| 267 | + - name: Upload JSON |
| 268 | + uses: actions/upload-artifact@v4 |
| 269 | + with: |
| 270 | + name: ${{ matrix.os }}-results.json |
| 271 | + path: results.json |
| 272 | + if-no-files-found: error |
128 | 273 |
|
129 | 274 | run-kani-list: |
130 | 275 | name: Kani List |
131 | 276 | runs-on: ubuntu-latest |
132 | 277 | steps: |
| 278 | + - name: Remove unnecessary software to free up disk space |
| 279 | + run: | |
| 280 | + # inspired by https://github.com/easimon/maximize-build-space/blob/master/action.yml |
| 281 | + df -h |
| 282 | + sudo rm -rf /usr/share/dotnet /usr/local/lib/android /usr/local/.ghcup |
| 283 | + df -h |
| 284 | +
|
133 | 285 | # Step 1: Check out the repository |
134 | 286 | - name: Checkout Repository |
135 | 287 | uses: actions/checkout@v4 |
@@ -176,12 +328,14 @@ jobs: |
176 | 328 | # Step 3: Add output to job summary |
177 | 329 | - name: Add Autoharness Analyzer output to job summary |
178 | 330 | run: | |
| 331 | + pushd scripts/autoharness_analyzer |
179 | 332 | echo "# Autoharness Failure Summary" >> "$GITHUB_STEP_SUMMARY" |
180 | 333 | echo "## Crate core, all functions" >> "$GITHUB_STEP_SUMMARY" |
181 | | - cat autoharness_analyzer/core_autoharness_data.md >> "$GITHUB_STEP_SUMMARY" |
| 334 | + cat core_autoharness_data.md >> "$GITHUB_STEP_SUMMARY" |
182 | 335 | echo "## Crate core, unsafe functions" >> "$GITHUB_STEP_SUMMARY" |
183 | | - cat autoharness_analyzer/core_autoharness_data.md >> "$GITHUB_STEP_SUMMARY" |
| 336 | + cat core_autoharness_data.md >> "$GITHUB_STEP_SUMMARY" |
184 | 337 | echo "## Crate std, all functions" >> "$GITHUB_STEP_SUMMARY" |
185 | | - cat autoharness_analyzer/std_autoharness_data.md >> "$GITHUB_STEP_SUMMARY" |
| 338 | + cat std_autoharness_data.md >> "$GITHUB_STEP_SUMMARY" |
186 | 339 | echo "## Crate std, unsafe functions" >> "$GITHUB_STEP_SUMMARY" |
187 | | - cat autoharness_analyzer/std_unsafe_autoharness_data.md >> "$GITHUB_STEP_SUMMARY" |
| 340 | + cat std_unsafe_autoharness_data.md >> "$GITHUB_STEP_SUMMARY" |
| 341 | + popd |
0 commit comments