Cache Windows CIs, solution by @Artalus (#985)
Some checks are pending
Reuse / reuse (push) Waiting to run
Clang Format / clang-format (push) Waiting to run
Linux-Qt / build (push) Waiting to run
Linux / build (push) Waiting to run
macOS-Qt / build (push) Waiting to run
macOS / build (push) Waiting to run
Windows-Qt / build (push) Waiting to run
Windows / build (push) Waiting to run

* ci: Add ccache with ninja generator for Windows builds
- Credits to @Artalus

* ci: Don't include d3d and dxc compiler DLLs

* ci: Simplify cache steps names and key names
- Windows builds will no longer cause issues when merging

* CI trigger
This commit is contained in:
Plínio Larrubia 2024-09-19 11:38:34 -03:00 committed by GitHub
parent cf4824a008
commit d07c81e0d2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 51 additions and 25 deletions

View file

@ -25,10 +25,10 @@ jobs:
run: > run: >
sudo apt-get update && sudo apt install libx11-dev libxext-dev libwayland-dev libfuse2 clang build-essential qt6-base-dev qt6-tools-dev 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 - name: Cache CMake Configuration
uses: actions/cache@v4 uses: actions/cache@v4
env: env:
cache-name: ${{ runner.os }}-qt-cache-cmake-dependency-sources cache-name: ${{ runner.os }}-qt-cache-cmake-configuration
with: with:
path: | path: |
${{github.workspace}}/build ${{github.workspace}}/build
@ -36,10 +36,10 @@ jobs:
restore-keys: | restore-keys: |
${{ env.cache-name }}- ${{ env.cache-name }}-
- name: Cache CMake dependency build objects - name: Cache CMake Build
uses: hendrikmuhs/ccache-action@v1.2.14 uses: hendrikmuhs/ccache-action@v1.2.14
env: env:
cache-name: ${{ runner.os }}-qt-cache-cmake-dependency-builds cache-name: ${{ runner.os }}-qt-cache-cmake-build
with: with:
append-timestamp: false append-timestamp: false
key: ${{ env.cache-name }}-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }} key: ${{ env.cache-name }}-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }}

View file

@ -25,10 +25,10 @@ jobs:
run: > run: >
sudo apt-get update && sudo apt install libx11-dev libxext-dev libwayland-dev libfuse2 clang build-essential sudo apt-get update && sudo apt install libx11-dev libxext-dev libwayland-dev libfuse2 clang build-essential
- name: Cache CMake dependency source code - name: Cache CMake Configuration
uses: actions/cache@v4 uses: actions/cache@v4
env: env:
cache-name: ${{ runner.os }}-sdl-cache-cmake-dependency-sources cache-name: ${{ runner.os }}-sdl-cache-cmake-configuration
with: with:
path: | path: |
${{github.workspace}}/build ${{github.workspace}}/build
@ -36,10 +36,10 @@ jobs:
restore-keys: | restore-keys: |
${{ env.cache-name }}- ${{ env.cache-name }}-
- name: Cache CMake dependency build objects - name: Cache CMake Build
uses: hendrikmuhs/ccache-action@v1.2.14 uses: hendrikmuhs/ccache-action@v1.2.14
env: env:
cache-name: ${{ runner.os }}-sdl-cache-cmake-dependency-builds cache-name: ${{ runner.os }}-sdl-cache-cmake-build
with: with:
append-timestamp: false append-timestamp: false
key: ${{ env.cache-name }}-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }} key: ${{ env.cache-name }}-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }}

View file

@ -40,10 +40,10 @@ jobs:
arch: clang_64 arch: clang_64
archives: qtbase qttools archives: qtbase qttools
- name: Cache CMake dependency source code - name: Cache CMake Configuration
uses: actions/cache@v4 uses: actions/cache@v4
env: env:
cache-name: ${{ runner.os }}-qt-cache-cmake-dependency-sources cache-name: ${{ runner.os }}-qt-cache-cmake-configuration
with: with:
path: | path: |
${{github.workspace}}/build ${{github.workspace}}/build
@ -51,10 +51,10 @@ jobs:
restore-keys: | restore-keys: |
${{ env.cache-name }}- ${{ env.cache-name }}-
- name: Cache CMake dependency build objects - name: Cache CMake Build
uses: hendrikmuhs/ccache-action@v1.2.14 uses: hendrikmuhs/ccache-action@v1.2.14
env: env:
cache-name: ${{runner.os}}-qt-cache-cmake-dependency-builds cache-name: ${{runner.os}}-qt-cache-cmake-build
with: with:
append-timestamp: false append-timestamp: false
create-symlink: true create-symlink: true

View file

@ -31,10 +31,10 @@ jobs:
arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
arch -x86_64 /usr/local/bin/brew install molten-vk arch -x86_64 /usr/local/bin/brew install molten-vk
- name: Cache CMake dependency source code - name: Cache CMake Configuration
uses: actions/cache@v4 uses: actions/cache@v4
env: env:
cache-name: ${{ runner.os }}-sdl-cache-cmake-dependency-sources cache-name: ${{ runner.os }}-sdl-cache-cmake-configuration
with: with:
path: | path: |
${{github.workspace}}/build ${{github.workspace}}/build
@ -42,10 +42,10 @@ jobs:
restore-keys: | restore-keys: |
${{ env.cache-name }}- ${{ env.cache-name }}-
- name: Cache CMake dependency build objects - name: Cache CMake Build
uses: hendrikmuhs/ccache-action@v1.2.14 uses: hendrikmuhs/ccache-action@v1.2.14
env: env:
cache-name: ${{runner.os}}-sdl-cache-cmake-dependency-builds cache-name: ${{runner.os}}-sdl-cache-cmake-build
with: with:
append-timestamp: false append-timestamp: false
create-symlink: true create-symlink: true

View file

@ -30,10 +30,10 @@ jobs:
arch: win64_msvc2019_64 arch: win64_msvc2019_64
archives: qtbase qttools archives: qtbase qttools
- name: Cache CMake dependency source code - name: Cache CMake Configuration
uses: actions/cache@v4 uses: actions/cache@v4
env: env:
cache-name: ${{ runner.os }}-qt-cache-cmake-dependency-sources cache-name: ${{ runner.os }}-qt-ninja-cache-cmake-configuration
with: with:
path: | path: |
${{github.workspace}}/build ${{github.workspace}}/build
@ -41,8 +41,21 @@ jobs:
restore-keys: | restore-keys: |
${{ env.cache-name }}- ${{ env.cache-name }}-
- name: Cache CMake Build
uses: hendrikmuhs/ccache-action@v1.2.14
env:
cache-name: ${{ runner.os }}-qt-cache-cmake-build
with:
append-timestamp: false
key: ${{ env.cache-name }}-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }}
- name: Setup VS Environment
uses: ilammy/msvc-dev-cmd@v1.13.0
with:
arch: amd64
- name: Configure CMake - name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -T ClangCL -DENABLE_QT_GUI=ON run: cmake -G Ninja -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DENABLE_QT_GUI=ON -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
- name: Build - name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel
@ -50,8 +63,8 @@ jobs:
- name: Deploy - name: Deploy
run: | run: |
mkdir upload mkdir upload
move build/Release/shadPS4.exe upload move build/shadPS4.exe upload
windeployqt --dir upload upload/shadPS4.exe windeployqt --no-compiler-runtime --no-system-d3d-compiler --no-system-dxc-compiler --dir upload upload/shadPS4.exe
- name: Get date and git hash - name: Get date and git hash
id: vars id: vars

View file

@ -20,10 +20,10 @@ jobs:
with: with:
submodules: recursive submodules: recursive
- name: Cache CMake dependency source code - name: Cache CMake Configuration
uses: actions/cache@v4 uses: actions/cache@v4
env: env:
cache-name: ${{ runner.os }}-sdl-cache-cmake-dependency-sources cache-name: ${{ runner.os }}-sdl-ninja-cache-cmake-configuration
with: with:
path: | path: |
${{github.workspace}}/build ${{github.workspace}}/build
@ -31,8 +31,21 @@ jobs:
restore-keys: | restore-keys: |
${{ env.cache-name }}- ${{ env.cache-name }}-
- name: Cache CMake Build
uses: hendrikmuhs/ccache-action@v1.2.14
env:
cache-name: ${{ runner.os }}-sdl-cache-cmake-build
with:
append-timestamp: false
key: ${{ env.cache-name }}-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }}
- name: Setup VS Environment
uses: ilammy/msvc-dev-cmd@v1.13.0
with:
arch: amd64
- name: Configure CMake - name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -T ClangCL run: cmake -G Ninja -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
- name: Build - name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel
@ -49,4 +62,4 @@ jobs:
with: with:
name: shadps4-win64-sdl-${{ steps.vars.outputs.date }}-${{ steps.vars.outputs.shorthash }} name: shadps4-win64-sdl-${{ steps.vars.outputs.date }}-${{ steps.vars.outputs.shorthash }}
path: | path: |
${{github.workspace}}/build/Release/shadPS4.exe ${{github.workspace}}/build/shadPS4.exe