Skip to content

A fast 2D and 3D game engine — TypeScript SDK, C++/WebAssembly core, visual editor. Ship one project to web, desktop, WeChat MiniGames, playable ads, and native Android / iOS.

fix(ci): Dawn's C++20 module target needs a compiler CMake can scan

esengine3092c0e2f0ac
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index dab99a624..abbfca482 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -619,6 +619,12 @@ jobs:
desktop-linux:
name: Desktop host (Linux) + pixels
runs-on: ubuntu-latest
+ # clang, not the runner's default gcc: Dawn ships a C++20 module target, and
+ # CMake refuses to generate for a compiler it cannot scan the import graph
+ # with. It is also what the other two desktops compile with.
+ env:
+ CC: clang
+ CXX: clang++
# The first run on a new dependency pin builds Dawn, which is tens of minutes;
# after that the cache makes it a compile of the host alone.
timeout-minutes: 90
diff --git a/.github/workflows/native-deps-cache.yml b/.github/workflows/native-deps-cache.yml
index c80b6fd05..92b85d12c 100644
--- a/.github/workflows/native-deps-cache.yml
+++ b/.github/workflows/native-deps-cache.yml
@@ -144,6 +144,10 @@ jobs:
if: steps.restore.outputs.cache-hit != 'true'
env:
ANDROID_NDK_HOME: ${{ steps.ndk.outputs.ndk-path }}
+ # See build.yml's desktop-linux job: Dawn's C++20 module target needs a
+ # compiler CMake can scan, and gcc is not one.
+ CC: ${{ matrix.target == 'linux' && 'clang' || '' }}
+ CXX: ${{ matrix.target == 'linux' && 'clang++' || '' }}
run: node build-tools/cli.js native --target ${{ matrix.target }} --build-deps
- name: Save it for every ref in the repository
diff --git a/.github/workflows/release-desktop.yml b/.github/workflows/release-desktop.yml
index 043a193d3..55295dc8a 100644
--- a/.github/workflows/release-desktop.yml
+++ b/.github/workflows/release-desktop.yml
@@ -217,9 +217,19 @@ jobs:
# licensed to partners, so it reaches a package from the developer's own SDK
# (Project Settings -> Packaging -> Steamworks SDK), never from here.
- name: Build the desktop template
- if: matrix.name == 'macos' || matrix.name == 'windows' || matrix.name == 'linux'
+ if: matrix.name == 'macos' || matrix.name == 'windows'
run: node build-tools/cli.js native --target ${{ matrix.name }} --template-out artifacts
+ # Its own step for one reason: clang. Dawn ships a C++20 module target and
+ # CMake will not generate for a compiler whose import graph it cannot scan,
+ # which the runner's default gcc is.
+ - name: Build the desktop template (Linux)
+ if: matrix.name == 'linux'
+ env:
+ CC: clang
+ CXX: clang++
+ run: node build-tools/cli.js native --target linux --template-out artifacts
+
# The claim a template archive cannot make: that a game packaged from it
# DRAWS. These two runners are the platforms themselves, so the pixel judge
# the web target has always had finally reaches the native runtime — no