|
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: |
|
87 | 87 | scripts/run-kani.sh --run autoharness --kani-args \ |
88 | 88 | --include-pattern ">::disjoint_bitor" \ |
89 | 89 | --include-pattern ">::unchecked_disjoint_bitor" \ |
| 90 | + --include-pattern alloc::__default_lib_allocator:: \ |
90 | 91 | --include-pattern alloc::layout::Layout::from_size_align \ |
91 | 92 | --include-pattern ascii::ascii_char::AsciiChar::from_u8 \ |
92 | 93 | --include-pattern char::convert::from_u32_unchecked \ |
@@ -130,7 +131,121 @@ jobs: |
130 | 131 | --exclude-pattern ::precondition_check \ |
131 | 132 | --harness-timeout 10m \ |
132 | 133 | --default-unwind 1000 \ |
133 | | - --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 |
134 | 249 |
|
135 | 250 | run-kani-list: |
136 | 251 | name: Kani List |
|
0 commit comments