From 01adc8a2cd831b579ed044ce05d7931a243e4695 Mon Sep 17 00:00:00 2001 From: iTrooz_ Date: Mon, 27 Jun 2022 00:20:32 +0200 Subject: [PATCH] build: Fix various CI caching issues (#553) * removed restore-keys * updated cache for Ubuntu 22 * using ccache on OBJC and OBJCXX * Bonus: fix release workflow --- .github/workflows/build.yml | 13 +++++++------ .github/workflows/release.yml | 1 + .github/workflows/tests.yml | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 21ee0ef6a..b7ed539fb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -66,7 +66,6 @@ jobs: with: path: ${{ steps.prep-ccache.outputs.dir }} key: ${{ runner.os }}-${{ secrets.CACHE_VERSION }}-build-${{ hashFiles('**/CMakeLists.txt') }} - restore-keys: ${{ runner.os }}-${{ secrets.CACHE_VERSION }}-build-${{ hashFiles('**/CMakeLists.txt') }} - name: 🛠️ Build run: | @@ -85,6 +84,8 @@ jobs: -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ -DCMAKE_C_FLAGS="-fuse-ld=lld" \ -DCMAKE_CXX_FLAGS="-fuse-ld=lld" \ + -DCMAKE_OBJC_COMPILER_LAUNCHER=ccache \ + -DCMAKE_OBJCXX_COMPILER_LAUNCHER=ccache \ -DRUST_PATH="$USERPROFILE/.cargo/bin/" \ .. mingw32-make -j4 install @@ -124,8 +125,7 @@ jobs: with: path: ~/Library/Caches/ccache key: ${{ runner.os }}-${{ secrets.CACHE_VERSION }}-build-${{ hashFiles('**/CMakeLists.txt') }} - restore-keys: ${{ runner.os }}-${{ secrets.CACHE_VERSION }}-build-${{ hashFiles('**/CMakeLists.txt') }} - + - name: 🛠️ Build run: | mkdir -p build @@ -168,11 +168,10 @@ jobs: uses: actions/cache@v3 with: path: | - ~/.ccache + ~/.cache/ccache .flatpak-builder key: ${{ runner.os }}-${{ secrets.CACHE_VERSION }}-build-${{ hashFiles('**/CMakeLists.txt') }} - restore-keys: ${{ runner.os }}-${{ secrets.CACHE_VERSION }}-build-${{ hashFiles('**/CMakeLists.txt') }} - + - name: ⬇️ Install dependencies run: | sudo rm -rf /usr/share/dotnet @@ -206,6 +205,8 @@ jobs: -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ -DCMAKE_C_FLAGS="-fuse-ld=lld" \ -DCMAKE_CXX_FLAGS="-fuse-ld=lld" \ + -DCMAKE_OBJC_COMPILER_LAUNCHER=ccache \ + -DCMAKE_OBJCXX_COMPILER_LAUNCHER=ccache \ -DRUST_PATH="$HOME/.cargo/bin/" \ .. make -j 4 install DESTDIR=AppDir diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 33fad8a08..be8d429d0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -26,6 +26,7 @@ jobs: with: github_token: ${{secrets.GITHUB_TOKEN}} workflow: build.yml + branch: master workflow_conclusion: success skip_unpack: true diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a509f0b44..ad8238470 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -25,7 +25,7 @@ jobs: uses: actions/cache@v3 with: path: | - ~/.ccache + ~/.cache/ccache key: ${{ runner.os }}-${{ secrets.CACHE_VERSION }}-build-${{ hashFiles('**/CMakeLists.txt') }} restore-keys: ${{ runner.os }}-${{ secrets.CACHE_VERSION }}-build-${{ hashFiles('**/CMakeLists.txt') }}