1- name : Build Editor All Platforms
1+ name : 🤖 Build Godot for All Platforms
22on :
33 workflow_call :
44
55# Global Settings
66# SCONS_CACHE for windows must be set in the build environment
77env :
8- GODOT_REPOSITORY : godotengine/godot
9- GODOT_BASE_BRANCH : master
10- # Change Developers.md too
11- GODOT_MAIN_SYNC_REF : bb92a4c8e27e30cdec05ab6d540d724b9b3cfb72
128 SCONSFLAGS : verbose=yes warnings=all werror=no module_text_server_fb_enabled=yes minizip=yes deprecated=yes module_patchwork_editor_enabled=yes
13- SCONSFLAGS_TEMPLATE : no_editor_splash=yes module_camera_enabled=no module_mobile_vr_enabled=no module_upnp_enabled=no module_websocket_enabled=no module_csg_enabled=yes module_gridmap_enabled=yes use_static_cpp=yes builtin_freetype=yes builtin_libpng=yes builtin_zlib=yes builtin_libwebp=yes builtin_libvorbis=yes builtin_libogg=yes disable_3d=no
14- SCONS_CACHE_MSVC_CONFIG : true
159
1610concurrency :
1711 group : ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}
1812 cancel-in-progress : true
1913
2014jobs :
2115 build :
22- # Windows 10 with latest image
2316 runs-on : ${{ matrix.os }}
2417 name : ${{ matrix.name }}
2518 strategy :
2619 fail-fast : false
2720 matrix :
2821 include :
29- - name : " Windows Editor "
22+ - name : " 🪟 Build Godot for Windows "
3023 os : " windows-latest"
3124 id : windows-editor
3225 platform : windows
3326 target : editor
3427 sconsflags : tests=yes debug_symbols=yes
3528 bin : ./bin/godot.windows.editor.x86_64.exe
3629
37- - name : " 🐧 Linux Editor "
30+ - name : " 🐧 Build Godot for Linux "
3831 os : " ubuntu-22.04"
3932 id : linux-editor
4033 platform : linux
4336 sconsflags-template : optimize=size use_lto=yes debug_symbols=no
4437 bin : ./bin/godot.linuxbsd.editor.x86_64
4538
46- - name : " 🍎 macOS Editor "
39+ - name : " 🍎 Build Godot for macOS "
4740 os : " macos-14"
4841 id : macos-editor
4942 platform : macos
@@ -52,22 +45,38 @@ jobs:
5245 bin : ./bin/godot.macos.editor.arm64
5346
5447 steps :
55- - name : checkout-godot
48+ # Checkout patchwork to tmp/
49+ - name : Checkout patchwork-godot-plugin
5650 uses : actions/checkout@v4
5751 with :
58- repository : ${{env.GODOT_REPOSITORY}}
59- ref : ${{env.GODOT_MAIN_SYNC_REF}}
52+ fetch-depth : 0
53+ path : tmp/patchwork-tmp
54+
55+ # We must move patchwork to a higher directory than our CWD,
56+ # because if we don't, cloning godot will overwrite patchwork.
57+ # (And Godot's actions expect Godot to be our CWD.)
58+ - name : Move to higher directory
59+ shell : sh
60+ run : mv tmp/patchwork-tmp ../patchwork-tmp
6061
61- - name : checkout-patchwork_editor
62+ # Grab the environment variables from build.env and output them
63+ - name : Fetch env variables
64+ id : dotenv
65+ 66+ with :
67+ path : ../patchwork-tmp/build.env
68+ keys-case : bypass
69+
70+ - name : Checkout Godot
6271 uses : actions/checkout@v4
6372 with :
64- path : modules/patchwork_editor
65- fetch-depth : 0
73+ repository : ${{ steps.dotenv.outputs.GODOT_REPO }}
74+ ref : ${{ steps.dotenv.outputs.GODOT_REF }}
6675
67- - name : copy actions
76+ - name : Copy editor directory
6877 shell : bash
6978 run : |
70- cp -R modules/patchwork_editor/.github/actions/* .github/actions/
79+ cp -R ../patchwork-tmp/editor modules/patchwork_editor
7180
7281 - name : Select Xcode 16
7382 if : matrix.platform == 'macos'
@@ -138,7 +147,7 @@ jobs:
138147 - name : Prepare artifact
139148 # Stripping the debug symbols screws up lipo'd binaries on macos, so don't do it
140149 if : matrix.platform != 'macos'
141- uses : ./.github/actions/godot-prepare-artifact
150+ uses : ./../patchwork-tmp/. github/actions/godot-prepare-artifact
142151
143152 - name : Save Godot build cache
144153 # if: success() || (steps.restore-cache.outputs.cache-hit == 'false' && (steps.compile-editor.outcome != 'skipped' || steps.compile-template.outcome != 'skipped'))
@@ -152,11 +161,11 @@ jobs:
152161 if : matrix.platform == 'macos' && matrix.target == 'editor'
153162 shell : bash
154163 run : |
155- chmod +x ${{ github.workspace }}/ bin/godot_macos_editor.app/Contents/MacOS/Godot
164+ chmod +x bin/godot_macos_editor.app/Contents/MacOS/Godot
156165
157166 - name : Mac Sign
158167 if : matrix.platform == 'macos' && matrix.target == 'editor'
159- uses : ./.github/actions/macos-sign
168+ uses : ./../patchwork-tmp/. github/actions/macos-sign
160169 with :
161170 FRAMEWORK_PATH : ${{ github.workspace }}/bin/godot_macos_editor.app
162171 SIGN_FLAGS : " --deep --force --options=runtime --entitlements ${{ github.workspace }}/misc/dist/macos/editor.entitlements"
@@ -171,106 +180,6 @@ jobs:
171180 - uses : actions/upload-artifact@v4
172181 if : matrix.id != 'linux-sanitizers'
173182 with :
174- name : patchwork_editor -${{ matrix.platform }}
175- path : ${{github.workspace}}/bin/*
183+ name : godot-with-patchwork -${{ matrix.platform }}
184+ path : ${{ github.workspace }}/bin/*
176185 retention-days : 90
177-
178- # test:
179- # needs: build
180- # runs-on: ${{ matrix.os }}
181- # name: ${{ matrix.name }} test
182- # strategy:
183- # fail-fast: false
184- # matrix:
185- # include:
186- # - name: "Windows"
187- # os: "windows-latest"
188- # platform: windows
189- # bin: ./bin/godot.windows.editor.x86_64.exe
190-
191- # - name: "🐧 Linux"
192- # os: "ubuntu-24.04"
193- # platform: linux
194- # bin: ./bin/godot.linuxbsd.editor.x86_64
195-
196- # - name: "🍎 macOS"
197- # os: "macos-14"
198- # platform: macos
199- # bin: ./bin/godot.macos.editor.arm64
200-
201- # steps:
202- # - name: checkout-godot
203- # uses: actions/checkout@v4
204- # with:
205- # repository: GODOT_REPOSITORY
206- # ref: ${{env.GODOT_MAIN_SYNC_REF}}
207-
208- # - name: checkout-patchwork_editor
209- # uses: actions/checkout@v4
210- # with:
211- # path: modules/patchwork_editor
212- # fetch-depth: 0
213-
214- # - name: copy actions
215- # shell: bash
216- # run: |
217- # cp -R modules/patchwork_editor/.github/actions/* .github/actions/
218-
219- # - name: Download patchwork_editor artifacts
220- # uses: actions/download-artifact@v4
221- # with:
222- # name: patchwork_editor-editor-${{ matrix.platform }}
223- # path: bin
224-
225- # - name: set permissions
226- # shell: bash
227- # run: |
228- # chmod a+x bin/godot*
229-
230- # - name: run tests
231- # shell: bash
232- # run: |
233- # ${{matrix.bin}} --headless --test --force-colors "--test-case=[patchwork_editor]*"
234-
235- release :
236- if : startsWith(github.ref, 'refs/tags/')
237- runs-on : " ubuntu-latest"
238- permissions :
239- contents : write
240- needs : [build]
241- steps :
242- - name : Download Linux artifact
243- uses : actions/download-artifact@v4
244- with :
245- name : patchwork_editor-linux
246- path : artifacts/linux
247- - name : Download MacOS artifact
248- uses : actions/download-artifact@v4
249- with :
250- name : patchwork_editor-macos
251- path : artifacts/macos
252- - name : Download Windows artifact
253- uses : actions/download-artifact@v4
254- with :
255- name : patchwork_editor-windows
256- path : artifacts/windows
257- - name : Zip artifacts
258- run : |
259- ls -la artifacts/*
260- cd artifacts/windows
261- zip -r9 "../patchwork_editor-${{ github.ref_name }}-windows.zip" *
262- cd ../..
263- cd artifacts/macos
264- chmod a+x godot_macos_editor.app/Contents/MacOS/Godot
265- zip -r9 "../patchwork_editor-${{ github.ref_name }}-macos.zip" *
266- cd ../..
267- cd artifacts/linux
268- chmod a+x *
269- zip -r9 "../patchwork_editor-${{ github.ref_name }}-linux.zip" *
270- - name : Release
271- uses :
nikitalita/[email protected] 272- with :
273- files : |
274- artifacts/patchwork_editor-${{ github.ref_name }}-windows.zip
275- artifacts/patchwork_editor-${{ github.ref_name }}-macos.zip
276- artifacts/patchwork_editor-${{ github.ref_name }}-linux.zip
0 commit comments