|
48 | 48 | # are exposed by this action. |
49 | 49 | - name: Enable sccache |
50 | 50 | uses: mozilla-actions/sccache-action@7d986dd989559c6ecdb630a3fd2557667be217ad # 0.0.9 |
| 51 | + with: |
| 52 | + disable_annotations: 'true' |
51 | 53 |
|
52 | 54 | # xref: https://github.com/orgs/community/discussions/42856#discussioncomment-7678867 |
53 | 55 | - name: Adding addtional GHA cache-related env vars |
@@ -75,20 +77,26 @@ jobs: |
75 | 77 |
|
76 | 78 | - name: Set up MSVC |
77 | 79 | if: ${{ startsWith(inputs.host-platform, 'win') }} |
78 | | - uses: ilammy/msvc-dev-cmd@v1 # TODO: ask admin to allow pinning commits |
| 80 | + uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1 |
79 | 81 |
|
80 | 82 | - name: Set up yq |
81 | 83 | # GitHub made an unprofessional decision to not provide it in their Windows VMs, |
82 | 84 | # see https://github.com/actions/runner-images/issues/7443. |
83 | 85 | if: ${{ startsWith(inputs.host-platform, 'win') }} |
84 | 86 | env: |
85 | | - # doesn't seem there's an easy way to avoid hard-coding it? |
86 | | - YQ_URL: https://github.com/mikefarah/yq/releases/latest/download/yq_windows_amd64.exe |
87 | | - YQ_DIR: yq_latest |
| 87 | + YQ_VERSION: v4.52.5 |
| 88 | + YQ_SHA256: 47594981f3848a4b4447494adeca9555f908f7cf0a89c4da3fd0243a4631da1c |
| 89 | + YQ_DIR: yq |
88 | 90 | shell: pwsh -command ". '{0}'" |
89 | 91 | run: | |
| 92 | + $yqUrl = "https://github.com/mikefarah/yq/releases/download/${env:YQ_VERSION}/yq_windows_amd64.exe" |
90 | 93 | mkdir -Force -ErrorAction SilentlyContinue "${env:YQ_DIR}" | Out-Null |
91 | | - Invoke-WebRequest -UseBasicParsing -OutFile "${env:YQ_DIR}/yq.exe" -Uri "$env:YQ_URL" |
| 94 | + Invoke-WebRequest -UseBasicParsing -OutFile "${env:YQ_DIR}/yq.exe" -Uri "$yqUrl" |
| 95 | + $hash = (Get-FileHash -Algorithm SHA256 "${env:YQ_DIR}/yq.exe").Hash.ToLower() |
| 96 | + if ($hash -ne $env:YQ_SHA256) { |
| 97 | + Write-Error "SHA256 mismatch for yq: expected $env:YQ_SHA256, got $hash" |
| 98 | + exit 1 |
| 99 | + } |
92 | 100 | ls -l $env:YQ_DIR |
93 | 101 | echo "$((Get-Location).Path)\\$env:YQ_DIR" >> $env:GITHUB_PATH |
94 | 102 | $env:Path += ";$((Get-Location).Path)\\$env:YQ_DIR" |
@@ -175,13 +183,22 @@ jobs: |
175 | 183 | CUDA_PYTHON_PARALLEL_LEVEL=${{ env.CUDA_PYTHON_PARALLEL_LEVEL }} |
176 | 184 | # check cache stats before leaving cibuildwheel |
177 | 185 | CIBW_BEFORE_TEST_LINUX: > |
178 | | - "/host/${{ env.SCCACHE_PATH }}" --show-stats |
| 186 | + "/host/${{ env.SCCACHE_PATH }}" --show-stats && |
| 187 | + "/host/${{ env.SCCACHE_PATH }}" --show-stats --stats-format=json > /host/${{ github.workspace }}/sccache_bindings.json |
179 | 188 | # force the test stage to be run (so that before-test is not skipped) |
180 | 189 | # TODO: we might want to think twice on adding this, it does a lot of |
181 | 190 | # things before reaching this command. |
182 | 191 | CIBW_TEST_COMMAND: > |
183 | 192 | echo "ok!" |
184 | 193 |
|
| 194 | + - name: Report sccache stats (cuda.bindings) |
| 195 | + if: ${{ inputs.host-platform != 'win-64' }} |
| 196 | + uses: ./.github/actions/sccache-summary |
| 197 | + with: |
| 198 | + json-file: sccache_bindings.json |
| 199 | + label: "cuda.bindings" |
| 200 | + build-step: "Build cuda.bindings wheel" |
| 201 | + |
185 | 202 | - name: List the cuda.bindings artifacts directory |
186 | 203 | run: | |
187 | 204 | if [[ "${{ inputs.host-platform }}" == win* ]]; then |
@@ -233,13 +250,22 @@ jobs: |
233 | 250 | PIP_FIND_LINKS="$(cygpath -w ${{ env.CUDA_BINDINGS_ARTIFACTS_DIR }})" |
234 | 251 | # check cache stats before leaving cibuildwheel |
235 | 252 | CIBW_BEFORE_TEST_LINUX: > |
236 | | - "/host${{ env.SCCACHE_PATH }}" --show-stats |
| 253 | + "/host${{ env.SCCACHE_PATH }}" --show-stats && |
| 254 | + "/host${{ env.SCCACHE_PATH }}" --show-stats --stats-format=json > /host/${{ github.workspace }}/sccache_core.json |
237 | 255 | # force the test stage to be run (so that before-test is not skipped) |
238 | 256 | # TODO: we might want to think twice on adding this, it does a lot of |
239 | 257 | # things before reaching this command. |
240 | 258 | CIBW_TEST_COMMAND: > |
241 | 259 | echo "ok!" |
242 | 260 |
|
| 261 | + - name: Report sccache stats (cuda.core) |
| 262 | + if: ${{ inputs.host-platform != 'win-64' }} |
| 263 | + uses: ./.github/actions/sccache-summary |
| 264 | + with: |
| 265 | + json-file: sccache_core.json |
| 266 | + label: "cuda.core" |
| 267 | + build-step: "Build cuda.core wheel" |
| 268 | + |
243 | 269 | - name: List the cuda.core artifacts directory and rename |
244 | 270 | run: | |
245 | 271 | if [[ "${{ inputs.host-platform }}" == win* ]]; then |
@@ -412,13 +438,22 @@ jobs: |
412 | 438 | PIP_FIND_LINKS="$(cygpath -w ${{ env.CUDA_BINDINGS_ARTIFACTS_DIR }})" |
413 | 439 | # check cache stats before leaving cibuildwheel |
414 | 440 | CIBW_BEFORE_TEST_LINUX: > |
415 | | - "/host${{ env.SCCACHE_PATH }}" --show-stats |
| 441 | + "/host${{ env.SCCACHE_PATH }}" --show-stats && |
| 442 | + "/host${{ env.SCCACHE_PATH }}" --show-stats --stats-format=json > /host/${{ github.workspace }}/sccache_core_prev.json |
416 | 443 | # force the test stage to be run (so that before-test is not skipped) |
417 | 444 | # TODO: we might want to think twice on adding this, it does a lot of |
418 | 445 | # things before reaching this command. |
419 | 446 | CIBW_TEST_COMMAND: > |
420 | 447 | echo "ok!" |
421 | 448 |
|
| 449 | + - name: Report sccache stats (cuda.core prev) |
| 450 | + if: ${{ inputs.host-platform != 'win-64' }} |
| 451 | + uses: ./.github/actions/sccache-summary |
| 452 | + with: |
| 453 | + json-file: sccache_core_prev.json |
| 454 | + label: "cuda.core (prev CTK)" |
| 455 | + build-step: "Build cuda.core wheel" |
| 456 | + |
422 | 457 | - name: List the cuda.core artifacts directory and rename |
423 | 458 | run: | |
424 | 459 | if [[ "${{ inputs.host-platform }}" == win* ]]; then |
|
0 commit comments