10
10
- godot4-meson
11
11
12
12
13
+ # Cancel run if another commit is pushed on the branch
14
+ concurrency :
15
+ group : ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
16
+ cancel-in-progress : true
17
+
18
+
13
19
# Global Settings
14
20
env :
15
21
PYTHON_VERSION : " 3.8" # Python to run the build, no the one shipped !
22
+ BLEEDING_EDGE_GODOT : true
16
23
17
24
18
25
jobs :
@@ -50,34 +57,79 @@ jobs:
50
57
LD : lld
51
58
PLATFORM : linux-x86_64
52
59
steps :
60
+
53
61
- name : ' Checkout'
54
62
uses : actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # pin@v3.3.0
55
63
with :
56
64
submodules : true
65
+
57
66
- name : ' Set up Python'
58
67
uses : actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 # pin@v4.5.0
59
68
with :
60
69
python-version : ${{ env.PYTHON_VERSION }}
70
+
61
71
- name : ' Setup venv'
62
72
run : |
63
73
set -eux
64
74
${{ env.CC }} --version
65
75
python --version
66
76
pip install -U pip
67
77
pip install -r requirements.in
78
+
79
+ - name : Download bleeding edge Godot 🏗️
80
+ uses : dsnopek/action-download-artifact@1322f74e2dac9feed2ee76a32d9ae1ca3b4cf4e9
81
+ if : ${{ env.BLEEDING_EDGE_GODOT }}
82
+ with :
83
+ repo : godotengine/godot
84
+ branch : master
85
+ event : push
86
+ workflow : linux_builds.yml
87
+ workflow_conclusion : success
88
+ name : linux-editor-mono
89
+ search_artifacts : true
90
+ check_artifacts : true
91
+ ensure_latest : true
92
+ path : godot-artifacts
93
+
94
+ - name : ' Setup bleeding edge Godot 🏗️'
95
+ id : setup-godot
96
+ if : ${{ env.BLEEDING_EDGE_GODOT }}
97
+ run : |
98
+ set -eux
99
+
100
+ GODOT_BIN=./godot-artifacts/godot.linuxbsd.editor.x86_64.mono
101
+ GDEXTENSION_DIR=./gdextension_api
102
+ ls godot-artifacts
103
+
104
+ chmod +x $GODOT_BIN
105
+ $GODOT_BIN --headless --version
106
+
107
+ mkdir $GDEXTENSION_DIR && pushd $GDEXTENSION_DIR
108
+ $GODOT_BIN --headless --dump-extension-api
109
+ mkdir godot && pushd godot
110
+ $GODOT_BIN --headless --dump-gdextension-interface
111
+ popd && popd
112
+
113
+ echo "EXTRA_MESON_SETUP_ARGS='-D gdextension_path=$GDEXTENSION_DIR'" >> $GITHUB_OUTPUT
114
+ echo "EXTRA_RUN_TESTS_ARGS='--godot-binary=$GODOT_BIN'" >> $GITHUB_OUTPUT
115
+
68
116
- name : ' Setup project'
69
- run : python .github/scripts/meson_setup_or_dump_log.py build/
117
+ run : python .github/scripts/meson_setup_or_dump_log.py build/ ${{ steps.setup-godot.outputs.EXTRA_MESON_SETUP_ARGS }}
118
+
70
119
- name : ' Build project'
71
120
run : meson compile -C build/
72
121
- name : ' Run tests'
73
122
run : |
74
123
set -eux
75
- python tests/run.py 0-gdscript --build-dir build/ -- --headless
76
- python tests/run.py 1-gdextension --build-dir build/ -- --headless
77
- python tests/run.py 2-pythonscript-init --build-dir build/ -- --headless
78
- python tests/run.py 3-pythonscript-cython-only --build-dir build/ -- --headless
124
+ ARGS=--build-dir=build/ ${{ steps.setup-godot.outputs.EXTRA_RUN_TESTS_ARGS }} -- --headless
125
+ python tests/run.py 0-gdscript $ARGS
126
+ python tests/run.py 1-gdextension $ARGS
127
+ python tests/run.py 2-pythonscript-init $ARGS
128
+ python tests/run.py 3-pythonscript-cython-only $ARGS
129
+
79
130
# - name: 'Generate artifact archive'
80
131
# run: meson compile -C build/ release
132
+
81
133
# - name: 'Export release artifact'
82
134
# uses: actions/upload-artifact@11830c9f4d30053679cb8904e3b3ce1b8c00bf40 # pin@v2
83
135
# with:
@@ -94,35 +146,81 @@ jobs:
94
146
env :
95
147
PLATFORM : ' windows-x86_64'
96
148
steps :
149
+
97
150
- name : ' Checkout'
98
151
uses : actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # pin@v3.3.0
99
152
with :
100
153
submodules : true
154
+
101
155
- name : ' Set up MSVC'
102
156
uses : egor-tensin/vs-shell@9a932a62d05192eae18ca370155cf877eecc2202 # pin@v2.1
157
+
103
158
- name : ' Set up Python'
104
159
uses : actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 # pin@v4.5.0
105
160
with :
106
161
python-version : ${{ env.PYTHON_VERSION }}
162
+
107
163
- name : ' Setup venv'
108
164
shell : bash
109
165
run : |
110
166
set -eux
111
167
python --version
112
168
pip install -U pip
113
169
pip install -r requirements.in
170
+
171
+ - name : Download bleeding edge Godot 🏗️
172
+ uses : dsnopek/action-download-artifact@1322f74e2dac9feed2ee76a32d9ae1ca3b4cf4e9
173
+ if : ${{ env.BLEEDING_EDGE_GODOT }}
174
+ with :
175
+ repo : godotengine/godot
176
+ branch : master
177
+ event : push
178
+ workflow : windows_builds.yml
179
+ workflow_conclusion : success
180
+ name : windows-editor
181
+ search_artifacts : true
182
+ check_artifacts : true
183
+ ensure_latest : true
184
+ path : godot-artifacts
185
+
186
+ - name : ' Setup bleeding edge Godot 🏗️'
187
+ id : setup-godot
188
+ if : ${{ env.BLEEDING_EDGE_GODOT }}
189
+ run : |
190
+ set -eux
191
+
192
+ GODOT_BIN=./godot-artifacts/godot.windows.editor.x86_64.mono
193
+ GDEXTENSION_DIR=./gdextension_api
194
+ ls godot-artifacts
195
+
196
+ chmod +x $GODOT_BIN
197
+ $GODOT_BIN --headless --version
198
+
199
+ mkdir $GDEXTENSION_DIR && pushd $GDEXTENSION_DIR
200
+ $GODOT_BIN --headless --dump-extension-api
201
+ mkdir godot && pushd godot
202
+ $GODOT_BIN --headless --dump-gdextension-interface
203
+ popd && popd
204
+
205
+ echo "EXTRA_MESON_SETUP_ARGS='-D gdextension_path=$GDEXTENSION_DIR'" >> $GITHUB_OUTPUT
206
+ echo "EXTRA_RUN_TESTS_ARGS='--godot-binary=$GODOT_BIN'" >> $GITHUB_OUTPUT
207
+
114
208
- name : ' Setup project'
115
- run : python .github/scripts/meson_setup_or_dump_log.py build/
209
+ run : python .github/scripts/meson_setup_or_dump_log.py build/ ${{ steps.setup-godot.outputs.EXTRA_MESON_SETUP_ARGS }}
210
+
116
211
- name : ' Build project'
117
212
run : meson compile -C build/
213
+
118
214
- name : ' Run tests'
119
215
shell : bash
120
216
run : |
121
217
set -eux
122
- python tests/run.py 0-gdscript --build-dir build/ -- --headless
123
- python tests/run.py 1-gdextension --build-dir build/ -- --headless
124
- python tests/run.py 2-pythonscript-init --build-dir build/ -- --headless
125
- python tests/run.py 3-pythonscript-cython-only --build-dir build/ -- --headless
218
+ ARGS=--build-dir=build/ ${{ steps.setup-godot.outputs.EXTRA_RUN_TESTS_ARGS }} -- --headless
219
+ python tests/run.py 0-gdscript $ARGS
220
+ python tests/run.py 1-gdextension $ARGS
221
+ python tests/run.py 2-pythonscript-init $ARGS
222
+ python tests/run.py 3-pythonscript-cython-only $ARGS
223
+
126
224
# - name: 'Install Mesa3D OpenGL'
127
225
# shell: bash
128
226
# run: |
@@ -140,10 +238,13 @@ jobs:
140
238
# 7z.exe x mesa.7z
141
239
# ls -lh opengl32.dll # Sanity check
142
240
# popd
241
+
143
242
# - name: 'Run tests'
144
243
# run: python tests/run.py --build-dir build/ --godot-binary ${{ GODOT_BINARY_VERSION }}
244
+
145
245
# - name: 'Generate artifact archive'
146
246
# run: meson compile -C build/ release
247
+
147
248
# - name: 'Export release artifact'
148
249
# uses: actions/upload-artifact@11830c9f4d30053679cb8904e3b3ce1b8c00bf40 # pin@v2
149
250
# with:
0 commit comments