4848 # are exposed by this action.
4949 - name : Enable sccache
5050 uses : mozilla-actions/sccache-action@7d986dd989559c6ecdb630a3fd2557667be217ad # 0.0.9
51+ with :
52+ disable_annotations : ' true'
5153
5254 # xref: https://github.com/orgs/community/discussions/42856#discussioncomment-7678867
5355 - name : Adding addtional GHA cache-related env vars
@@ -75,20 +77,26 @@ jobs:
7577
7678 - name : Set up MSVC
7779 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
7981
8082 - name : Set up yq
8183 # GitHub made an unprofessional decision to not provide it in their Windows VMs,
8284 # see https://github.com/actions/runner-images/issues/7443.
8385 if : ${{ startsWith(inputs.host-platform, 'win') }}
8486 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
8890 shell : pwsh -command ". '{0}'"
8991 run : |
92+ $yqUrl = "https://github.com/mikefarah/yq/releases/download/${env:YQ_VERSION}/yq_windows_amd64.exe"
9093 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+ }
92100 ls -l $env:YQ_DIR
93101 echo "$((Get-Location).Path)\\$env:YQ_DIR" >> $env:GITHUB_PATH
94102 $env:Path += ";$((Get-Location).Path)\\$env:YQ_DIR"
@@ -150,7 +158,7 @@ jobs:
150158 cuda-version : ${{ inputs.cuda-version }}
151159
152160 - name : Build cuda.bindings wheel
153- uses : pypa/cibuildwheel@298ed2fb2c105540f5ed055e8a6ad78d82dd3a7e # v3.3.1
161+ uses : pypa/cibuildwheel@ee02a1537ce3071a004a6b08c41e72f0fdc42d9a # v3.4.0
154162 with :
155163 package-dir : ./cuda_bindings/
156164 output-dir : ${{ env.CUDA_BINDINGS_ARTIFACTS_DIR }}
@@ -175,13 +183,22 @@ jobs:
175183 CUDA_PYTHON_PARALLEL_LEVEL=${{ env.CUDA_PYTHON_PARALLEL_LEVEL }}
176184 # check cache stats before leaving cibuildwheel
177185 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
179188 # force the test stage to be run (so that before-test is not skipped)
180189 # TODO: we might want to think twice on adding this, it does a lot of
181190 # things before reaching this command.
182191 CIBW_TEST_COMMAND : >
183192 echo "ok!"
184193
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+
185202 - name : List the cuda.bindings artifacts directory
186203 run : |
187204 if [[ "${{ inputs.host-platform }}" == win* ]]; then
@@ -204,7 +221,7 @@ jobs:
204221 if-no-files-found : error
205222
206223 - name : Build cuda.core wheel
207- uses : pypa/cibuildwheel@298ed2fb2c105540f5ed055e8a6ad78d82dd3a7e # v3.3.1
224+ uses : pypa/cibuildwheel@ee02a1537ce3071a004a6b08c41e72f0fdc42d9a # v3.4.0
208225 with :
209226 package-dir : ./cuda_core/
210227 output-dir : ${{ env.CUDA_CORE_ARTIFACTS_DIR }}
@@ -233,13 +250,22 @@ jobs:
233250 PIP_FIND_LINKS="$(cygpath -w ${{ env.CUDA_BINDINGS_ARTIFACTS_DIR }})"
234251 # check cache stats before leaving cibuildwheel
235252 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
237255 # force the test stage to be run (so that before-test is not skipped)
238256 # TODO: we might want to think twice on adding this, it does a lot of
239257 # things before reaching this command.
240258 CIBW_TEST_COMMAND : >
241259 echo "ok!"
242260
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+
243269 - name : List the cuda.core artifacts directory and rename
244270 run : |
245271 if [[ "${{ inputs.host-platform }}" == win* ]]; then
@@ -383,7 +409,7 @@ jobs:
383409 rmdir $OLD_BASENAME
384410
385411 - name : Build cuda.core wheel
386- uses : pypa/cibuildwheel@298ed2fb2c105540f5ed055e8a6ad78d82dd3a7e # v3.3.1
412+ uses : pypa/cibuildwheel@ee02a1537ce3071a004a6b08c41e72f0fdc42d9a # v3.4.0
387413 with :
388414 package-dir : ./cuda_core/
389415 output-dir : ${{ env.CUDA_CORE_ARTIFACTS_DIR }}
@@ -412,13 +438,22 @@ jobs:
412438 PIP_FIND_LINKS="$(cygpath -w ${{ env.CUDA_BINDINGS_ARTIFACTS_DIR }})"
413439 # check cache stats before leaving cibuildwheel
414440 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
416443 # force the test stage to be run (so that before-test is not skipped)
417444 # TODO: we might want to think twice on adding this, it does a lot of
418445 # things before reaching this command.
419446 CIBW_TEST_COMMAND : >
420447 echo "ok!"
421448
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+
422457 - name : List the cuda.core artifacts directory and rename
423458 run : |
424459 if [[ "${{ inputs.host-platform }}" == win* ]]; then
0 commit comments