@@ -142,49 +142,51 @@ jobs:
142
142
run : cargo test $TEST_FEATURES ${{ matrix.rust-extra-args }}
143
143
144
144
145
- run -examples :
146
- name : run -examples (${{ matrix.name }})
145
+ check -examples :
146
+ name : check -examples (${{ matrix.name }})
147
147
runs-on : ${{ matrix.os }}
148
148
strategy :
149
149
fail-fast : false # cancel all jobs as soon as one fails?
150
150
matrix :
151
151
include :
152
152
# macOS
153
- # macOS x86 (intel) has tendency to fail semi-randomly.
154
- # We allow this job to fail without invalidating the whole run.
153
+
154
+ # macOS builds fail semi-randomly with an `libc++abi: Pure virtual function called!` error.
155
+ # For now on we only check if demo projects can be successfully compiled on given platform.
156
+ # See: https://github.com/godot-rust/demo-projects/issues/12
155
157
- name : macos-x86
156
158
os : macos-13
157
159
artifact-name : macos-x86-nightly
158
160
godot-binary : godot.macos.editor.dev.x86_64
159
- failable : true
161
+ run-examples : false
160
162
161
163
- name : macos-arm
162
164
os : macos-latest
163
165
artifact-name : macos-arm-nightly
164
166
godot-binary : godot.macos.editor.dev.arm64
165
- failable : false
167
+ run-examples : false
166
168
167
169
# Windows
168
170
169
171
- name : windows
170
172
os : windows-latest
171
173
artifact-name : windows-nightly
172
174
godot-binary : godot.windows.editor.dev.x86_64.exe
173
- failable : false
175
+ run-examples : true
174
176
175
177
# Linux
176
178
177
179
- name : linux
178
180
os : ubuntu-22.04
179
181
artifact-name : linux-nightly
180
182
godot-binary : godot.linuxbsd.editor.dev.x86_64
181
- failable : false
183
+ run-examples : true
182
184
183
185
- name : linux-4.4
184
186
os : ubuntu-22.04
185
187
artifact-name : linux-4.4
186
188
godot-binary : godot.linuxbsd.editor.dev.x86_64
187
- failable : false
189
+ run-examples : true
188
190
189
191
# Deliberately don't include:
190
192
#
@@ -202,12 +204,13 @@ jobs:
202
204
- uses : actions/checkout@v4
203
205
204
206
# macOS: needed for 'timeout' command in check script.
205
- - name : " Install coreutils (macOS)"
206
- if : contains(matrix.name, 'macos')
207
- run : brew install coreutils
207
+ # - name: "Install coreutils (macOS)"
208
+ # if: contains(matrix.name, 'macos')
209
+ # run: brew install coreutils
208
210
209
211
- name : " Install Godot"
210
212
uses : ./.github/composite/godot-install
213
+ if : matrix.run-examples == 'true'
211
214
with :
212
215
artifact-name : ' godot-${{ matrix.artifact-name }}'
213
216
godot-binary : ' ${{ matrix.godot-binary }}'
@@ -220,25 +223,17 @@ jobs:
220
223
run : cargo build --release ${{ matrix.rust-extra-args }}
221
224
222
225
- name : " Run examples for short time"
223
- continue-on-error : ${{ matrix.failable }}
224
- env :
225
- FAILABLE : ${{ matrix.failable }}
226
+ if : matrix.run-examples == 'true'
226
227
run : |
227
228
# Enable extended globbing to allow pattern exclusion.
228
229
shopt -s extglob
229
230
230
231
# Match all directories/files except `target` and any starting with `.`.
231
232
files='!(target|.*)/'
232
- if [[ $FAILABLE == "true" ]]; then
233
- # MacOS x86 – try to rerun demo projects several times on fail.
234
- RUN="./.github/other/retry.sh ./.github/other/check-example.sh"
235
- else
236
- RUN="./.github/other/check-example.sh"
237
- fi
238
233
# List all folders in current directory. Don't quote $files variable.
239
234
for demo in $files; do
240
235
# Strip trailing '/' from folder name.
241
- $RUN "${demo%/}"
236
+ ./.github/other/check-example.sh "${demo%/}"
242
237
done
243
238
244
239
@@ -296,7 +291,7 @@ jobs:
296
291
- rustfmt
297
292
- clippy
298
293
- unit-test
299
- - run -examples
294
+ - check -examples
300
295
- cargo-deny-machete
301
296
- license-guard
302
297
0 commit comments