Skip to content

Commit

Permalink
GitHub actions: replace deprecated save-always
Browse files Browse the repository at this point in the history
  • Loading branch information
brakhane committed Jan 7, 2025
1 parent 64c83c7 commit 3686666
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 17 deletions.
28 changes: 18 additions & 10 deletions .github/workflows/build-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -32,7 +32,7 @@ jobs:
move Editor\startup.lua .\
move Editor\languages .\
move Editor\fonts .\
- name: Package Editor
uses: actions/upload-artifact@v4
with:
Expand All @@ -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: |
Expand All @@ -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
Expand All @@ -80,15 +81,22 @@ 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
mv Editor/config.ini ./
mv Editor/startup.lua ./
mv Editor/languages ./
mv Editor/fonts ./
- name: Package Editor
uses: actions/upload-artifact@v4
with:
Expand Down
21 changes: 14 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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
Expand All @@ -82,15 +82,22 @@ 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
mv Editor/config.ini ./
mv Editor/startup.lua ./
mv Editor/languages ./
mv Editor/fonts ./

- name: Package Editor
uses: actions/upload-artifact@v4
with:
Expand Down

0 comments on commit 3686666

Please sign in to comment.