Skip to content

Commit 235faa3

Browse files
committed
ci: use mozilla/sccache v0.18.0 via sccache-action, drop obsolete ACTIONS_ vars
Install sccache with mozilla-actions/sccache-action (pinned to v0.18.0) in build-wheel.yml and test-sdist-linux.yml instead of the rapidsai fork, and remove the custom install and github-script steps. Drop ACTIONS_CACHE_URL and ACTIONS_RUNTIME_URL, which the GHA v2 cache backend does not read.
1 parent d1e6fbe commit 235faa3

1 file changed

Lines changed: 10 additions & 23 deletions

File tree

‎.github/workflows/build-wheel.yml‎

Lines changed: 10 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -86,31 +86,18 @@ jobs:
8686
# the job level instead of linking into the diff.
8787
run: echo "::add-matcher::.github/matchers/compiler.json"
8888

89-
- name: Install mozilla/sccache
89+
# Cython packages need sccache. Compiles run inside the cibuildwheel
90+
# container, which does not inherit the runner's cache credentials; the
91+
# env vars exported by this action (ACTIONS_CACHE_SERVICE_V2,
92+
# ACTIONS_RESULTS_URL, ACTIONS_RUNTIME_TOKEN, SCCACHE_PATH) are forwarded
93+
# explicitly via CIBW_ENVIRONMENT_LINUX below. Stats are reported from
94+
# inside the container, so the action's own (host-side) reporting is off.
95+
- name: Enable sccache
9096
if: ${{ startsWith(inputs.host-platform, 'linux') && (env.BUILD_BINDINGS == 'true' || env.BUILD_CORE == 'true') }}
91-
env:
92-
SCCACHE_VERSION: v0.18.0
93-
run: |
94-
asset="sccache-${SCCACHE_VERSION}-$(uname -m)-unknown-linux-musl.tar.gz"
95-
base_url="https://github.com/mozilla/sccache/releases/download/${SCCACHE_VERSION}"
96-
curl -fsSLO "${base_url}/${asset}"
97-
# The .sha256 file contains only the hex digest.
98-
echo "$(curl -fsSL "${base_url}/${asset}.sha256") ${asset}" | sha256sum --check -
99-
sudo tar -C /usr/local/bin -xvzf "${asset}" --wildcards --strip-components=1 -x '*/sccache'
100-
rm -f "${asset}"
101-
echo "SCCACHE_PATH=/usr/local/bin/sccache" >> "$GITHUB_ENV"
102-
103-
# The runner only exposes these values to actions, not to `run:` steps or
104-
# the cibuildwheel container, so re-export them for sccache's GHA backend.
105-
# xref: https://github.com/orgs/community/discussions/42856#discussioncomment-7678867
106-
- name: Adding addtional GHA cache-related env vars
107-
if: ${{ env.BUILD_BINDINGS == 'true' || env.BUILD_CORE == 'true' }}
108-
uses: actions/github-script@v9
97+
uses: mozilla-actions/sccache-action@fc920bf0ec8de6ee65d409111f7ec508035751ba # 0.0.11
10998
with:
110-
script: |
111-
core.exportVariable('ACTIONS_CACHE_SERVICE_V2', 'on');
112-
core.exportVariable('ACTIONS_RESULTS_URL', process.env['ACTIONS_RESULTS_URL'] || '');
113-
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env['ACTIONS_RUNTIME_TOKEN'] || '');
99+
version: v0.18.0
100+
disable_annotations: 'true'
114101

115102
- name: Setup proxy cache
116103
uses: nv-gha-runners/setup-proxy-cache@main

0 commit comments

Comments
 (0)