Skip to content

Commit 8e13217

Browse files
authored
Merge pull request #75 from unvermuthet/main
2 parents 2281ade + 6134a40 commit 8e13217

File tree

1 file changed

+30
-248
lines changed

1 file changed

+30
-248
lines changed

.github/workflows/builds.yml

Lines changed: 30 additions & 248 deletions
Original file line numberDiff line numberDiff line change
@@ -10,252 +10,34 @@ jobs:
1010
strategy:
1111
fail-fast: false
1212
matrix:
13-
include:
14-
# Debug templates
15-
- platform: linux
16-
float-precision: single
17-
arch: x86_64
18-
target-type: template_debug
19-
os: ubuntu-20.04
20-
21-
- platform: windows
22-
float-precision: single
23-
arch: x86_32
24-
target-type: template_debug
25-
os: windows-latest
26-
27-
- platform: windows
28-
float-precision: single
29-
arch: x86_64
30-
target-type: template_debug
31-
os: windows-latest
32-
33-
- platform: macos
34-
float-precision: single
35-
arch: universal
36-
target-type: template_debug
37-
os: macos-latest
38-
39-
- platform: android
40-
float-precision: single
41-
arch: arm64
42-
target-type: template_debug
43-
os: ubuntu-20.04
44-
45-
- platform: android
46-
float-precision: single
47-
arch: arm32
48-
target-type: template_debug
49-
os: ubuntu-20.04
50-
51-
- platform: android
52-
float-precision: single
53-
arch: x86_64
54-
target-type: template_debug
55-
os: ubuntu-20.04
56-
57-
- platform: android
58-
float-precision: single
59-
arch: x86_32
60-
target-type: template_debug
61-
os: ubuntu-20.04
62-
63-
- platform: ios
64-
float-precision: single
65-
arch: arm64
66-
target-type: template_debug
67-
os: macos-latest
68-
69-
- platform: web
13+
# A build is made for every possible combination of parameters
14+
# You can add or remove entries from the arrays of each parameter to custimize which builds you want to run
15+
# See https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/running-variations-of-jobs-in-a-workflow
16+
target:
17+
[
18+
{ platform: linux, arch: x86_64, os: ubuntu-22.04 },
19+
{ platform: windows, arch: x86_64, os: windows-latest },
20+
{ platform: windows, arch: x86_32, os: windows-latest },
21+
{ platform: macos, arch: universal, os: macos-latest },
22+
{ platform: android, arch: arm64, os: ubuntu-22.04 },
23+
{ platform: android, arch: arm32, os: ubuntu-22.04 },
24+
{ platform: android, arch: x86_64, os: ubuntu-22.04 },
25+
{ platform: android, arch: x86_32, os: ubuntu-22.04 },
26+
{ platform: ios, arch: arm64, os: macos-latest },
27+
{ platform: web, arch: wasm32, os: ubuntu-22.04 }
28+
]
29+
target-type: [template_debug]
30+
float-precision: [single, double]
31+
include: # Also build a release version for these specific targets. Remove if you add template_release above.
32+
- target: { platform: linux, arch: x86_64, os: ubuntu-22.04 }
33+
target-type: template_release
7034
float-precision: single
71-
arch: wasm32
72-
target-type: template_debug
73-
os: ubuntu-20.04
7435

75-
# Release templates
76-
- platform: linux
77-
float-precision: single
78-
arch: x86_64
36+
- target: { platform: linux, arch: x86_64, os: ubuntu-22.04 }
7937
target-type: template_release
80-
os: ubuntu-20.04
81-
82-
# - platform: windows
83-
# float-precision: single
84-
# arch: x86_32
85-
# target-type: template_release
86-
# os: windows-latest
87-
88-
# - platform: windows
89-
# float-precision: single
90-
# arch: x86_64
91-
# target-type: template_release
92-
# os: windows-latest
93-
94-
# - platform: macos
95-
# float-precision: single
96-
# arch: universal
97-
# target-type: template_release
98-
# os: macos-latest
99-
100-
# - platform: android
101-
# float-precision: single
102-
# arch: arm64
103-
# target-type: template_release
104-
# os: ubuntu-20.04
105-
106-
# - platform: android
107-
# float-precision: single
108-
# arch: arm32
109-
# target-type: template_release
110-
# os: ubuntu-20.04
111-
112-
# - platform: android
113-
# float-precision: single
114-
# arch: x86_64
115-
# target-type: template_release
116-
# os: ubuntu-20.04
117-
118-
# - platform: android
119-
# float-precision: single
120-
# arch: x86_32
121-
# target-type: template_release
122-
# os: ubuntu-20.04
123-
124-
# - platform: ios
125-
# float-precision: single
126-
# arch: arm64
127-
# target-type: template_release
128-
# os: macos-latest
129-
130-
# - platform: web
131-
# float-precision: single
132-
# arch: wasm32
133-
# target-type: template_release
134-
# os: ubuntu-20.04
135-
136-
# Double precision templates
137-
# Double precision debug templates
138-
- platform: linux
13938
float-precision: double
140-
arch: x86_64
141-
target-type: template_debug
142-
os: ubuntu-20.04
143-
144-
- platform: windows
145-
float-precision: double
146-
arch: x86_32
147-
target-type: template_debug
148-
os: windows-latest
149-
150-
- platform: windows
151-
float-precision: double
152-
arch: x86_64
153-
target-type: template_debug
154-
os: windows-latest
155-
156-
- platform: macos
157-
float-precision: double
158-
arch: universal
159-
target-type: template_debug
160-
os: macos-latest
161-
162-
- platform: android
163-
float-precision: double
164-
arch: arm64
165-
target-type: template_debug
166-
os: ubuntu-20.04
167-
168-
- platform: android
169-
float-precision: double
170-
arch: arm32
171-
target-type: template_debug
172-
os: ubuntu-20.04
173-
174-
- platform: android
175-
float-precision: double
176-
arch: x86_64
177-
target-type: template_debug
178-
os: ubuntu-20.04
179-
180-
- platform: android
181-
float-precision: double
182-
arch: x86_32
183-
target-type: template_debug
184-
os: ubuntu-20.04
185-
186-
- platform: ios
187-
float-precision: double
188-
arch: arm64
189-
target-type: template_debug
190-
os: macos-latest
191-
192-
- platform: web
193-
float-precision: double
194-
arch: wasm32
195-
target-type: template_debug
196-
os: ubuntu-20.04
197-
198-
# Double precision release templates
199-
- platform: linux
200-
float-precision: double
201-
arch: x86_64
202-
target-type: template_release
203-
os: ubuntu-20.04
204-
205-
# - platform: windows
206-
# float-precision: double
207-
# arch: x86_32
208-
# target-type: template_release
209-
# os: windows-latest
210-
211-
# - platform: windows
212-
# float-precision: double
213-
# arch: x86_64
214-
# target-type: template_release
215-
# os: windows-latest
216-
217-
# - platform: macos
218-
# float-precision: double
219-
# arch: universal
220-
# target-type: template_release
221-
# os: macos-latest
222-
223-
# - platform: android
224-
# float-precision: double
225-
# arch: arm64
226-
# target-type: template_release
227-
# os: ubuntu-20.04
228-
229-
# - platform: android
230-
# float-precision: double
231-
# arch: arm32
232-
# target-type: template_release
233-
# os: ubuntu-20.04
234-
235-
# - platform: android
236-
# float-precision: double
237-
# arch: x86_64
238-
# target-type: template_release
239-
# os: ubuntu-20.04
240-
241-
# - platform: android
242-
# float-precision: double
243-
# arch: x86_32
244-
# target-type: template_release
245-
# os: ubuntu-20.04
246-
247-
# - platform: ios
248-
# float-precision: double
249-
# arch: arm64
250-
# target-type: template_release
251-
# os: macos-latest
25239

253-
# - platform: web
254-
# float-precision: double
255-
# arch: wasm32
256-
# target-type: template_release
257-
# os: ubuntu-20.04
258-
runs-on: ${{ matrix.os }}
40+
runs-on: ${{ matrix.target.os }}
25941
steps:
26042
# Clone this repository
26143
- name: Checkout
@@ -277,26 +59,26 @@ jobs:
27759
- name: Setup godot-cpp
27860
uses: ./godot-cpp/.github/actions/setup-godot-cpp
27961
with:
280-
platform: ${{ matrix.platform }}
62+
platform: ${{ matrix.target.platform }}
28163
em-version: 3.1.62
28264

28365
# Build GDExtension (with caches)
28466
- name: Cache .scons_cache
28567
uses: actions/cache@v4
28668
with:
28769
path: ${{ github.workspace }}/.scons-cache/
288-
key: ${{ matrix.platform }}_${{ matrix.arch }}_${{ matrix.float-precision }}_${{ matrix.target-type }}_cache
70+
key: ${{ matrix.target.platform }}_${{ matrix.target.arch }}_${{ matrix.float-precision }}_${{ matrix.target-type }}_cache
28971
- name: Build GDExtension Debug Build
29072
shell: sh
29173
env:
29274
SCONS_CACHE: ${{ github.workspace }}/.scons-cache/
29375
run: |
294-
scons target=${{ matrix.target-type }} platform=${{ matrix.platform }} arch=${{ matrix.arch }} precision=${{ matrix.float-precision }}
76+
scons target=${{ matrix.target-type }} platform=${{ matrix.target.platform }} arch=${{ matrix.target.arch }} precision=${{ matrix.float-precision }}
29577
29678
# Sign the binary (macOS only)
29779
- name: Mac Sign
29880
# Disable sign if secrets are not set
299-
if: ${{ matrix.platform == 'macos' && env.APPLE_CERT_BASE64 }}
81+
if: ${{ matrix.target.platform == 'macos' && env.APPLE_CERT_BASE64 }}
30082
env:
30183
APPLE_CERT_BASE64: ${{ secrets.APPLE_CERT_BASE64 }}
30284
uses: ./.github/actions/sign
@@ -311,7 +93,7 @@ jobs:
31193

31294
# Clean up compilation files
31395
- name: Windows - Delete compilation files
314-
if: ${{ matrix.platform == 'windows' }}
96+
if: ${{ matrix.target.platform == 'windows' }}
31597
shell: pwsh
31698
run: |
31799
Remove-Item bin/* -Include *.exp,*.lib,*.pdb -Force
@@ -320,14 +102,14 @@ jobs:
320102
- name: Upload Artifact
321103
uses: actions/upload-artifact@v4
322104
with:
323-
name: godot-cpp-template-${{ matrix.platform }}-${{ matrix.arch }}-${{ matrix.float-precision }}-${{ matrix.target-type }}
105+
name: godot-cpp-template-${{ matrix.target.platform }}-${{ matrix.target.arch }}-${{ matrix.float-precision }}-${{ matrix.target-type }}
324106
path: |
325107
${{ github.workspace }}/bin/**
326108
327109
# Merges all the build artifacts together into a single godot-cpp-template artifact.
328110
# If you comment out this step, all the builds will be uploaded individually.
329111
merge:
330-
runs-on: ubuntu-20.04
112+
runs-on: ubuntu-22.04
331113
needs: build
332114
steps:
333115
- name: Merge Artifacts

0 commit comments

Comments
 (0)