From 66ee45afef7b03a02a4b7b5c9a76d398ba2ebeb7 Mon Sep 17 00:00:00 2001 From: tooomm Date: Sat, 24 May 2025 15:43:56 +0200 Subject: [PATCH] Update desktop-build.yml --- .github/workflows/desktop-build.yml | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/.github/workflows/desktop-build.yml b/.github/workflows/desktop-build.yml index 1a9f18661..36d7dfa57 100644 --- a/.github/workflows/desktop-build.yml +++ b/.github/workflows/desktop-build.yml @@ -125,7 +125,8 @@ jobs: continue-on-error: ${{matrix.allow-failure == 'yes'}} env: NAME: ${{matrix.distro}}${{matrix.version}} - CACHE: /tmp/${{matrix.distro}}${{matrix.version}}-cache # ${{runner.temp}} does not work? + CACHE: ${{github.workspace}}/.ccache/${{matrix.distro}}${{matrix.version}} + CCACHE_COMPILERCHECK: content # Cache size over the entire repo is 10Gi: # https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#usage-limits-and-eviction-policy CCACHE_SIZE: 500M @@ -135,10 +136,6 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Build ${{matrix.distro}} ${{matrix.version}} Docker image - shell: bash - run: source .ci/docker.sh --build - - name: Restore compiler cache (ccache) id: ccache_restore uses: actions/cache/restore@v4 @@ -149,6 +146,10 @@ jobs: key: ccache-${{matrix.distro}}${{matrix.version}}-${{env.BRANCH_NAME}} restore-keys: ccache-${{matrix.distro}}${{matrix.version}}- + - name: Build ${{matrix.distro}} ${{matrix.version}} Docker image + shell: bash + run: source .ci/docker.sh --build + - name: Build debug and test if: matrix.test != 'skip' shell: bash @@ -165,11 +166,11 @@ jobs: env: BUILD_DIR: build SUFFIX: '-${{matrix.distro}}${{matrix.version}}' - type: '${{matrix.package}}' + package: '${{matrix.package}}' CMAKE_GENERATOR: '${{env.CMAKE_GENERATOR}}' run: | source .ci/docker.sh - RUN --server --release --package "$type" --dir "$BUILD_DIR" \ + RUN --server --release --package "$package" --dir "$BUILD_DIR" \ --ccache "$CCACHE_SIZE" .ci/name_build.sh @@ -235,7 +236,9 @@ jobs: runs-on: ${{matrix.os}} continue-on-error: ${{matrix.allow-failure == 'yes'}} env: - CCACHE_DIR: /tmp/${{matrix.os}}-${{matrix.type}}-cache + CCACHE_DIR: ${{github.workspace}}/.ccache/${{matrix.os}}-${{matrix.type}} + CCACHE_COMPILERCHECK: content + CCACHE_SIZE: 500M DEVELOPER_DIR: /Applications/Xcode_${{matrix.xcode}}.app/Contents/Developer CMAKE_GENERATOR: 'Ninja' @@ -269,7 +272,6 @@ jobs: id: build env: BUILDTYPE: '${{matrix.type}}' - MAKE_TEST: 1 MAKE_PACKAGE: '${{matrix.make_package}}' PACKAGE_SUFFIX: '-macOS${{matrix.target}}_${{matrix.soc}}' MACOS_CERTIFICATE: ${{ secrets.PROD_MACOS_CERTIFICATE }} @@ -288,7 +290,7 @@ jobs: security import certificate.p12 -k build.keychain -P "$MACOS_CERTIFICATE_PWD" -T /usr/bin/codesign security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "$MACOS_CI_KEYCHAIN_PWD" build.keychain fi - .ci/compile.sh --server --ccache "$CCACHE_SIZE" + .ci/compile.sh --server --test --ccache "$CCACHE_SIZE" - name: Save compiler cache (ccache) if: github.ref == 'refs/heads/master' @@ -350,7 +352,7 @@ jobs: if-no-files-found: error - name: Upload to release - if: matrix.package != 'skip' && needs.configure.outputs.tag != null + if: matrix.make_package && needs.configure.outputs.tag != null shell: bash env: GH_TOKEN: ${{github.token}} @@ -438,7 +440,7 @@ jobs: if-no-files-found: error - name: Upload to release - if: matrix.package != 'skip' && needs.configure.outputs.tag != null + if: needs.configure.outputs.tag != null shell: bash env: GH_TOKEN: ${{github.token}}