Skip to content

Commit 86100f1

Browse files
committed
try messing with setup godot
1 parent 555fbbd commit 86100f1

File tree

3 files changed

+66
-27
lines changed

3 files changed

+66
-27
lines changed
Lines changed: 64 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,110 @@
11
name: Setup godot-cpp
2-
description: Setup build dependencies for godot-cpp.
2+
description: Setup build dependencies for godot-cpp (SCons or CMake).
33

44
inputs:
55
platform:
66
required: true
77
description: Target platform.
8-
em-version:
9-
default: 4.0.11
10-
description: Emscripten version.
11-
windows-compiler:
12-
description: The compiler toolchain to use on Windows ('mingw' or 'msvc').
8+
type: choice
9+
options:
10+
- linux
11+
- windows
12+
- macos
13+
- android
14+
- web
15+
16+
compiler:
17+
description: Compiler toolchain (auto selects sensible default per platform).
1318
required: false
14-
default: mingw
19+
default: auto
1520
type: choice
1621
options:
17-
- mingw
22+
- auto
23+
- gcc
24+
- clang
1825
- msvc
26+
- mingw
27+
1928
mingw-version:
2029
default: 12.2.0
21-
description: MinGW version.
30+
description: MinGW version (used only for windows + mingw).
31+
2232
ndk-version:
2333
default: r28b
2434
description: Android NDK version.
35+
36+
em-version:
37+
default: 3.1.74
38+
description: Emscripten version (recommended for Godot 4.x web).
39+
2540
buildtool:
41+
description: Build tool to prepare (scons or cmake).
2642
default: scons
27-
description: scons or cmake
43+
type: choice
44+
options:
45+
- scons
46+
- cmake
47+
2848
scons-version:
29-
default: 4.4.0
49+
default: 4.8.0
3050
description: SCons version.
3151

32-
3352
runs:
3453
using: composite
3554
steps:
36-
- name: Setup Python (for SCons)
55+
- name: Setup Python
3756
uses: actions/setup-python@v5
3857
with:
39-
python-version: 3.x
58+
python-version: 3.12
4059

41-
- name: Setup Android dependencies
42-
if: ${{inputs.platform == 'android'}}
60+
# === Compiler Toolchain Setup ===
61+
62+
- name: Setup Clang on Linux or Windows
63+
if: ${{ inputs.platform == 'linux' && inputs.compiler == 'clang' }}
64+
uses: egor-tensin/setup-clang@v2
65+
with:
66+
version: 18
67+
68+
- name: Setup MinGW (Windows)
69+
if: ${{ inputs.platform == 'windows' && (inputs.compiler == 'mingw' || (inputs.compiler == 'auto' && inputs.compiler != 'msvc')) }}
70+
uses: egor-tensin/setup-mingw@v2
71+
with:
72+
version: ${{ inputs.mingw-version }}
73+
74+
# MSVC requires no extra setup on windows-latest runners (Visual Studio is preinstalled)
75+
76+
- name: Setup Android NDK
77+
if: ${{ inputs.platform == 'android' }}
4378
uses: nttld/setup-ndk@v1
4479
with:
4580
ndk-version: ${{ inputs.ndk-version }}
4681
link-to-sdk: true
4782

48-
- name: Setup Web dependencies
49-
if: ${{inputs.platform == 'web'}}
83+
- name: Setup Emscripten (Web)
84+
if: ${{ inputs.platform == 'web' }}
5085
uses: mymindstorm/setup-emsdk@v14
5186
with:
5287
version: ${{ inputs.em-version }}
5388
no-cache: true
5489

55-
- name: Setup MinGW for Windows/MinGW build
56-
if: ${{inputs.platform == 'windows' && inputs.windows-compiler == 'mingw'}}
57-
uses: egor-tensin/setup-mingw@v2
58-
with:
59-
version: ${{ inputs.mingw-version }}
90+
# macOS uses AppleClang by default — no extra setup needed on macos-latest
91+
92+
# === Build Tool Setup ===
6093

6194
- name: Setup SCons
6295
if: ${{ inputs.buildtool == 'scons' }}
6396
shell: bash
6497
run: |
65-
python -c "import sys; print(sys.version)"
6698
python -m pip install scons==${{ inputs.scons-version }}
6799
scons --version
68100
69-
- name: Install Ninja
101+
- name: Install Ninja (for CMake)
70102
if: ${{ inputs.buildtool == 'cmake' }}
71103
uses: ashutoshvarma/setup-ninja@v1.1
104+
105+
- name: Debug chosen configuration
106+
shell: bash
107+
run: |
108+
echo "Platform : ${{ inputs.platform }}"
109+
echo "Compiler : ${{ inputs.compiler }}"
110+
echo "Buildtool: ${{ inputs.buildtool }}"

.github/workflows/ci-cmake.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ jobs:
150150
uses: ./.github/actions/setup-godot-cpp
151151
with:
152152
platform: ${{ matrix.platform }}
153-
windows-compiler: ${{ matrix.compiler }}
153+
compiler: ${{ matrix.compiler }}
154154
buildtool: cmake
155155

156156
- name: Clean committed macOS framework bundles for CMake

.github/workflows/ci-scons.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ jobs:
133133
uses: ./.github/actions/setup-godot-cpp
134134
with:
135135
platform: ${{ matrix.platform }}
136-
windows-compiler: ${{ contains(matrix.flags, 'use_mingw=yes') && 'mingw' || 'msvc' }}
136+
compiler: ${{ contains(matrix.flags, 'use_mingw=yes') && 'mingw' || 'msvc' }}
137137
buildtool: scons
138138

139139
- name: Generate godot-cpp sources only

0 commit comments

Comments
 (0)