continuwuity/.forgejo/actions/sccache/action.yml
Tom Foster 1a3107c20a
All checks were successful
Release Docker Image / define-variables (pull_request) Successful in 18s
Documentation / Build and Deploy Documentation (pull_request) Successful in 1m15s
Checks / Prek / Pre-commit & Formatting (pull_request) Successful in 1m40s
Checks / Prek / Clippy and Cargo Tests (pull_request) Successful in 3m45s
Release Docker Image / build-image (linux/arm64, release, linux-arm64, base) (pull_request) Successful in 6m27s
Release Docker Image / build-image (linux/amd64, release, linux-amd64, base) (pull_request) Successful in 6m20s
Release Docker Image / merge (pull_request) Successful in 7s
Documentation / Build and Deploy Documentation (push) Successful in 34s
Checks / Prek / Pre-commit & Formatting (push) Successful in 1m20s
Checks / Prek / Clippy and Cargo Tests (push) Successful in 3m27s
Release Docker Image / define-variables (push) Successful in 6s
Release Docker Image / build-image (linux/amd64, release, linux-amd64, base) (push) Successful in 11m47s
Release Docker Image / build-image (linux/arm64, release, linux-arm64, base) (push) Successful in 11m56s
Release Docker Image / merge (push) Successful in 19s
fix(ci): Replace Mozilla sccache action with token-free alternative
Replace mozilla-actions/sccache-action with a custom Forgejo-specific
implementation that eliminates GitHub token dependencies and rate limiting
issues for all contributors regardless of repository permissions.

The new action mirrors sccache binaries to the Forgejo package registry
and queries that instead of GitHub releases, maintaining identical functionality
including hostedtoolcache support.
2025-09-07 09:29:32 +01:00

23 lines
816 B
YAML

name: sccache
description: |
Install sccache for caching builds in GitHub Actions.
runs:
using: composite
steps:
- name: Install sccache
uses: https://git.tomfos.tr/tom/sccache-action@v1
- name: Configure sccache
uses: https://github.com/actions/github-script@v7
with:
script: |
core.exportVariable('ACTIONS_RESULTS_URL', process.env.ACTIONS_RESULTS_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- shell: bash
run: |
echo "SCCACHE_GHA_ENABLED=true" >> $GITHUB_ENV
echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV
echo "CMAKE_C_COMPILER_LAUNCHER=sccache" >> $GITHUB_ENV
echo "CMAKE_CXX_COMPILER_LAUNCHER=sccache" >> $GITHUB_ENV
echo "CMAKE_CUDA_COMPILER_LAUNCHER=sccache" >> $GITHUB_ENV