22
22
arch : ['x86_64', 'aarch64']
23
23
include :
24
24
- platform : linux
25
- os : ubuntu-22 .04
25
+ os : ubuntu-24 .04
26
26
vendor : unknown
27
27
env : -gnu
28
28
lib : libnative.so
50
50
- name : checkout
51
51
uses : actions/checkout@v4
52
52
with :
53
- lfs : true
53
+ lfs : false
54
54
- name : Set up clang64
55
55
if : contains(matrix.os, 'windows')
56
56
run : echo "LIBCLANG_PATH=$((gcm clang).source -replace "clang.exe")" >> $env:GITHUB_ENV
@@ -76,40 +76,43 @@ jobs:
76
76
uses : actions/upload-artifact@v4
77
77
with :
78
78
name : libnative-${{ matrix.platform }}-${{ matrix.arch }}
79
- path : native/target/${{ env.TARGET_TRIPLET }}/${{ inputs.release && 'release' || 'debug' }}/${{ matrix.lib }}
79
+ path : native/target/${{ env.TARGET_TRIPLET }}/${{ inputs.release && 'release' || 'debug' }}/${{ matrix.lib }}
80
80
81
81
godot-export :
82
82
strategy :
83
83
matrix :
84
84
profile : ['macOS', 'Windows', 'Linux']
85
- version : ['4.2.2 ']
85
+ version : ['4.3 ']
86
86
include :
87
87
- profile : ' macOS'
88
88
platform : darwin
89
89
vendor : apple
90
- os : macos-14
90
+ os : macos-15
91
91
x86_64 : true
92
92
aarch64 : true
93
93
extension : ' .dmg'
94
94
lib : libnative.dylib
95
95
template_dir : ' $HOME/Library/Application\ Support/Godot/export_templates'
96
+ godot_artefact : ' macOS.universal'
96
97
- profile : ' Windows'
97
98
platform : windows
98
99
env : ' -msvc'
99
100
vendor : pc
100
- os : ubuntu-22 .04
101
+ os : ubuntu-24 .04
101
102
x86_64 : true
102
103
aarch64 : true
103
104
extension : ' .exe'
104
105
lib : native.dll
105
106
template_dir : ' $HOME/.local/share/godot/export_templates'
107
+ godot_artefact : ' linux.x86_64'
106
108
- profile : ' Linux'
107
109
platform : ' linux'
108
110
env : ' -gnu'
109
111
vendor : ' unknown'
110
- os : ubuntu-20 .04
112
+ os : ubuntu-24 .04
111
113
lib : libnative.so
112
114
template_dir : ' $HOME/.local/share/godot/export_templates'
115
+ godot_artefact : ' linux.x86_64'
113
116
x86_64 : true
114
117
115
118
needs : rust-build
@@ -124,11 +127,23 @@ jobs:
124
127
uses : actions/checkout@v4
125
128
with :
126
129
lfs : true
127
- - name : setup Godot
128
- uses : lihop/setup-godot@v2
130
+ - uses : hustcer/setup-nu@main
129
131
with :
130
- version : ${{ matrix.version }}
131
- export-templates : false
132
+ version : " 0.101.*"
133
+
134
+ - name : setup Godot
135
+ shell : nu {0}
136
+ run : |
137
+ let bin_path = "${{ startsWith(matrix.os, 'ubuntu') && format('./Godot_v{0}-stable_linux.x86_64', matrix.version) || './Godot.app/Contents/MacOS/Godot' }}"
138
+ mkdir .godot_bin
139
+ http get "https://github.com/godotengine/godot/releases/download/${{ matrix.version }}-stable/Godot_v${{ matrix.version }}-stable_${{ matrix.godot_artefact }}.zip"
140
+ | save -rf .godot_bin/godot.zip
141
+ cd .godot_bin
142
+ unzip godot.zip
143
+ chmod +x $bin_path
144
+ ln -s $bin_path "./godot"
145
+ ls -a
146
+
132
147
- name : download Godot export template
133
148
run : |
134
149
mkdir -p ${{ matrix.template_dir }}/${{ matrix.version }}.stable
@@ -158,47 +173,52 @@ jobs:
158
173
run : |
159
174
platform_dir="${{ matrix.vendor }}-${{ matrix.platform }}"
160
175
mkdir -p native/target/universal-$platform_dir/debug/
161
- lipo -create native/target/x86_64-$platform_dir/debug/${{ matrix.lib }} native/target/aarch64-$platform_dir/debug/${{ matrix.lib }} -output native/target/universal-$platform_dir/debug/${{ matrix.lib }}
176
+ lipo -create native/target/x86_64-$platform_dir/debug/${{ matrix.lib }} native/target/aarch64-$platform_dir/debug/${{ matrix.lib }} -output native/target/universal-$platform_dir/debug/${{ matrix.lib }}
162
177
- name : copy libs
178
+ shell : nu {0}
163
179
run : |
164
- set -x
165
- platform_dir="${{ matrix.vendor }}-${{ matrix.platform }}${{ matrix.env }}"
166
- x86_64="native/target/x86_64-$platform_dir"
167
- aarch64="native/target/aarch64-$platform_dir"
168
- universal="native/target/universal-$platform_dir"
180
+ let platform_dir = "${{ matrix.vendor }}-${{ matrix.platform }}${{ matrix.env }}"
181
+ let x86_64 = $"native/target/x86_64-($platform_dir)"
182
+ let aarch64 = $"native/target/aarch64-($platform_dir)"
183
+ let universal = $"native/target/universal-($platform_dir)"
169
184
170
- if [[ -d " $x86_64/debug/" ]]; then
171
- mkdir -p " $x86_64/release/"
172
- cp $ x86_64/debug/* " $x86_64/release/"
173
- fi
185
+ if ($"( $x86_64) /debug/" | path type) == "dir" {
186
+ mkdir $"( $x86_64) /release/"
187
+ cp -v $"($ x86_64) /debug/*" $"( $x86_64) /release/"
188
+ }
174
189
175
- if [[ -d " $aarch64/debug/" ]]; then
176
- mkdir -p " $aarch64/release/"
177
- cp $ aarch64/debug/* " $aarch64/release/"
178
- fi
190
+ if ($"( $aarch64) /debug/" | path type) == "dir" {
191
+ mkdir $"( $aarch64) /release/"
192
+ cp -v $"($ aarch64) /debug/*" $"( $aarch64) /release/"
193
+ }
179
194
180
- if [[ -d " $universal/debug/" ]]; then
181
- mkdir -p " $universal/release/"
182
- cp $ universal/debug/* " $universal/release/"
183
- fi
195
+ if ($"( $universal) /debug/" | path type) == "dir" {
196
+ mkdir $"( $universal) /release/"
197
+ cp -v $"($ universal) /debug/*" $"( $universal) /release/"
198
+ }
184
199
- name : import godot project
200
+ shell : nu {0}
185
201
run : |
186
- # import assets
187
- .github/build_godot_cache.sh
188
- # restart to make sure all rust scripts are detected
189
- .github/build_godot_cache.sh
202
+ $env.PATH = $env.PATH | append ("./.godot_bin" | path expand)
203
+
204
+ godot --headless --verbose --import
205
+
190
206
- name : export-debug
207
+ shell : nu {0}
191
208
if : ${{ !inputs.release }}
192
209
run : |
193
- mkdir -p "${{ env.EXPORT_DIR }}"
194
- godot --headless --export-debug ${{ env.EXPORT_ARGS }}
195
- test $(ls -al "${{ env.EXPORT_DIR }}" | wc -l) -gt 1
210
+ $env.PATH = $env.PATH | append ("./.godot_bin" | path expand)
211
+ mkdir "${{ env.EXPORT_DIR }}"
212
+ godot --headless --verbose --export-debug ${{ env.EXPORT_ARGS }}
213
+ if (ls -a "${{ env.EXPORT_DIR }}" | length) < 1 { exit 1 }
196
214
- name : export-release
215
+ shell : nu {0}
197
216
if : inputs.release
198
217
run : |
199
- mkdir -p "${{ env.EXPORT_DIR }}"
218
+ $env.PATH = $env.PATH | append ("./.godot_bin" | path expand)
219
+ mkdir "${{ env.EXPORT_DIR }}"
200
220
godot --headless --export-release ${{ env.EXPORT_ARGS }}
201
- test $ (ls -al "${{ env.EXPORT_DIR }}" | wc -l) -gt 1
221
+ if (ls -a "${{ env.EXPORT_DIR }}" | length) < 1 { exit 1 }
202
222
- name : describe revision
203
223
id : describe
204
224
run : echo "ref=$(git describe --tags --always)" >> $GITHUB_OUTPUT
0 commit comments