github builds: on linux, compile PRs with clang as well (#1170)

PR builds will be compiled with both GCC and Clang to more easily spot
errors.

There is still only one Linux artifact, the GCC one.

build.yml and build-nightly.yml will still only use GCC. The only
changes there are switching to ninja and adjusting the name of
the github cache to be consitent with build-pr.

Also the Windows CCache binary was updated to the latest version
This commit is contained in:
Dennis Brakhane
2025-07-14 14:01:27 +02:00
committed by GitHub
parent 4ec7c94631
commit f59bd4f9a9
3 changed files with 28 additions and 15 deletions
+1
View File
@@ -47,6 +47,7 @@ jobs:
linux:
name: linux (gcc)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
+21 -11
View File
@@ -4,7 +4,7 @@ on:
pull_request
env:
CCACHE_VERSION: 4.10.2
CCACHE_VERSION: 4.11.3
# needed because wiRenderer uses conditional include via __hasinclude
CCACHE_NODIRECT: 1
@@ -20,8 +20,8 @@ jobs:
uses: actions/cache/restore@v4
with:
path: C:\Users\runneradmin\AppData\Local\ccache
key: win-ccache-${{ github.run_id }}
restore-keys: win-ccache-
key: ccache-win-${{ github.run_id }}
restore-keys: ccache-win-
- name: Install Ccache
run: |
@@ -80,6 +80,17 @@ jobs:
linux:
runs-on: ubuntu-latest
name: linux (${{ matrix.cc }})
strategy:
matrix:
include:
- cc: gcc
cxx: g++
package_bins: true
- cc: clang
cxx: clang++
package_bins: false
steps:
- uses: actions/checkout@v4
@@ -88,8 +99,8 @@ jobs:
uses: actions/cache/restore@v4
with:
path: ~/.cache/ccache
key: ccache-${{ github.run_id }}
restore-keys: ccache-
key: ccache-${{ matrix.cc }}-${{ github.run_id }}
restore-keys: ccache-${{ matrix.cc }}-
- name: Install dependencies
run: |
@@ -98,10 +109,8 @@ jobs:
- name: Initial compile
run: |
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
CCACHE_NODIRECT=1 make -j$(nproc)
CC=${{ matrix.cc }} CXX=${{ matrix.cxx }} cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
make -C build -j$(nproc)
- name: Generate shader dump
run: |
@@ -111,8 +120,7 @@ jobs:
- name: Recompile with shader dump
run: |
cd build
CCACHE_NODIRECT=1 make -B -j $(nproc)
make -C build -B -j$(nproc)
- name: Save Ccache database
id: save-ccache
@@ -123,6 +131,7 @@ jobs:
key: ${{ steps.restore-ccache.outputs.cache-primary-key }}
- name: Move binaries
if: matrix.package_bins
run: |
mv build/Editor/Editor ./Editor_Linux
mv Editor/config.ini ./
@@ -130,6 +139,7 @@ jobs:
mv Editor/fonts ./
- name: Package Editor
if: matrix.package_bins
uses: actions/upload-artifact@v4
with:
name: Editor (Linux)
+6 -4
View File
@@ -5,7 +5,8 @@ on:
branches: [ master ]
env:
CCACHE_VERSION: 4.10.2
CCACHE_VERSION: 4.11.3
# needed because wiRenderer uses conditional include via __hasinclude
CCACHE_NODIRECT: 1
jobs:
@@ -79,6 +80,7 @@ jobs:
linux:
name: linux (gcc)
runs-on: ubuntu-latest
steps:
@@ -89,7 +91,7 @@ jobs:
uses: actions/cache/restore@v4
with:
path: ~/.cache/ccache
key: ccache-${{ github.run_id }}
key: ccache-gcc-${{ github.run_id }}
restore-keys: ccache-
- name: Install dependencies
@@ -102,7 +104,7 @@ jobs:
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
CCACHE_NODIRECT=1 make -j$(nproc)
make -j$(nproc)
- name: Generate shader dump
run: |
cd build/WickedEngine
@@ -112,7 +114,7 @@ jobs:
- name: Recompile with shader dump
run: |
cd build
CCACHE_NODIRECT=1 make -B -j $(nproc)
make -B -j $(nproc)
- name: Save Ccache database
id: save-ccache