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