mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2025-09-14 14:36:11 -04:00
ci(setup-deps): always use sccache, simplify restore key
sccache is available on arm runners. we can use the restore key for an easy, unique restore key in the cache too (it also prevents us from re-using the ccache caches!) Signed-off-by: Seth Flynn <getchoo@tuta.io>
This commit is contained in:
parent
04ecd447bc
commit
6d960b9c3c
11
.github/actions/setup-dependencies/action.yml
vendored
11
.github/actions/setup-dependencies/action.yml
vendored
@ -6,6 +6,9 @@ inputs:
|
|||||||
description: Type for the build
|
description: Type for the build
|
||||||
required: true
|
required: true
|
||||||
default: Debug
|
default: Debug
|
||||||
|
artifact-name:
|
||||||
|
description: Name of the uploaded artifact
|
||||||
|
required: true
|
||||||
msystem:
|
msystem:
|
||||||
description: MSYS2 subsystem to use
|
description: MSYS2 subsystem to use
|
||||||
required: false
|
required: false
|
||||||
@ -53,16 +56,16 @@ runs:
|
|||||||
if: ${{ (runner.os != 'Windows' || inputs.msystem == '') && inputs.build-type == 'Debug' }}
|
if: ${{ (runner.os != 'Windows' || inputs.msystem == '') && inputs.build-type == 'Debug' }}
|
||||||
uses: hendrikmuhs/ccache-action@v1.2.18
|
uses: hendrikmuhs/ccache-action@v1.2.18
|
||||||
with:
|
with:
|
||||||
variant: ${{ runner.os == 'Windows' && 'sccache' || 'ccache' }}
|
variant: sccache
|
||||||
create-symlink: ${{ runner.os != 'Windows' }}
|
create-symlink: ${{ runner.os != 'Windows' }}
|
||||||
key: ${{ runner.os }}-qt${{ inputs.qt_ver }}-${{ inputs.architecture }}
|
key: ${{ runner.os }}-${{ runner.arch }}-${{ inputs.artifact-name }}-sccache
|
||||||
|
|
||||||
- name: Use ccache on debug builds
|
- name: Use ccache on debug builds
|
||||||
if: ${{ inputs.build-type == 'Debug' }}
|
if: ${{ inputs.build-type == 'Debug' }}
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
# Only use sccache on MSVC
|
# Only use ccache on MSYS2
|
||||||
CCACHE_VARIANT: ${{ (runner.os == 'Windows' && inputs.msystem == '') && 'sccache' || 'ccache' }}
|
CCACHE_VARIANT: ${{ (runner.os == 'Windows' && inputs.msystem != '') && 'ccache' || 'sccache' }}
|
||||||
run: |
|
run: |
|
||||||
echo "CMAKE_C_COMPILER_LAUNCHER=$CCACHE_VARIANT" >> "$GITHUB_ENV"
|
echo "CMAKE_C_COMPILER_LAUNCHER=$CCACHE_VARIANT" >> "$GITHUB_ENV"
|
||||||
echo "CMAKE_CXX_COMPILER_LAUNCHER=$CCACHE_VARIANT" >> "$GITHUB_ENV"
|
echo "CMAKE_CXX_COMPILER_LAUNCHER=$CCACHE_VARIANT" >> "$GITHUB_ENV"
|
||||||
|
1
.github/workflows/build.yml
vendored
1
.github/workflows/build.yml
vendored
@ -126,6 +126,7 @@ jobs:
|
|||||||
uses: ./.github/actions/setup-dependencies
|
uses: ./.github/actions/setup-dependencies
|
||||||
with:
|
with:
|
||||||
build-type: ${{ inputs.build-type || 'Debug' }}
|
build-type: ${{ inputs.build-type || 'Debug' }}
|
||||||
|
artifact-name: ${{ matrix.artifact-name }}
|
||||||
msystem: ${{ matrix.msystem }}
|
msystem: ${{ matrix.msystem }}
|
||||||
vcvars-arch: ${{ matrix.vcvars-arch }}
|
vcvars-arch: ${{ matrix.vcvars-arch }}
|
||||||
qt-architecture: ${{ matrix.qt-architecture }}
|
qt-architecture: ${{ matrix.qt-architecture }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user