32
32
33
33
# Local variables
34
34
# Note: using variables is limited at the moment, see https://github.com/actions/runner/issues/480
35
- GODOT_VER : " 3.4"
36
- GODOT_REL : stable
37
35
GDRUST_FEATURES : " gdnative/async,gdnative/serde"
38
36
39
37
on :
@@ -51,11 +49,11 @@ jobs:
51
49
runs-on : ubuntu-latest
52
50
steps :
53
51
- uses : actions/checkout@v2
54
- - name : Install Rust
52
+ - name : " Install Rust"
55
53
uses : ./.github/composite/rust
56
54
with :
57
55
components : rustfmt
58
- - name : Check rustfmt
56
+ - name : " Check rustfmt"
59
57
run : cargo fmt --all -- --check;
60
58
61
59
clippy :
@@ -72,12 +70,12 @@ jobs:
72
70
postfix : ' (nightly)'
73
71
steps :
74
72
- uses : actions/checkout@v2
75
- - name : Install Rust
73
+ - name : " Install Rust"
76
74
uses : ./.github/composite/rust
77
75
with :
78
76
rust : ${{ matrix.rust.toolchain }}
79
77
components : clippy
80
- - name : Check clippy
78
+ - name : " Check clippy"
81
79
run : cargo clippy --workspace --features ${GDRUST_FEATURES} -- -D clippy::style -D clippy::complexity -D clippy::perf -D clippy::dbg_macro -D clippy::todo -D clippy::unimplemented;
82
80
83
81
test :
@@ -112,16 +110,16 @@ jobs:
112
110
runs-on : ${{ matrix.os.id }}
113
111
steps :
114
112
- uses : actions/checkout@v2
115
- - name : Install Rust
113
+ - name : " Install Rust"
116
114
uses : ./.github/composite/rust
117
115
with :
118
116
rust : ${{ matrix.rust.toolchain }}
119
- - name : Install LLVM
117
+ - name : " Install LLVM"
120
118
uses : ./.github/composite/llvm
121
119
if : ${{ matrix.os.id == 'windows-latest' }}
122
- - name : Compile tests
120
+ - name : " Compile tests"
123
121
run : cargo test --workspace --features ${GDRUST_FEATURES} --no-run;
124
- - name : Test
122
+ - name : " Test"
125
123
run : cargo test --workspace --features ${GDRUST_FEATURES} ${{ matrix.testflags }};
126
124
127
125
build-release :
@@ -140,14 +138,14 @@ jobs:
140
138
runs-on : ${{ matrix.os.id }}
141
139
steps :
142
140
- uses : actions/checkout@v2
143
- - name : Install Rust
141
+ - name : " Install Rust"
144
142
uses : ./.github/composite/rust
145
143
with :
146
144
rust : stable
147
- - name : Install LLVM
145
+ - name : " Install LLVM"
148
146
uses : ./.github/composite/llvm
149
147
if : ${{ matrix.os.id == 'windows-latest' }}
150
- - name : Release build (check only)
148
+ - name : " Release build (check only)"
151
149
run : cargo check --release;
152
150
153
151
build-ios :
@@ -159,18 +157,18 @@ jobs:
159
157
runs-on : macos-latest
160
158
steps :
161
159
- uses : actions/checkout@v2
162
- - name : Install Rust
160
+ - name : " Install Rust"
163
161
uses : ./.github/composite/rust
164
162
# with:
165
163
# rust: ${{ matrix.rust.toolchain }}
166
- - name : Install cargo-dinghy
164
+ - name : " Install cargo-dinghy"
167
165
run : |
168
166
rustup target add x86_64-apple-ios;
169
167
curl -L https://github.com/sonos/dinghy/releases/download/0.4.62/cargo-dinghy-macos-0.4.62.tgz -o cargo-dinghy-macos.tar.gz;
170
168
tar -zxvf cargo-dinghy-macos.tar.gz;
171
169
mkdir -p $HOME/.cargo/bin;
172
170
cp cargo-dinghy-0.4.62/cargo-dinghy $HOME/.cargo/bin;
173
- - name : Cross-compile to iOS
171
+ - name : " Cross-compile to iOS"
174
172
run : |
175
173
RUNTIME_ID=$(xcrun simctl list runtimes | grep iOS | cut -d ' ' -f 7 | tail -1);
176
174
export SIM_ID=$(xcrun simctl create My-iphone11 com.apple.CoreSimulator.SimDeviceType.iPhone-11 $RUNTIME_ID);
@@ -191,11 +189,11 @@ jobs:
191
189
runs-on : ubuntu-latest
192
190
steps :
193
191
- uses : actions/checkout@v2
194
- - name : Install Rust
192
+ - name : " Install Rust"
195
193
uses : ./.github/composite/rust
196
194
# with:
197
195
# rust: ${{ matrix.rust.toolchain }}
198
- - name : Install Java + NDK
196
+ - name : " Install Java + NDK"
199
197
run : |
200
198
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64;
201
199
export ANDROID_SDK_ROOT=/opt/ndk/android-ndk-r21d;
@@ -228,65 +226,38 @@ jobs:
228
226
cargo build --target armv7-linux-androideabi --release;
229
227
230
228
integration-test-godot :
231
- name : itest-godot${{ matrix.rust .postfix }}
229
+ name : itest-godot- ${{ matrix.godot }}${{ matrix .postfix }}
232
230
needs : rustfmt
233
231
continue-on-error : ${{ matrix.rust.toolchain == 'nightly' }}
234
232
strategy :
233
+ fail-fast : false # cancel all jobs as soon as one fails?
235
234
matrix :
236
- rust :
237
- - toolchain : stable
235
+ include :
236
+ - rust : stable
237
+ godot : " 3.4.1"
238
238
postfix : ' '
239
- - toolchain : nightly
239
+ - rust : nightly
240
+ godot : " 3.4.1"
240
241
postfix : ' (nightly)'
241
- - toolchain : ' 1.48'
242
+ - rust : ' 1.48'
243
+ godot : " 3.4.1"
242
244
postfix : ' (msrv 1.48)'
245
+ - rust : stable
246
+ godot : " 3.2"
247
+ postfix : ' '
248
+ build_args : ' --features custom-godot'
249
+
243
250
runs-on : ubuntu-latest
244
251
steps :
245
252
- uses : actions/checkout@v2
246
- - name : Install Rust
247
- uses : ./.github/composite/rust
253
+ - name : " Run Godot integration test "
254
+ uses : ./.github/composite/godot
248
255
with :
249
- rust : ${{ matrix.rust.toolchain }}
250
- - name : Check cache for installed Godot version
251
- id : cache-godot
252
- uses : actions/cache@v2
253
- with :
254
- path : ${{ runner.temp }}/godot_bin
255
- key : godot-${{ runner.os }}-v${{ env.GODOT_VER }}-${{ env.GODOT_REL }}
256
- - name : Install Godot
257
- if : steps.cache-godot.outputs.cache-hit != 'true'
258
- run : |
259
- wget "https://downloads.tuxfamily.org/godotengine/$GODOT_VER/Godot_v${GODOT_VER}-${GODOT_REL}_linux_headless.64.zip" -O /tmp/godot.zip
260
- unzip /tmp/godot.zip -d ${{ runner.temp }}/godot_bin
261
- - name : Build godot-rust
262
- run : |
263
- cd test;
264
- cargo build;
265
- - name : Run Godot integration tests
266
- run : |
267
- cd test;
268
- mkdir -p ./project/lib;
269
- cp ../target/debug/libgdnative_test.so ./project/lib/;
270
- "${{ runner.temp }}/godot_bin/Godot_v${GODOT_VER}-${GODOT_REL}_linux_headless.64" --path ./project/ > >(tee "${{ runner.temp }}/stdout.log");
271
- if grep -q "Leaked instance" "${{ runner.temp }}/stdout.log"; then
272
- exit 1;
273
- fi;
274
- "${{ runner.temp }}/godot_bin/Godot_v${GODOT_VER}-${GODOT_REL}_linux_headless.64" -e --path ./project/ --run-editor-tests > >(tee "${{ runner.temp }}/stdout.log");
275
- if grep -q "Leaked instance" "${{ runner.temp }}/stdout.log"; then
276
- exit 1;
277
- fi;
278
- cargo build --features=type_tag_fallback;
279
- mkdir -p ./project/lib;
280
- cp ../target/debug/libgdnative_test.so ./project/lib/;
281
- "${{ runner.temp }}/godot_bin/Godot_v${GODOT_VER}-${GODOT_REL}_linux_headless.64" --path ./project/ > >(tee "${{ runner.temp }}/stdout.log");
282
- if grep -q "Leaked instance" "${{ runner.temp }}/stdout.log"; then
283
- exit 1;
284
- fi;
285
- "${{ runner.temp }}/godot_bin/Godot_v${GODOT_VER}-${GODOT_REL}_linux_headless.64" -e --path ./project/ --run-editor-tests > >(tee "${{ runner.temp }}/stdout.log");
286
- if grep -q "Leaked instance" "${{ runner.temp }}/stdout.log"; then
287
- exit 1;
288
- fi;
289
-
256
+ rust_toolchain : ${{ matrix.rust }}
257
+ rust_extra_args : ${{ matrix.build_args }}
258
+ godot_ver : ${{ matrix.godot }}
259
+
260
+
290
261
# This job doesn't actually test anything, but is used to tell bors that the build completed,
291
262
# as there is no practical way to detect when a workflow is successful, listening to webhooks only.
292
263
# The ID (not name) of this job is the one referenced in bors.toml.
@@ -304,5 +275,5 @@ jobs:
304
275
- build-android
305
276
runs-on : ubuntu-latest
306
277
steps :
307
- - name : Mark the job as a success
278
+ - name : " Mark the job as a success"
308
279
run : exit 0
0 commit comments