mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-06-24 19:36:17 +00:00
ci: enable cmake cache on all platforms (SDL/Qt) (#622)
- uses actions/cache@v4 and hendrikmuhs/ccache-action@v1.2.14 - Keeps the cache from CMake Cache configuration (Windows, Linux, macOS) - Keeps the cache from CMake build objects (Linux/macOS) - Use ccache for Linux builds - Use sccache for macOS builds - Add hashes to the s/ccache keys - Update cache names with OS-qt/sdl as a prefix - All old caches are invalidated, delete them or wait for cache eviction
This commit is contained in:
parent
16363ac692
commit
81f7c830be
6 changed files with 107 additions and 5 deletions
23
.github/workflows/linux-qt.yml
vendored
23
.github/workflows/linux-qt.yml
vendored
|
@ -25,8 +25,27 @@ jobs:
|
|||
run: >
|
||||
sudo apt-get update && sudo apt install libx11-dev libxext-dev libwayland-dev libfuse2 clang build-essential qt6-base-dev qt6-tools-dev
|
||||
|
||||
- name: Cache CMake dependency source code
|
||||
uses: actions/cache@v4
|
||||
env:
|
||||
cache-name: ${{ runner.os }}-qt-cache-cmake-dependency-sources
|
||||
with:
|
||||
path: |
|
||||
${{github.workspace}}/build
|
||||
key: ${{ env.cache-name }}-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }}
|
||||
restore-keys: |
|
||||
${{ env.cache-name }}-
|
||||
|
||||
- name: Cache CMake dependency build objects
|
||||
uses: hendrikmuhs/ccache-action@v1.2.14
|
||||
env:
|
||||
cache-name: ${{ runner.os }}-qt-cache-cmake-dependency-builds
|
||||
with:
|
||||
append-timestamp: false
|
||||
key: ${{ env.cache-name }}-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }}
|
||||
|
||||
- name: Configure CMake
|
||||
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DENABLE_QT_GUI=ON
|
||||
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DENABLE_QT_GUI=ON -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
|
||||
|
||||
- name: Build
|
||||
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel
|
||||
|
@ -44,4 +63,4 @@ jobs:
|
|||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: shadps4-linux-qt-${{ steps.vars.outputs.date }}-${{ steps.vars.outputs.shorthash }}
|
||||
path: Shadps4-qt.AppImage
|
||||
path: Shadps4-qt.AppImage
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue