@@ -33,77 +33,84 @@ jobs:
33
33
name : 🔧 Build
34
34
needs : static-checks
35
35
strategy :
36
+ fail-fast : false
36
37
matrix :
37
38
include :
38
39
# Android
39
40
- platform : android
40
- arch : ' x86'
41
- sconsflags : ' android_arch=x86'
41
+ arch : ' x86_32'
42
+ gdnative_flags : ' android_arch=x86'
43
+ sconsflags : ' '
42
44
os : ' ubuntu-20.04'
43
45
- platform : android
44
- arch : ' x64'
45
- sconsflags : ' android_arch=x86_64'
46
+ arch : ' x86_64'
47
+ gdnative_flags : ' android_arch=x86_64'
48
+ sconsflags : ' '
46
49
os : ' ubuntu-20.04'
47
50
- platform : android
48
- arch : ' arm'
49
- sconsflags : ' android_arch=armv7'
51
+ arch : ' arm32'
52
+ gdnative_flags : ' android_arch=armv7'
53
+ sconsflags : ' '
50
54
os : ' ubuntu-20.04'
51
55
- platform : android
52
56
arch : ' arm64'
53
- sconsflags : ' android_arch=arm64v8'
57
+ gdnative_flags : ' android_arch=arm64v8'
58
+ sconsflags : ' '
54
59
os : ' ubuntu-20.04'
55
60
56
61
# iOS
57
62
- platform : ios
58
- arch : ' x64'
59
- sconsflags : ' ios_arch=x86_64 ios_simulator=true'
60
- os : ' macos-latest'
61
- - platform : ios
62
- arch : ' arm'
63
- sconsflags : ' ios_arch=armv7'
63
+ arch : ' x86_64'
64
+ gdnative_flags : ' ios_arch=x86_64'
65
+ sconsflags : ' ios_simulator=true'
64
66
os : ' macos-latest'
65
67
- platform : ios
66
68
arch : ' arm64'
67
- sconsflags : ' ios_arch=arm64'
68
- os : ' macos-latest'
69
+ gdnative_flags : ' ios_arch=arm64'
70
+ sconsflags : ' '
71
+ os : ' macos-11'
72
+
69
73
70
74
# Linux
71
75
- platform : linux
72
- arch : ' x86'
73
- sconsflags : ' bits=32'
76
+ arch : ' x86_32'
77
+ gdnative_flags : ' bits=32'
78
+ sconsflags : ' '
74
79
os : ' ubuntu-20.04'
75
80
- platform : linux
76
- arch : ' x64'
77
- sconsflags : ' bits=64'
81
+ arch : ' x86_64'
82
+ gdnative_flags : ' bits=64'
83
+ sconsflags : ' '
78
84
os : ' ubuntu-20.04'
79
85
80
86
# macOS
81
87
- platform : osx
82
- arch : ' x64'
83
- sconsflags : ' bits=64'
84
- os : ' macos-latest'
88
+ arch : ' x86_64'
89
+ gdnative_flags : ' macos_arch=x86_64 bits=64'
90
+ sconsflags : ' '
91
+ os : ' macos-11'
85
92
- platform : osx
93
+ gdnative_flags : ' macos_arch=arm64 bits=64'
86
94
arch : ' arm64'
87
- sconsflags : ' bits=64 macos_arch=arm64 macos_sdk_path=/Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk/ '
88
- os : ' macos-10.15 '
95
+ sconsflags : ' '
96
+ os : ' macos-11 '
89
97
90
98
# Windows
91
99
- platform : windows
92
- arch : ' x86'
93
- sconsflags : ' bits=32'
94
- os : ' windows-latest'
100
+ arch : ' x86_32'
101
+ gdnative_flags : ' bits=32'
102
+ sconsflags : ' use_mingw=yes'
103
+ os : ' ubuntu-20.04'
95
104
msvc_arch : amd64_x86
96
105
- platform : windows
97
- arch : ' x64'
98
- sconsflags : ' bits=64'
99
- os : ' windows-latest'
106
+ arch : ' x86_64'
107
+ gdnative_flags : ' bits=64'
108
+ sconsflags : ' use_mingw=yes'
109
+ os : ' ubuntu-20.04'
100
110
msvc_arch : amd64
101
111
102
112
env :
103
- SCONSFLAGS : ${{ matrix.sconsflags }} platform=${{ matrix.platform }} --jobs=2
104
- NDK_VERSION : 22b
105
- ANDROID_NDK_ROOT : ${{github.workspace}}/android-ndk-r22b
106
- MSVC_VARS : ' C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat'
113
+ SCONSFLAGS : ${{ matrix.sconsflags }} platform=${{ matrix.platform }} arch=${{ matrix.arch }} --jobs=2
107
114
108
115
defaults :
109
116
run :
@@ -114,31 +121,22 @@ jobs:
114
121
with :
115
122
submodules : recursive
116
123
117
- - name : Cache NDK
118
- id : cache-ndk
119
- if : ${{ matrix.platform == 'android' }}
120
- uses : actions/cache@v2
121
- with :
122
- path : ${{ env.ANDROID_NDK_ROOT }}
123
- key : ndk-${{ env.NDK_VERSION }}
124
-
125
- - name : Download NDK
126
- if : ${{ matrix.platform == 'android' && steps.cache-ndk.outputs.cache-hit != 'true' }}
127
- id : setup-ndk
128
- run : |
129
- cd ${{ github.workspace }}
130
- curl -L https://dl.google.com/android/repository/android-ndk-r${{ env.NDK_VERSION }}-linux-x86_64.zip -o ndk.zip
131
- unzip ndk.zip
132
- ls
133
-
134
- - name : Setup MSVC build environment for ${{ matrix.msvc_arch }}
124
+ - name : Install Windows build dependencies
135
125
if : ${{ matrix.platform == 'windows' }}
136
- run : " '${{ env.MSVC_VARS }}' ${{ matrix.msvc_arch }}"
126
+ run : |
127
+ sudo apt-get update
128
+ sudo apt-get install build-essential mingw-w64
129
+ sudo update-alternatives --set i686-w64-mingw32-gcc /usr/bin/i686-w64-mingw32-gcc-posix
130
+ sudo update-alternatives --set i686-w64-mingw32-g++ /usr/bin/i686-w64-mingw32-g++-posix
131
+ sudo update-alternatives --set x86_64-w64-mingw32-gcc /usr/bin/x86_64-w64-mingw32-gcc-posix
132
+ sudo update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix
133
+ dpkg -l | grep ii | grep mingw
134
+ update-alternatives --get-selections | grep mingw
137
135
138
136
- name : Install Linux build dependencies
139
137
if : ${{ matrix.platform == 'linux' }}
140
138
run : |
141
- sudo apt-get install build-essential gcc-multilib wget g++-multilib
139
+ sudo apt-get install build-essential gcc-multilib g++-multilib
142
140
143
141
- name : Set up Python 3.x
144
142
uses : actions/setup-python@v2
@@ -152,35 +150,25 @@ jobs:
152
150
python -m pip install scons
153
151
python --version
154
152
scons --version
153
+ cmake --version
155
154
156
- - name : Get WebRTC package for ${{ matrix.platform }} - ${{ matrix.arch }}
157
- uses : ./.github/actions/webrtc-download
158
- with :
159
- platform : ${{ matrix.platform }}
160
- archs : ${{ matrix.arch }}
161
-
162
- - name : Fix godot-cpp revision and file names for OSX arm64 build.
163
- if : ${{ matrix.platform == 'osx' && matrix.arch == 'arm64' }}
155
+ - name : Compile Extension - debug - ${{ matrix.platform }} - ${{ matrix.arch }}
164
156
run : |
165
- cd godot-cpp
166
- git checkout e08ecdc28c5409cb5366027227e996c342dcee93
167
- rm -rf src/gen/
168
- rm -rf include/gen/
169
- mkdir bin
170
- ln -s libgodot-cpp.osx.debug.64.a bin/libgodot-cpp.osx.debug.arm64.a
171
- ln -s libgodot-cpp.osx.release.64.a bin/libgodot-cpp.osx.release.arm64.a
172
-
173
- - name : Compilation ${{ matrix.platform }} - ${{ matrix.arch }} - godot-cpp
157
+ scons target=debug generate_bindings=yes
158
+
159
+ - name : Compile GDNative - debug - ${{ matrix.platform }} - ${{ matrix.arch }}
174
160
run : |
175
- scons -C godot-cpp target=debug generate_bindings=yes
176
- scons -C godot-cpp target=release
161
+ scons target=debug generate_bindings=yes ${{ matrix.gdnative_flags }} godot_version=3
177
162
178
- - name : Compilation ${{ matrix.platform }} - ${{ matrix.arch }} - webrtc-native
163
+ - name : Compile Extension - release - ${{ matrix.platform }} - ${{ matrix.arch }}
179
164
run : |
180
- scons target=debug
181
165
scons target=release
182
166
183
- - uses : actions/upload-artifact@v2
167
+ - name : Compile GDNative - release ${{ matrix.platform }} - ${{ matrix.arch }}
168
+ run : |
169
+ scons target=release ${{ matrix.gdnative_flags }} godot_version=3
170
+
171
+ - uses : actions/upload-artifact@v3
184
172
with :
185
173
name : ${{ github.job }}-${{ matrix.platform }}-${{ matrix.arch }}
186
174
path : bin/*
@@ -191,32 +179,54 @@ jobs:
191
179
runs-on : " ubuntu-latest"
192
180
steps :
193
181
- uses : actions/checkout@v2
182
+ with :
183
+ submodules : recursive
194
184
195
- - uses : actions/download-artifact@v2
185
+ - uses : actions/download-artifact@v3
196
186
with :
197
187
path : artifacts
198
188
189
+ - name : Bundle licenses.
190
+ run : |
191
+ cp LICENSE artifacts/LICENSE.webrtc-native
192
+ cp deps/libdatachannel/LICENSE artifacts/LICENSE.libdatachannel
193
+ cp deps/openssl/LICENSE.txt artifacts/LICENSE.openssl
194
+ cp deps/libdatachannel/deps/libjuice/LICENSE artifacts/LICENSE.libjuice
195
+ cp deps/libdatachannel/deps/usrsctp/LICENSE.md artifacts/LICENSE.usrsctp
196
+ cp deps/libdatachannel/deps/libsrtp/LICENSE artifacts/LICENSE.libsrtp
197
+ cp deps/libdatachannel/deps/json/LICENSE.MIT artifacts/LICENSE.json
198
+ cp deps/libdatachannel/deps/plog/LICENSE artifacts/LICENSE.plog
199
+
199
200
- name : Package artifacts for release
200
201
run : |
201
202
mkdir release
202
203
cd release
203
- for name in webrtc webrtc_debug
204
+
205
+ ls -R
206
+
207
+ for version in extension gdnative
204
208
do
205
- mkdir -p ${name}/lib/
206
- find ../artifacts -wholename "*/${name}/lib/*" | xargs cp -t ${name}/lib/
207
- find ../artifacts -wholename "*/${name}/${name}.tres" | head -n 1 | xargs cp -t ${name}/
209
+ for name in webrtc webrtc_debug
210
+ do
211
+ destdir="${version}/${name}"
212
+ mkdir -p ${destdir}/lib
213
+ find ../artifacts -wholename "*/${destdir}/lib/*" | xargs cp -t ${destdir}/lib/
214
+ find ../artifacts -wholename "*/${destdir}/${name}.tres" -or -wholename "*/${destdir}/${name}.gdextension" | head -n 1 | xargs cp -t ${destdir}/
215
+ find ../artifacts -wholename "*/LICENSE*" | xargs cp -t ${destdir}/
216
+ cd ${version}
217
+ zip -r ../godot-${version}-${name}.zip ${name}
218
+ cd ..
219
+ done
208
220
done
209
221
210
- zip -r godot-webrtc-native-release.zip webrtc
211
- zip -r godot-webrtc-native-debug.zip webrtc_debug
212
222
ls -R
213
223
214
- - uses : actions/upload-artifact@v2
224
+ - uses : actions/upload-artifact@v3
215
225
with :
216
- name : godot-webrtc-native-debug.zip
217
- path : release/godot-webrtc-native-debug .zip
226
+ name : godot-webrtc-extension
227
+ path : release/*-extension-* .zip
218
228
219
- - uses : actions/upload-artifact@v2
229
+ - uses : actions/upload-artifact@v3
220
230
with :
221
- name : godot-webrtc-native-release.zip
222
- path : release/godot-webrtc-native-release .zip
231
+ name : godot-webrtc-gdnative
232
+ path : release/*-gdnative-* .zip
0 commit comments