@@ -42,49 +42,28 @@ jobs:
42
42
- name : " Install Rust"
43
43
uses : ./.github/composite/rust
44
44
with :
45
- rust : stable
46
45
components : rustfmt
47
46
48
47
- name : " Check rustfmt"
49
48
run : cargo fmt --all -- --check
50
49
51
50
52
51
clippy :
53
- name : clippy (${{ matrix.name }})
54
52
runs-on : ubuntu-20.04
55
- strategy :
56
- fail-fast : false
57
- matrix :
58
- include :
59
- - name : linux
60
- rust-toolchain : stable
61
- godot-binary : godot.linuxbsd.editor.dev.x86_64
62
-
63
- - name : linux-double
64
- rust-toolchain : stable
65
- godot-binary : godot.linuxbsd.editor.dev.double.x86_64
66
- rust-extra-args : --features double-precision
67
53
steps :
68
54
- uses : actions/checkout@v3
69
55
70
56
- name : " Install Rust"
71
57
uses : ./.github/composite/rust
72
-
73
- # TODO get rid of Godot binary, once the JSON is either versioned or fetched from somewhere
74
- # Replaces also backspaces on Windows, since they cause problems in Bash
75
- - name : " Install Godot"
76
- uses : ./.github/composite/godot-install
77
58
with :
78
- artifact-name : godot-${{ matrix.name }}
79
- godot-binary : ${{ matrix.godot-binary }}
59
+ components : clippy
80
60
81
61
- name : " Check clippy"
82
62
run : |
83
63
cargo clippy --all-targets $GDEXT_FEATURES ${{ matrix.rust-extra-args }} -- \
84
64
-D clippy::suspicious -D clippy::style -D clippy::complexity -D clippy::perf \
85
65
-D clippy::dbg_macro -D clippy::todo -D clippy::unimplemented -D warnings
86
66
87
-
88
67
unit-test :
89
68
name : unit-test (${{ matrix.name }}${{ matrix.rust-special }})
90
69
runs-on : ${{ matrix.os }}
@@ -98,28 +77,19 @@ jobs:
98
77
include :
99
78
- name : macos
100
79
os : macos-11
101
- rust-toolchain : stable
102
- godot-binary : godot.macos.editor.dev.x86_64
103
- with-llvm : true
104
80
105
81
- name : windows
106
82
os : windows-latest
107
- rust-toolchain : stable-x86_64-pc-windows-msvc
108
- godot-binary : godot.windows.editor.dev.x86_64.exe
109
83
110
84
# Don't use latest Ubuntu (22.04) as it breaks lots of ecosystem compatibility.
111
85
# If ever moving to ubuntu-latest, need to manually install libtinfo5 for LLVM.
112
86
- name : linux
113
87
os : ubuntu-20.04
114
- rust-toolchain : stable
115
- godot-binary : godot.linuxbsd.editor.dev.x86_64
116
88
117
89
- name : linux
118
90
os : ubuntu-20.04
119
- rust-toolchain : stable
120
91
rust-special : -minimal-deps
121
- godot-binary : godot.linuxbsd.editor.dev.x86_64
122
-
92
+
123
93
steps :
124
94
- uses : actions/checkout@v3
125
95
@@ -128,26 +98,17 @@ jobs:
128
98
with :
129
99
rust : stable
130
100
cache-key : ${{ matrix.rust-special }} # '-minimal-deps' or empty/not defined
131
- with-llvm : ${{ matrix.with-llvm }}
132
101
133
102
- name : " Install Rust nightly (minimal deps)"
103
+ if : matrix.rust-special == '-minimal-deps'
134
104
uses : ./.github/composite/rust
135
105
with :
136
106
rust : nightly
137
107
cache-key : minimal-deps-nightly
138
- if : ${{ matrix.rust-special == '-minimal-deps' }}
139
108
140
109
- name : " Install minimal dependency versions from Cargo"
110
+ if : matrix.rust-special == '-minimal-deps'
141
111
run : cargo +nightly update -Z minimal-versions
142
- if : ${{ matrix.rust-special == '-minimal-deps' }}
143
-
144
- # TODO get rid of Godot binary, once the JSON is either versioned or fetched from somewhere
145
- # Replaces also backspaces on Windows, since they cause problems in Bash
146
- - name : " Install Godot"
147
- uses : ./.github/composite/godot-install
148
- with :
149
- artifact-name : godot-${{ matrix.name }}
150
- godot-binary : ${{ matrix.godot-binary }}
151
112
152
113
- name : " Compile tests"
153
114
run : cargo test $GDEXT_FEATURES --no-run ${{ matrix.rust-extra-args }}
@@ -170,60 +131,49 @@ jobs:
170
131
include :
171
132
- name : macos
172
133
os : macos-12
173
- rust-toolchain : stable
174
134
godot-binary : godot.macos.editor.dev.x86_64
175
- with-llvm : true
176
-
135
+
177
136
- name : macos-double
178
137
os : macos-12
179
- rust-toolchain : stable
180
138
godot-binary : godot.macos.editor.dev.double.x86_64
181
139
rust-extra-args : --features double-precision
182
- with-llvm : true
183
140
184
- - name : macos-bindgen
185
- artifact-name : macos
141
+ - name : macos-nightly
186
142
os : macos-12
187
- rust-toolchain : stable
143
+ artifact-name : macos
188
144
godot-binary : godot.macos.editor.dev.x86_64
189
- with-llvm : true
190
145
rust-extra-args : --features godot/custom-godot
146
+ with-llvm : true
191
147
192
148
- name : windows
193
149
os : windows-latest
194
- rust-toolchain : stable-x86_64-pc-windows-msvc
195
150
godot-binary : godot.windows.editor.dev.x86_64.exe
196
151
197
152
- name : windows-double
198
153
os : windows-latest
199
- rust-toolchain : stable-x86_64-pc-windows-msvc
200
154
godot-binary : godot.windows.editor.dev.double.x86_64.exe
201
155
rust-extra-args : --features double-precision
202
156
203
- - name : windows-bindgen
204
- artifact-name : windows
157
+ - name : windows-nightly
205
158
os : windows-latest
206
- rust-toolchain : stable-x86_64-pc- windows-msvc
159
+ artifact-name : windows
207
160
godot-binary : godot.windows.editor.dev.x86_64.exe
208
161
rust-extra-args : --features godot/custom-godot
209
162
210
163
# Don't use latest Ubuntu (22.04) as it breaks lots of ecosystem compatibility.
211
164
# If ever moving to ubuntu-latest, need to manually install libtinfo5 for LLVM.
212
165
- name : linux
213
166
os : ubuntu-20.04
214
- rust-toolchain : stable
215
167
godot-binary : godot.linuxbsd.editor.dev.x86_64
216
168
217
169
- name : linux-double
218
170
os : ubuntu-20.04
219
- rust-toolchain : stable
220
171
godot-binary : godot.linuxbsd.editor.dev.double.x86_64
221
172
rust-extra-args : --features double-precision
222
173
223
- - name : linux-bindgen
224
- artifact-name : linux
174
+ - name : linux-nightly
225
175
os : ubuntu-20.04
226
- rust-toolchain : stable
176
+ artifact-name : linux
227
177
godot-binary : godot.linuxbsd.editor.dev.x86_64
228
178
rust-extra-args : --features godot/custom-godot
229
179
@@ -257,7 +207,7 @@ jobs:
257
207
godot-binary : ${{ matrix.godot-binary }}
258
208
godot-args : ${{ matrix.godot-args }}
259
209
rust-extra-args : ${{ matrix.rust-extra-args }}
260
- rust-toolchain : ${{ matrix.rust-toolchain }}
210
+ rust-toolchain : ${{ matrix.rust-toolchain || 'stable' }}
261
211
rust-env-rustflags : ${{ matrix.rust-env-rustflags }}
262
212
with-llvm : ${{ matrix.with-llvm }}
263
213
godot-check-header : ${{ matrix.name == 'linux' }}
0 commit comments