From dc1b346b39b04f2851630a9eec4057f3b3585b97 Mon Sep 17 00:00:00 2001 From: Dennis Brakhane Date: Wed, 8 Jan 2025 08:33:36 +0100 Subject: [PATCH] GitHub actions: replace deprecated `save-always` (#1002) --- .github/workflows/build-pr.yml | 28 ++++++++++++++++++---------- .github/workflows/build.yml | 27 +++++++++++++++++---------- 2 files changed, 35 insertions(+), 20 deletions(-) diff --git a/.github/workflows/build-pr.yml b/.github/workflows/build-pr.yml index a966627c6..56162c190 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: ~/.cache/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 8c14e467f..94f842b5e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,7 +24,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: | @@ -33,7 +33,7 @@ jobs: move Editor\startup.lua .\ move Editor\languages .\ move Editor\fonts .\ - + - name: Package Editor uses: actions/upload-artifact@v4 with: @@ -45,19 +45,20 @@ 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: | @@ -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: ~/.cache/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: