|
55 | 55 | - name: Run Kani Verification |
56 | 56 | run: head/scripts/run-kani.sh --path ${{github.workspace}}/head |
57 | 57 |
|
58 | | - kani-autoharness: |
| 58 | + kani_autoharness: |
59 | 59 | name: Verify std library using autoharness |
60 | 60 | runs-on: ${{ matrix.os }} |
61 | 61 | strategy: |
@@ -83,11 +83,17 @@ jobs: |
83 | 83 | # explicitly list all functions (or prefixes thereof) the proofs of which |
84 | 84 | # are known to pass. |
85 | 85 | # Notes: |
| 86 | + # - We use >::disjoint_bitor (and >::unchecked_disjoint_bitor) as pattern |
| 87 | + # as whitespace is not supported, cf. |
| 88 | + # https://github.com/model-checking/kani/issues/4046 |
86 | 89 | # - core_arch::x86::__m128d::as_f64x2 is just one example of hundreds of |
87 | 90 | # core_arch::x86:: functions that are known to verify successfully. |
88 | 91 | - name: Run Kani Verification |
89 | 92 | run: | |
90 | 93 | scripts/run-kani.sh --run autoharness --kani-args \ |
| 94 | + --include-pattern ">::disjoint_bitor" \ |
| 95 | + --include-pattern ">::unchecked_disjoint_bitor" \ |
| 96 | + --include-pattern alloc::__default_lib_allocator:: \ |
91 | 97 | --include-pattern alloc::layout::Layout::from_size_align \ |
92 | 98 | --include-pattern ascii::ascii_char::AsciiChar::from_u8 \ |
93 | 99 | --include-pattern char::convert::from_u32_unchecked \ |
@@ -132,7 +138,121 @@ jobs: |
132 | 138 | --exclude-pattern ::precondition_check \ |
133 | 139 | --harness-timeout 10m \ |
134 | 140 | --default-unwind 1000 \ |
135 | | - --jobs=3 --output-format=terse |
| 141 | + --jobs=3 --output-format=terse | tee autoharness-verification.log |
| 142 | + gzip autoharness-verification.log |
| 143 | +
|
| 144 | + - name: Upload Autoharness Verification Log |
| 145 | + uses: actions/upload-artifact@v4 |
| 146 | + with: |
| 147 | + name: ${{ matrix.os }}-autoharness-verification.log.gz |
| 148 | + path: autoharness-verification.log.gz |
| 149 | + if-no-files-found: error |
| 150 | + # Aggressively short retention: we don't really need these |
| 151 | + retention-days: 3 |
| 152 | + |
| 153 | + run_kani_metrics: |
| 154 | + name: Kani Metrics |
| 155 | + runs-on: ${{ matrix.os }} |
| 156 | + strategy: |
| 157 | + matrix: |
| 158 | + os: [ubuntu-latest, macos-latest] |
| 159 | + include: |
| 160 | + - os: ubuntu-latest |
| 161 | + base: ubuntu |
| 162 | + - os: macos-latest |
| 163 | + base: macos |
| 164 | + fail-fast: true |
| 165 | + |
| 166 | + steps: |
| 167 | + # Step 1: Check out the repository |
| 168 | + - name: Checkout Repository |
| 169 | + uses: actions/checkout@v4 |
| 170 | + with: |
| 171 | + submodules: true |
| 172 | + |
| 173 | + # The Kani metrics collection uses a Python script (kani_std_analysis.py), so make sure Python is installed |
| 174 | + - name: Set up Python |
| 175 | + uses: actions/setup-python@v4 |
| 176 | + with: |
| 177 | + python-version: '3.x' |
| 178 | + |
| 179 | + # Step 2: Run list on the std library |
| 180 | + - name: Run Kani Metrics |
| 181 | + run: | |
| 182 | + scripts/run-kani.sh --run metrics --with-autoharness |
| 183 | + pushd /tmp/std_lib_analysis |
| 184 | + tar czf results.tar.gz results |
| 185 | + popd |
| 186 | +
|
| 187 | + - name: Upload kani-list.json |
| 188 | + uses: actions/upload-artifact@v4 |
| 189 | + with: |
| 190 | + name: ${{ matrix.os }}-kani-list.json |
| 191 | + path: kani-list.json |
| 192 | + if-no-files-found: error |
| 193 | + # Aggressively short retention: we don't really need these |
| 194 | + retention-days: 3 |
| 195 | + |
| 196 | + - name: Upload scanner results |
| 197 | + uses: actions/upload-artifact@v4 |
| 198 | + with: |
| 199 | + name: ${{ matrix.os }}-results.tar.gz |
| 200 | + path: /tmp/std_lib_analysis/results.tar.gz |
| 201 | + if-no-files-found: error |
| 202 | + # Aggressively short retention: we don't really need these |
| 203 | + retention-days: 3 |
| 204 | + |
| 205 | + run-log-analysis: |
| 206 | + name: Build JSON from logs |
| 207 | + needs: [run_kani_metrics, kani_autoharness] |
| 208 | + runs-on: ${{ matrix.os }} |
| 209 | + strategy: |
| 210 | + matrix: |
| 211 | + os: [ubuntu-latest, macos-latest] |
| 212 | + include: |
| 213 | + - os: ubuntu-latest |
| 214 | + base: ubuntu |
| 215 | + - os: macos-latest |
| 216 | + base: macos |
| 217 | + fail-fast: false |
| 218 | + |
| 219 | + steps: |
| 220 | + - name: Checkout Repository |
| 221 | + uses: actions/checkout@v4 |
| 222 | + with: |
| 223 | + submodules: false |
| 224 | + |
| 225 | + - name: Download log |
| 226 | + uses: actions/download-artifact@v4 |
| 227 | + with: |
| 228 | + name: ${{ matrix.os }}-autoharness-verification.log.gz |
| 229 | + |
| 230 | + - name: Download kani-list.json |
| 231 | + uses: actions/download-artifact@v4 |
| 232 | + with: |
| 233 | + name: ${{ matrix.os }}-kani-list.json |
| 234 | + |
| 235 | + - name: Download scanner results |
| 236 | + uses: actions/download-artifact@v4 |
| 237 | + with: |
| 238 | + name: ${{ matrix.os }}-results.tar.gz |
| 239 | + |
| 240 | + - name: Run log parser |
| 241 | + run: | |
| 242 | + gunzip autoharness-verification.log.gz |
| 243 | + tar xzf results.tar.gz |
| 244 | + python3 scripts/kani-std-analysis/log_parser.py \ |
| 245 | + --kani-list-file kani-list.json \ |
| 246 | + --analysis-results-dir results/ \ |
| 247 | + autoharness-verification.log \ |
| 248 | + -o results.json |
| 249 | +
|
| 250 | + - name: Upload JSON |
| 251 | + uses: actions/upload-artifact@v4 |
| 252 | + with: |
| 253 | + name: ${{ matrix.os }}-results.json |
| 254 | + path: results.json |
| 255 | + if-no-files-found: error |
136 | 256 |
|
137 | 257 | run-kani-list: |
138 | 258 | name: Kani List |
@@ -188,12 +308,14 @@ jobs: |
188 | 308 | # Step 3: Add output to job summary |
189 | 309 | - name: Add Autoharness Analyzer output to job summary |
190 | 310 | run: | |
| 311 | + pushd scripts/autoharness_analyzer |
191 | 312 | echo "# Autoharness Failure Summary" >> "$GITHUB_STEP_SUMMARY" |
192 | 313 | echo "## Crate core, all functions" >> "$GITHUB_STEP_SUMMARY" |
193 | | - cat autoharness_analyzer/core_autoharness_data.md >> "$GITHUB_STEP_SUMMARY" |
| 314 | + cat core_autoharness_data.md >> "$GITHUB_STEP_SUMMARY" |
194 | 315 | echo "## Crate core, unsafe functions" >> "$GITHUB_STEP_SUMMARY" |
195 | | - cat autoharness_analyzer/core_autoharness_data.md >> "$GITHUB_STEP_SUMMARY" |
| 316 | + cat core_autoharness_data.md >> "$GITHUB_STEP_SUMMARY" |
196 | 317 | echo "## Crate std, all functions" >> "$GITHUB_STEP_SUMMARY" |
197 | | - cat autoharness_analyzer/std_autoharness_data.md >> "$GITHUB_STEP_SUMMARY" |
| 318 | + cat std_autoharness_data.md >> "$GITHUB_STEP_SUMMARY" |
198 | 319 | echo "## Crate std, unsafe functions" >> "$GITHUB_STEP_SUMMARY" |
199 | | - cat autoharness_analyzer/std_unsafe_autoharness_data.md >> "$GITHUB_STEP_SUMMARY" |
| 320 | + cat std_unsafe_autoharness_data.md >> "$GITHUB_STEP_SUMMARY" |
| 321 | + popd |
0 commit comments