@@ -33,15 +33,18 @@ jobs:
3333 vendor : unknown
3434 env : -gnu
3535 lib : libnative.so
36+ editor_lib : libeditor.so
3637 - platform : windows
3738 os : windows-2025
3839 vendor : pc
3940 env : ' -msvc'
4041 lib : native.dll
42+ editor_lib : editor.dll
4143 - platform : darwin
4244 os : macos-14
4345 vendor : apple
4446 lib : libnative.dylib
47+ editor_lib : libeditor.dylib
4548 exclude :
4649 - platform : linux
4750 arch : aarch64
7073 cd native/
7174 rustup target add ${{ env.TARGET_TRIPLET }}
7275 - name : Build Debug
76+ if : ${{ !inputs.release }}
7377 run : |
7478 cd native/
7579 ${{ env.CARGO_BUILD}} ${{ env.TARGET_TRIPLET}}
@@ -78,12 +82,20 @@ jobs:
7882 run : |
7983 cd native/
8084 ${{ env.CARGO_BUILD }} ${{ env.TARGET_TRIPLET}} --release
81- - name : Debug Artifacts
85+
86+ - name : Debug libnative Artifact
8287 uses : actions/upload-artifact@v4
88+ if : ${{ !inputs.release }}
8389 with :
8490 name : libnative-${{ matrix.platform }}-${{ matrix.arch }}-debug
8591 path : native/target/${{ env.TARGET_TRIPLET }}/debug/${{ matrix.lib }}
86- - name : Release Artifacts
92+ - name : Debug libeditor Artifact
93+ uses : actions/upload-artifact@v4
94+ with :
95+ name : libeditor-${{ matrix.platform }}-${{ matrix.arch }}-debug
96+ path : native/target/${{ env.TARGET_TRIPLET }}/debug/${{ matrix.editor_lib }}
97+
98+ - name : Release libnative Artifacts
8799 uses : actions/upload-artifact@v4
88100 if : inputs.release
89101 with :
@@ -104,6 +116,7 @@ jobs:
104116 aarch64 : true
105117 extension : ' .dmg'
106118 lib : libnative.dylib
119+ editor_lib : " libeditor.dylib"
107120 template_dir : ' $HOME/Library/Application\ Support/Godot/export_templates'
108121 godot_artefact : ' macOS.universal'
109122 - profile : ' Windows'
@@ -115,6 +128,7 @@ jobs:
115128 aarch64 : true
116129 extension : ' .exe'
117130 lib : native.dll
131+ editor_lib : " libeditor.so"
118132 template_dir : ' $HOME/.local/share/godot/export_templates'
119133 godot_artefact : ' linux.x86_64'
120134 - profile : ' Linux'
@@ -123,6 +137,7 @@ jobs:
123137 vendor : ' unknown'
124138 os : ubuntu-24.04
125139 lib : libnative.so
140+ editor_lib : " libeditor.so"
126141 template_dir : ' $HOME/.local/share/godot/export_templates'
127142 godot_artefact : ' linux.x86_64'
128143 x86_64 : true
@@ -162,38 +177,42 @@ jobs:
162177 cd ${{ matrix.template_dir }}/${{ matrix.version }}.stable
163178 curl -LO https://github.com/godotengine/godot/releases/download/${{ matrix.version }}-stable/Godot_v${{ matrix.version }}-stable_export_templates.tpz
164179 unzip -j Godot_v${{ matrix.version }}-stable_export_templates.tpz
165- - name : download host libs
166- if : ${{ matrix.platform != 'linux' && startsWith(matrix.os, 'ubuntu') }}
167- uses : actions/download-artifact@v5
180+ - name : download editor lib
181+ uses : actions/download-artifact@v8
168182 with :
169- name : libnative-linux-x86_64-debug
170- path : native/target/x86_64-unknown-linux-gnu/debug/
171-
183+ name : libeditor-${{ startsWith(matrix.os, 'ubuntu') && 'linux' || matrix.platform }}-${{ startsWith(matrix.os, 'ubuntu') && 'x86_64' || 'aarch64' }}-debug
184+ path : native/target/${{ startsWith(matrix.os, 'ubuntu') && 'x86_64-unknown-linux-gnu' || 'aarch64-apple-darwin' }}/debug/
185+ merge-multiple : true
186+
172187 - name : download x86_64 debug libs
173- if : matrix.x86_64
174- uses : actions/download-artifact@v5
188+ if : ${{ matrix.x86_64 && !inputs.release }}
189+ uses : actions/download-artifact@v8
175190 with :
176191 name : libnative-${{ matrix.platform }}-x86_64-debug
177192 path : native/target/x86_64-${{ matrix.vendor }}-${{ matrix.platform }}${{ matrix.env }}/debug/
193+ merge-multiple : true
178194 - name : download x86_64 release libs
179- if : ${{ matrix.x86_64 && inputs.release }}
180- uses : actions/download-artifact@v5
195+ if : ${{ matrix.x86_64 && inputs.release }}
196+ uses : actions/download-artifact@v8
181197 with :
182198 name : libnative-${{ matrix.platform }}-x86_64-release
183199 path : native/target/x86_64-${{ matrix.vendor }}-${{ matrix.platform }}${{ matrix.env }}/release/
200+ merge-multiple : true
184201
185202 - name : download aarch64 debug libs
186- if : matrix.aarch64
187- uses : actions/download-artifact@v5
203+ if : ${{ matrix.aarch64 && !inputs.release }}
204+ uses : actions/download-artifact@v8
188205 with :
189206 name : libnative-${{ matrix.platform }}-aarch64-debug
190207 path : native/target/aarch64-${{ matrix.vendor }}-${{ matrix.platform }}${{ matrix.env }}/debug/
208+ merge-multiple : true
191209 - name : download aarch64 release libs
192210 if : ${{ matrix.aarch64 && inputs.release }}
193- uses : actions/download-artifact@v5
211+ uses : actions/download-artifact@v8
194212 with :
195213 name : libnative-${{ matrix.platform }}-aarch64-release
196214 path : native/target/aarch64-${{ matrix.vendor }}-${{ matrix.platform }}${{ matrix.env }}/release/
215+ merge-multiple : true
197216
198217 - name : create universal libnative
199218 if : matrix.platform == 'darwin'
@@ -210,8 +229,10 @@ jobs:
210229 let aarch64_debug = $"($aarch64_path)/debug/${{ matrix.lib }}"
211230 let aarch64_release = $"($aarch64_path)/release/${{ matrix.lib }}"
212231
213- mkdir $"native/target/universal-($platform_dir)/debug/"
214- lipo -create $x86_debug $aarch64_debug -output $"native/target/universal-($platform_dir)/debug/${{ matrix.lib }}"
232+ if !$release {
233+ mkdir $"native/target/universal-($platform_dir)/debug/"
234+ lipo -create $x86_debug $aarch64_debug -output $"native/target/universal-($platform_dir)/debug/${{ matrix.lib }}"
235+ }
215236
216237 if $release {
217238 mkdir $"native/target/universal-($platform_dir)/release/"
@@ -234,10 +255,7 @@ jobs:
234255 let profile = if $release { "release" } else { "debug" }
235256
236257 rm -r $"native/target/x86_64-($platform_dir)/($profile)/"
237-
238- if $release {
239- rm -r $"native/target/aarch64-($platform_dir)/($profile)/"
240- }
258+ rm -r $"native/target/aarch64-($platform_dir)/($profile)/"
241259
242260 - name : export-debug
243261 shell : nu {0}
@@ -272,4 +290,4 @@ jobs:
272290 - uses : actions/upload-artifact@v4
273291 with :
274292 name : SimChopper_${{ matrix.profile }}_${{ steps.describe.outputs.ref }}
275- path : ${{ env.EXPORT_DIR }}
293+ path : ${{ env.EXPORT_DIR }}
0 commit comments