From 3686666c6ba0f76eab7ce6ea74232ca239d9e27c Mon Sep 17 00:00:00 2001 From: Dennis Brakhane Date: Tue, 7 Jan 2025 19:36:20 +0100 Subject: [PATCH] GitHub actions: replace deprecated `save-always` --- .github/workflows/build-pr.yml | 28 ++++++++++++++++++---------- .github/workflows/build.yml | 21 ++++++++++++++------- 2 files changed, 32 insertions(+), 17 deletions(-) diff --git a/.github/workflows/build-pr.yml b/.github/workflows/build-pr.yml index a966627c64..e6bef9e01d 100644 --- a/.github/workflows/build-pr.yml +++ b/.github/workflows/build-pr.yml @@ -23,7 +23,7 @@ jobs: run: | "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/MSBuild/Current/Bin/MSBuild.exe" WickedEngine.sln /t:clean /m /p:Configuration=Release /p:Platform=x64 "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/MSBuild/Current/Bin/MSBuild.exe" WickedEngine.sln /t:Editor_Windows /m /p:Configuration=Release /p:Platform=x64 - + - name: Move files shell: cmd run: | @@ -32,7 +32,7 @@ jobs: move Editor\startup.lua .\ move Editor\languages .\ move Editor\fonts .\ - + - name: Package Editor uses: actions/upload-artifact@v4 with: @@ -44,18 +44,19 @@ jobs: startup.lua Editor_Windows.exe - + linux: runs-on: ubuntu-latest steps: - - uses: actions/cache@v4 + - uses: actions/checkout@v4 + + - name: Restore CCache database + id: restore-ccache + uses: actions/cache/restore@v4 with: path: ~/.cache/ccache key: ccache-${{ github.run_id }} restore-keys: ccache - save-always: true - - - uses: actions/checkout@v4 - name: Install dependencies run: | @@ -68,7 +69,7 @@ jobs: cd build cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache CCACHE_NODIRECT=1 make -j$(nproc) - + - name: Generate shader dump run: | cd build/WickedEngine @@ -80,7 +81,14 @@ jobs: cd build CCACHE_NODIRECT=1 make -B -j $(nproc) - + - name: Save Ccache database + id: save-ccache + if: always() && steps.restore-ccache.cache-hit != 'true' + uses: actions/cache/save@v4 + with: + path: /.ccache/ccache + key: ${{ steps.restore-ccache.outputs.cache-primary-key }} + - name: Move binaries run: | mv build/Editor/WickedEngineEditor ./Editor_Linux @@ -88,7 +96,7 @@ jobs: mv Editor/startup.lua ./ mv Editor/languages ./ mv Editor/fonts ./ - + - name: Package Editor uses: actions/upload-artifact@v4 with: diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8c14e467f8..bb22576257 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -50,14 +50,15 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/cache@v4 + - uses: actions/checkout@v4 + + - name: Restore CCache database + id: restore-ccache + uses: actions/cache/restore@v4 with: path: ~/.cache/ccache key: ccache-${{ github.run_id }} restore-keys: ccache - save-always: true - - - uses: actions/checkout@v4 - name: Install dependencies run: | @@ -70,7 +71,6 @@ jobs: cd build cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache CCACHE_NODIRECT=1 make -j$(nproc) - - name: Generate shader dump run: | cd build/WickedEngine @@ -82,7 +82,14 @@ jobs: cd build CCACHE_NODIRECT=1 make -B -j $(nproc) - + - name: Save Ccache database + id: save-ccache + if: always() && steps.restore-ccache.cache-hit != 'true' + uses: actions/cache/save@v4 + with: + path: /.ccache/ccache + key: ${{ steps.restore-ccache.outputs.cache-primary-key }} + - name: Move files run: | mv build/Editor/WickedEngineEditor ./Editor_Linux @@ -90,7 +97,7 @@ jobs: mv Editor/startup.lua ./ mv Editor/languages ./ mv Editor/fonts ./ - + - name: Package Editor uses: actions/upload-artifact@v4 with: