CI: sccache cache keys can be simpler
This commit is contained in:
10
.github/scripts/setup-sccache.sh
vendored
10
.github/scripts/setup-sccache.sh
vendored
@@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
export SCCACHE_VERSION="${SCCACHE_VERSION:=0.9.0}"
|
||||
export SCCACHE_VERSION="${SCCACHE_VERSION:=0.9.1}"
|
||||
|
||||
export sccache_arch="x86_64"
|
||||
if [ "$RUNNER_ARCH" = "X86" ]; then
|
||||
@@ -19,12 +19,12 @@ install_sccache() {
|
||||
|
||||
echo "Downloading $sccache_url..."
|
||||
if ! wget -q "$sccache_url"; then
|
||||
echo "Can't download $sccache_url.">2
|
||||
echo "Can't download $sccache_url." >2
|
||||
exit 1
|
||||
fi
|
||||
echo "Extracting $sccache_archive.tar.gz..."
|
||||
if ! tar -xzf "$sccache_archive.tar.gz" >/dev/null; then
|
||||
echo "Can't extract $sccache_archive.tar.gz">2
|
||||
echo "Can't extract $sccache_archive.tar.gz" >2
|
||||
exit 1
|
||||
fi
|
||||
chmod +x "$sccache_archive/sccache"
|
||||
@@ -61,10 +61,10 @@ echo "sccache installed."
|
||||
|
||||
# Configure
|
||||
mkdir $HOME/.sccache
|
||||
echo "SCCACHE_DIR=$HOME/.sccache" >> $GITHUB_ENV
|
||||
echo "SCCACHE_DIR=$HOME/.sccache" >>$GITHUB_ENV
|
||||
if [ "$RUNNER_DEBUG" = "1" ]; then
|
||||
echo "Running with debug output; cached binary artifacts will be ignored to produce a cleaner build"
|
||||
echo "SCCACHE_RECACHE=true" >> $GITHUB_ENV
|
||||
echo "SCCACHE_RECACHE=true" >>$GITHUB_ENV
|
||||
fi
|
||||
|
||||
echo "sccache configured."
|
||||
|
11
.github/workflows/build-and-test-linux.yaml
vendored
11
.github/workflows/build-and-test-linux.yaml
vendored
@@ -18,7 +18,7 @@ concurrency:
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
SCCACHE_VERSION: "0.9.0"
|
||||
SCCACHE_VERSION: '0.9.1'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -94,10 +94,13 @@ jobs:
|
||||
id: compiler-cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: "${{ env.SCCACHE_DIR }}"
|
||||
key: sccache-${{ matrix.os }}-${{ matrix.x11 }}-${{ matrix.wayland }}-${{ matrix.compiler }}-${{ github.ref }}-${{ github.run_id }}
|
||||
path: '${{ env.SCCACHE_DIR }}'
|
||||
key: sccache-${{ matrix.os }}-${{ matrix.x11 }}-${{ matrix.wayland }}-${{ matrix.compiler }}
|
||||
restore-keys: |
|
||||
sccache-${{ matrix.os }}-${{ matrix.x11 }}-${{ matrix.wayland }}-${{ matrix.compiler }}-${{ github.ref }}
|
||||
sccache-${{ matrix.os }}-${{ matrix.x11 }}-${{ matrix.wayland }}-${{ matrix.compiler }}
|
||||
sccache-${{ matrix.os }}-${{ matrix.x11 }}-${{ matrix.wayland }}
|
||||
sccache-${{ matrix.os }}-${{ matrix.x11 }}
|
||||
sccache-${{ matrix.os }}
|
||||
- name: Configure with CMake
|
||||
run: |
|
||||
set -x # show the commands we're running
|
||||
|
11
.github/workflows/build-and-test-macos.yaml
vendored
11
.github/workflows/build-and-test-macos.yaml
vendored
@@ -18,8 +18,8 @@ concurrency:
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
SCCACHE_VERSION: "0.9.0"
|
||||
|
||||
SCCACHE_VERSION: '0.9.1'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
env:
|
||||
@@ -60,10 +60,11 @@ jobs:
|
||||
id: compiler-cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: "${{ env.SCCACHE_DIR }}"
|
||||
key: sccache-${{ matrix.os }}-${{ github.ref }}-${{ github.run_id }}
|
||||
path: '${{ env.SCCACHE_DIR }}'
|
||||
key: sccache-${{ matrix.os }}
|
||||
restore-keys: |
|
||||
sccache-${{ matrix.os }}-${{ github.ref }}
|
||||
sccache-${{ matrix.os }}
|
||||
sccache-
|
||||
- name: Configure with CMake
|
||||
run: |
|
||||
# Reset sccache statistics
|
||||
|
12
.github/workflows/publish-appimage.yml
vendored
12
.github/workflows/publish-appimage.yml
vendored
@@ -17,7 +17,7 @@ concurrency:
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
SCCACHE_VERSION: "0.9.0"
|
||||
SCCACHE_VERSION: '0.9.1'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -109,7 +109,7 @@ jobs:
|
||||
libc++abi-${CLANG_VERSION}-dev
|
||||
echo "CC=clang-${CLANG_VERSION}" | tee -a $GITHUB_ENV
|
||||
echo "CXX=clang++-${CLANG_VERSION}" | tee -a $GITHUB_ENV
|
||||
|
||||
|
||||
- name: Install sccache
|
||||
if: startsWith(github.ref, 'refs/tags/') != true
|
||||
run: .github/scripts/setup-sccache.sh
|
||||
@@ -118,10 +118,12 @@ jobs:
|
||||
id: compiler-cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: "${{ env.SCCACHE_DIR }}"
|
||||
key: sccache-${{ matrix.os }}-${{ matrix.arch }}-${{ github.ref }}-${{ github.run_id }}
|
||||
path: '${{ env.SCCACHE_DIR }}'
|
||||
key: sccache-${{ matrix.os }}-${{ matrix.arch }}
|
||||
restore-keys: |
|
||||
sccache-${{ matrix.os }}-${{ matrix.arch }}-${{ github.ref }}
|
||||
sccache-${{ matrix.os }}-${{ matrix.arch }}
|
||||
sccache-${{ matrix.os }}
|
||||
sccache-
|
||||
- name: Build AppImage
|
||||
run: ./appimage/build.sh
|
||||
env:
|
||||
|
Reference in New Issue
Block a user