15
15
16
16
env :
17
17
GDEXT_FEATURES : ' godot-core/convenience'
18
- GDEXT_CRATE_ARGS : ' -p godot-codegen -p godot-ffi -p godot-core -p godot-macros -p godot'
18
+ # GDEXT_CRATE_ARGS: '-p godot-codegen -p godot-ffi -p godot-core -p godot-macros -p godot'
19
19
20
20
defaults :
21
21
run :
@@ -52,35 +52,18 @@ jobs:
52
52
53
53
# TODO get rid of Godot binary, once the JSON is either versioned or fetched from somewhere
54
54
# Replaces also backspaces on Windows, since they cause problems in Bash
55
- - name : " Store variable to Godot binary"
56
- run : |
57
- runnerDir=$(echo "${{ runner.temp }}" | sed "s!\\\\!/!")
58
- echo "RUNNER_DIR=$runnerDir" >> $GITHUB_ENV
59
- echo "GODOT4_BIN=$runnerDir/godot_bin/godot.linuxbsd.editor.dev.x86_64" >> $GITHUB_ENV
60
-
61
- # - name: "Check cache for installed Godot version"
62
- # id: "cache-godot"
63
- # uses: actions/cache@v3
64
- # with:
65
- # path: ${{ runner.temp }}/godot_bin
66
- # key: ${{ inputs.artifact-name }}-v${{ inputs.godot-ver }}
67
-
68
- - name : " Download Godot artifact"
69
- # if: steps.cache-godot.outputs.cache-hit != 'true'
70
- run : |
71
- curl https://nightly.link/Bromeon/godot4-nightly/workflows/compile-godot/master/godot-linux.zip -Lo artifact.zip
72
- unzip artifact.zip -d $RUNNER_DIR/godot_bin
73
-
74
- - name : " Prepare Godot executable"
75
- run : |
76
- chmod +x $GODOT4_BIN
55
+ - name : " Install Godot"
56
+ uses : ./.github/composite/godot-install
57
+ with :
58
+ artifact-name : godot-linux
59
+ binary-filename : godot.linuxbsd.editor.dev.x86_64
77
60
78
61
- name : " Check clippy"
79
- run : cargo clippy --features $GDEXT_FEATURES $GDEXT_CRATE_ARGS -- --cfg gdext_clippy -D clippy::style -D clippy::complexity -D clippy::perf -D clippy::dbg_macro -D clippy::todo -D clippy::unimplemented
62
+ run : cargo clippy -- -D clippy::style -D clippy::complexity -D clippy::perf -D clippy::dbg_macro -D clippy::todo -D clippy::unimplemented
80
63
81
64
82
65
unit-test :
83
- name : unit-test (${{ matrix.name }})
66
+ name : unit-test (${{ matrix.name }}${{ matrix.rust-special }} )
84
67
runs-on : ${{ matrix.os }}
85
68
continue-on-error : false
86
69
strategy :
@@ -93,21 +76,25 @@ jobs:
93
76
- name : macos
94
77
os : macos-11
95
78
rust-toolchain : stable
79
+ godot-binary : godot.macos.editor.dev.x86_64
96
80
97
81
- name : windows
98
82
os : windows-latest
99
83
rust-toolchain : stable-x86_64-pc-windows-msvc
84
+ godot-binary : godot.windows.editor.dev.x86_64.exe
100
85
101
86
# Don't use latest Ubuntu (22.04) as it breaks lots of ecosystem compatibility.
102
87
# If ever moving to ubuntu-latest, need to manually install libtinfo5 for LLVM.
103
88
- name : linux
104
89
os : ubuntu-20.04
105
90
rust-toolchain : stable
91
+ godot-binary : godot.linuxbsd.editor.dev.x86_64
106
92
107
- - name : linux-minimal-deps
93
+ - name : linux
108
94
os : ubuntu-20.04
109
95
rust-toolchain : stable
110
- rust-special : minimal-deps
96
+ rust-special : -minimal-deps
97
+ godot-binary : godot.linuxbsd.editor.dev.x86_64
111
98
112
99
steps :
113
100
- uses : actions/checkout@v3
@@ -117,35 +104,36 @@ jobs:
117
104
with :
118
105
rust : stable
119
106
cache-key : ${{ matrix.rust-special }} # 'minimal-deps' or empty/not defined
107
+ with-llvm : ${{ matrix.name == 'macos' }}
120
108
121
109
- name : " Install Rust nightly (minimal deps)"
122
110
uses : ./.github/composite/rust
123
111
with :
124
112
rust : nightly
125
113
cache-key : minimal-deps-nightly
126
- if : ${{ matrix.rust-special == 'minimal-deps' }}
114
+ if : ${{ matrix.rust-special == '- minimal-deps' }}
127
115
128
116
- name : " Install minimal dependency versions from Cargo"
129
117
run : cargo +nightly update -Z minimal-versions
130
- if : ${{ matrix.rust-special == 'minimal-deps' }}
118
+ if : ${{ matrix.rust-special == '- minimal-deps' }}
131
119
132
- - name : " Install LLVM"
133
- uses : ./.github/composite/llvm
134
- if : matrix.name == 'macos'
120
+ # TODO get rid of Godot binary, once the JSON is either versioned or fetched from somewhere
121
+ # Replaces also backspaces on Windows, since they cause problems in Bash
122
+ - name : " Install Godot"
123
+ uses : ./.github/composite/godot-install
124
+ with :
125
+ artifact-name : godot-${{ matrix.name }}
126
+ binary-filename : ${{ matrix.godot-binary }}
135
127
136
128
- name : " Compile tests"
137
- run : cargo test $GDEXT_CRATE_ARGS --features $GDEXT_FEATURES --no-run
138
- env :
139
- RUSTFLAGS : --cfg=gdext_test
129
+ run : cargo test --no-run
140
130
141
131
- name : " Test"
142
- run : cargo test $GDEXT_CRATE_ARGS --features $GDEXT_FEATURES
143
- env :
144
- RUSTFLAGS : --cfg=gdext_test
132
+ run : cargo test $GDEXT_FEATURES
145
133
146
134
147
- itest- godot :
148
- name : itest- godot (${{ matrix.name }})
135
+ godot-itest :
136
+ name : godot-itest (${{ matrix.name }})
149
137
runs-on : ${{ matrix.os }}
150
138
continue-on-error : false
151
139
timeout-minutes : 24
@@ -177,11 +165,11 @@ jobs:
177
165
- uses : actions/checkout@v3
178
166
179
167
- name : " Run Godot integration test"
180
- uses : ./.github/composite/godot
168
+ uses : ./.github/composite/godot-itest
181
169
with :
182
170
artifact-name : godot-${{ matrix.name }}
183
171
binary-filename : ${{ matrix.godot-binary }}
184
- # godot_ver : ${{ matrix.godot }}
172
+ with-llvm : ${{ matrix.name == 'macos' }}
185
173
186
174
187
175
license-guard :
@@ -206,7 +194,7 @@ jobs:
206
194
- rustfmt
207
195
- clippy
208
196
- unit-test
209
- - itest- godot
197
+ - godot-itest
210
198
- license-guard
211
199
runs-on : ubuntu-20.04
212
200
steps :
0 commit comments