Skip to content

Commit 78e7f5b

Browse files
committed
Don't run examples with macOS, resort to compiling only.
1 parent 15a3664 commit 78e7f5b

File tree

1 file changed

+18
-23
lines changed

1 file changed

+18
-23
lines changed

.github/workflows/ci.yml

Lines changed: 18 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -142,49 +142,51 @@ jobs:
142142
run: cargo test $TEST_FEATURES ${{ matrix.rust-extra-args }}
143143

144144

145-
run-examples:
146-
name: run-examples (${{ matrix.name }})
145+
check-examples:
146+
name: check-examples (${{ matrix.name }})
147147
runs-on: ${{ matrix.os }}
148148
strategy:
149149
fail-fast: false # cancel all jobs as soon as one fails?
150150
matrix:
151151
include:
152152
# 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
155157
- name: macos-x86
156158
os: macos-13
157159
artifact-name: macos-x86-nightly
158160
godot-binary: godot.macos.editor.dev.x86_64
159-
failable: true
161+
run-examples: false
160162

161163
- name: macos-arm
162164
os: macos-latest
163165
artifact-name: macos-arm-nightly
164166
godot-binary: godot.macos.editor.dev.arm64
165-
failable: false
167+
run-examples: false
166168

167169
# Windows
168170

169171
- name: windows
170172
os: windows-latest
171173
artifact-name: windows-nightly
172174
godot-binary: godot.windows.editor.dev.x86_64.exe
173-
failable: false
175+
run-examples: true
174176

175177
# Linux
176178

177179
- name: linux
178180
os: ubuntu-22.04
179181
artifact-name: linux-nightly
180182
godot-binary: godot.linuxbsd.editor.dev.x86_64
181-
failable: false
183+
run-examples: true
182184

183185
- name: linux-4.4
184186
os: ubuntu-22.04
185187
artifact-name: linux-4.4
186188
godot-binary: godot.linuxbsd.editor.dev.x86_64
187-
failable: false
189+
run-examples: true
188190

189191
# Deliberately don't include:
190192
#
@@ -202,12 +204,13 @@ jobs:
202204
- uses: actions/checkout@v4
203205

204206
# 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
208210

209211
- name: "Install Godot"
210212
uses: ./.github/composite/godot-install
213+
if: matrix.run-examples == 'true'
211214
with:
212215
artifact-name: 'godot-${{ matrix.artifact-name }}'
213216
godot-binary: '${{ matrix.godot-binary }}'
@@ -220,25 +223,17 @@ jobs:
220223
run: cargo build --release ${{ matrix.rust-extra-args }}
221224

222225
- name: "Run examples for short time"
223-
continue-on-error: ${{ matrix.failable }}
224-
env:
225-
FAILABLE: ${{ matrix.failable }}
226+
if: matrix.run-examples == 'true'
226227
run: |
227228
# Enable extended globbing to allow pattern exclusion.
228229
shopt -s extglob
229230
230231
# Match all directories/files except `target` and any starting with `.`.
231232
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
238233
# List all folders in current directory. Don't quote $files variable.
239234
for demo in $files; do
240235
# Strip trailing '/' from folder name.
241-
$RUN "${demo%/}"
236+
./.github/other/check-example.sh "${demo%/}"
242237
done
243238
244239
@@ -296,7 +291,7 @@ jobs:
296291
- rustfmt
297292
- clippy
298293
- unit-test
299-
- run-examples
294+
- check-examples
300295
- cargo-deny-machete
301296
- license-guard
302297

0 commit comments

Comments
 (0)