feat: add 'use-sccache' input to build workflows for improved caching options

This commit is contained in:
mr. M
2025-04-01 19:34:31 +02:00
parent fea803d4ce
commit dfc9119bbc
5 changed files with 39 additions and 6 deletions

View File

@@ -15,6 +15,11 @@ on:
type: string
required: true
default: ''
use-sccache:
description: 'Use sccache'
required: true
type: boolean
default: false
jobs:
build-linux:
@@ -27,9 +32,9 @@ jobs:
matrix:
arch: [x86_64, aarch64]
env:
SCCACHE_GHA_ENABLED: 'true'
SCCACHE_GHA_ENABLED: ${ inputs.use-sccache }
CARGO_TERM_COLOR: always
RUSTC_WRAPPER: 'sccache'
RUSTC_WRAPPER: ${ inputs.use-sccache && 'sccache' || '' }
CARGO_INCREMENTAL: 0
name: Build Linux - ${{ matrix.arch }}
@@ -56,6 +61,7 @@ jobs:
- name: Run sccache-cache
uses: mozilla-actions/sccache-action@main
if: ${{ inputs.use-sccache }}
with:
disable_annotations: true