diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5c9e1b054..978abd50b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1045,7 +1045,6 @@ jobs: config_opts['plugin_conf']['ccache_enable'] = True config_opts['plugin_conf']['ccache_opts']['max_cache_size'] = '1G' config_opts['plugin_conf']['ccache_opts']['compress'] = True - config_opts['plugin_conf']['ccache_opts']['dir'] = "${{ github.workspace }}/.ccache" EOT # Fedora cmake build (in imhex.spec) @@ -1088,10 +1087,6 @@ jobs: permissions: id-token: write attestations: write - - env: - CCACHE_DIR: "${{ github.workspace }}/.ccache" - steps: - name: ⬇️ Install setup dependencies run: | @@ -1110,7 +1105,8 @@ jobs: - name: 📜 Move snap directory to root run: | mkdir -p ./snap - envsubst '${IMHEX_VERSION}' < ./dist/snap/snapcraft.yaml > ./snap/snapcraft.yaml + echo "CCACHE=ccache" >> $GITHUB_ENV + envsubst '${IMHEX_VERSION},${CCACHE}' < ./dist/snap/snapcraft.yaml > ./snap/snapcraft.yaml - name: 📜 Setup ccache uses: hendrikmuhs/ccache-action@v1 diff --git a/dist/snap/snapcraft.yaml b/dist/snap/snapcraft.yaml index 252ed10e9..2f03c465e 100644 --- a/dist/snap/snapcraft.yaml +++ b/dist/snap/snapcraft.yaml @@ -39,13 +39,12 @@ parts: - CXX: /usr/bin/g++-14 cmake-parameters: - -DCMAKE_BUILD_TYPE=Release - - -DCMAKE_C_COMPILER_LAUNCHER=/usr/bin/ccache - - -DCMAKE_CXX_COMPILER_LAUNCHER=/usr/bin/ccache + - -DCMAKE_C_COMPILER_LAUNCHER=${CCACHE} + - -DCMAKE_CXX_COMPILER_LAUNCHER=${CCACHE} cmake-generator: Ninja build-packages: - cmake - ninja-build - - ccache - gcc-14 - g++-14 - git