ci: remove stale ccache (#57)

This commit is contained in:
Bruno Alexandre Rosa 2026-03-02 23:21:51 -03:00 committed by GitHub
parent 9794893b63
commit 547e5715af
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 25 additions and 7 deletions

View file

@ -4,7 +4,7 @@ permissions:
contents: write
id-token: write
attestations: write
actions: write # needed for ccache action to be able to delete gha caches
actions: write
on:
push:
@ -41,7 +41,7 @@ on:
# Cancel earlier, unfinished runs of this workflow on the same branch (unless on master)
concurrency:
group: "${{ github.workflow }} @ ${{ github.ref_name }}"
cancel-in-progress: ${{ github.ref_name != 'master' }}
cancel-in-progress: true
jobs:
configure:
@ -171,7 +171,9 @@ jobs:
with:
path: ${{env.CACHE}}
key: ccache-${{matrix.distro}}${{matrix.version}}-${{env.BRANCH_NAME}}
restore-keys: ccache-${{matrix.distro}}${{matrix.version}}-
restore-keys: |
ccache-${{matrix.distro}}${{matrix.version}}-${{env.BRANCH_NAME}}-
ccache-${{matrix.distro}}${{matrix.version}}-master-
- name: Build ${{matrix.distro}} ${{matrix.version}} Docker image
shell: bash
@ -202,6 +204,13 @@ jobs:
--ccache "$CCACHE_SIZE" $NO_CLIENT
.ci/name_build.sh
- name: Delete stale ccache
if: github.ref == 'refs/heads/master'
env:
GH_TOKEN: ${{github.token}}
run: |
gh cache delete "${{ steps.ccache_restore.outputs.cache-primary-key }}" || true
- name: Save compiler cache (ccache)
if: github.ref == 'refs/heads/master'
uses: actions/cache/save@v5
@ -356,7 +365,9 @@ jobs:
with:
path: ${{env.CCACHE_DIR}}
key: ccache-${{matrix.runner}}-${{matrix.soc}}-${{matrix.type}}-${{env.BRANCH_NAME}}
restore-keys: ccache-${{matrix.runner}}-${{matrix.soc}}-${{matrix.type}}-
restore-keys: |
ccache-${{matrix.runner}}-${{matrix.soc}}-${{matrix.type}}-${{env.BRANCH_NAME}}-
ccache-${{matrix.runner}}-${{matrix.soc}}-${{matrix.type}}-master-
- name: Install aqtinstall
if: matrix.os == 'macOS'
@ -443,14 +454,19 @@ jobs:
TARGET_MACOS_VERSION: ${{ matrix.override_target }}
run: .ci/compile.sh --server --test --vcpkg
- name: Delete stale ccache
if: github.ref == 'refs/heads/master' && matrix.use_ccache == 1
env:
GH_TOKEN: ${{github.token}}
run: |
gh cache delete "${{ steps.ccache_restore.outputs.cache-primary-key }}" || true
- name: Save compiler cache (ccache)
if: github.ref == 'refs/heads/master' && matrix.use_ccache == 1
uses: actions/cache/save@v5
env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
with:
path: ${{env.CCACHE_DIR}}
key: ccache-${{matrix.runner}}-${{matrix.soc}}-${{matrix.type}}-${{env.BRANCH_NAME}}
key: ${{ steps.ccache_restore.outputs.cache-primary-key }}
- name: Sign app bundle
if: matrix.os == 'macOS' && matrix.make_package && (github.ref == 'refs/heads/master' || needs.configure.outputs.tag != null)

View file

@ -214,6 +214,7 @@ int main(int argc, char *argv[])
#endif
#ifdef Q_OS_MAC
translationPath = qApp->applicationDirPath() + "/../Resources/translations";
#elif defined(Q_OS_WIN)
translationPath = qApp->applicationDirPath() + "/translations";
@ -237,6 +238,7 @@ int main(int argc, char *argv[])
}
rng = new RNG_SFMT;
const auto bla = 42;
themeManager = new ThemeManager;
soundEngine = new SoundEngine;