-
Notifications
You must be signed in to change notification settings - Fork 25
283 lines (255 loc) · 9.46 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
android:
name: Build Android
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: sh scripts/clone_dependencies.sh
- name: build script
run: |
ls $ANDROID_SDK_ROOT/ndk/
NDK_SDK_ROOT=$ANDROID_SDK_ROOT/ndk/26.3.11579264
cd Dev/Cpp/android
$NDK_SDK_ROOT/ndk-build clean NDK_PROJECT_PATH=./ NDK_APPLICATION_MK=jni/Application_x86.mk
$NDK_SDK_ROOT/ndk-build -j4 NDK_PROJECT_PATH=./ NDK_APPLICATION_MK=jni/Application_x86.mk
cp libs/x86/libEffekseerUnity.so ../../Plugin/Assets/Effekseer/Plugins/Android/libs/x86/
$NDK_SDK_ROOT/ndk-build clean NDK_PROJECT_PATH=./ NDK_APPLICATION_MK=jni/Application_armeabi-v7a.mk
$NDK_SDK_ROOT/ndk-build -j4 NDK_PROJECT_PATH=./ NDK_APPLICATION_MK=jni/Application_armeabi-v7a.mk
cp libs/armeabi-v7a/libEffekseerUnity.so ../../Plugin/Assets/Effekseer/Plugins/Android/libs/armeabi-v7a/
$NDK_SDK_ROOT/ndk-build clean NDK_PROJECT_PATH=./ NDK_APPLICATION_MK=jni/Application_arm64-v8a.mk
$NDK_SDK_ROOT/ndk-build -j4 NDK_PROJECT_PATH=./ NDK_APPLICATION_MK=jni/Application_arm64-v8a.mk
cp libs/arm64-v8a/libEffekseerUnity.so ../../Plugin/Assets/Effekseer/Plugins/Android/libs/arm64-v8a/
- name: Upload math result for android
uses: actions/upload-artifact@v4
with:
name: Android
path: ./Dev/Plugin/Assets/Effekseer/Plugins
mac_ios:
name: mac iOS Build
runs-on: macOS-11
steps:
- uses: actions/checkout@v4
- run: sh scripts/clone_dependencies.sh
- run: cd ./Dev/Cpp/macosx/ && sh ./build_cmake.sh
- name: Upload ios
uses: actions/upload-artifact@v4
with:
name: mac_iOS
path: ./Dev/Plugin/Assets/Effekseer/Plugins
windows:
name: windows Build
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- run: scripts/clone_dependencies.bat
- name: Build
run: cd ./Dev/Cpp/windows && Build.bat
shell: cmd
- name: Upload math result
uses: actions/upload-artifact@v4
with:
name: Windows
path: ./Dev/Plugin/Assets/Effekseer/Plugins
webgl_1-38:
name: WebGL Build with emsdk 1.38
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Cache emsdk
id: cache
uses: actions/cache@v1
with:
path: ./emsdk
key: ${{ runner.os }}-emsdk-1_38-v1
- name: install emsdk 1.38
if: steps.cache.outputs.cache-hit != 'true'
run: |
git clone https://github.com/emscripten-core/emsdk.git -b 3.1.19 --depth 1
cd emsdk
./emsdk install sdk-fastcomp-tag-1.38.11-64bit
cd ..
- run: sh scripts/clone_dependencies.sh
- run: |
./emsdk/emsdk activate sdk-fastcomp-tag-1.38.11-64bit
source ./emsdk/emsdk_env.sh
cd ./Dev/Cpp/webgl
mkdir build138
cd build138
emcmake cmake -DCMAKE_BUILD_TYPE=Release ..
make
cp libEffekseerUnity.bc ../../../Plugin/Assets/Effekseer/Plugins/WebGL/
- name: Upload math result for webgl
uses: actions/upload-artifact@v4
with:
name: WebGL_1-38
path: ./Dev/Plugin/Assets/Effekseer/Plugins
webgl_2-0-19:
name: WebGL Build with emsdk 2.0.19
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Cache emsdk
id: cache
uses: actions/cache@v1
with:
path: ./emsdk
key: ${{ runner.os }}-emsdk-2_0-19
- name: install emsdk 2.0.19
if: steps.cache.outputs.cache-hit != 'true'
run: |
git clone --depth 1 https://github.com/emscripten-core/emsdk.git
cd emsdk
./emsdk install sdk-2.0.19-64bit
cd ..
- run: sh scripts/clone_dependencies.sh
- run: |
./emsdk/emsdk activate sdk-2.0.19-64bit
source ./emsdk/emsdk_env.sh
cd ./Dev/Cpp/webgl
mkdir build2019
cd build2019
emcmake cmake -DCMAKE_BUILD_TYPE=Release ..
make
cp libEffekseerUnity.bc ../../../Plugin/Assets/Effekseer/Plugins/WebGL/2.0.19-64bit/
- name: Upload math result for webgl
uses: actions/upload-artifact@v4
with:
name: WebGL_2-0-19
path: ./Dev/Plugin/Assets/Effekseer/Plugins
webgl_3-1-8:
name: WebGL Build with emsdk 3.1.8
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Cache emsdk
id: cache
uses: actions/cache@v1
with:
path: ./emsdk
key: ${{ runner.os }}-emsdk-3_1-8
- name: install emsdk 3.1.8
if: steps.cache.outputs.cache-hit != 'true'
run: |
git clone --depth 1 https://github.com/emscripten-core/emsdk.git
cd emsdk
./emsdk install sdk-3.1.8-64bit
cd ..
- run: sh scripts/clone_dependencies.sh
- run: |
./emsdk/emsdk activate sdk-3.1.8-64bit
source ./emsdk/emsdk_env.sh
cd ./Dev/Cpp/webgl
mkdir build2019
cd build2019
emcmake cmake -DCMAKE_BUILD_TYPE=Release ..
make
cp libEffekseerUnity.bc ../../../Plugin/Assets/Effekseer/Plugins/WebGL/3.1.8-64bit/
- name: Upload math result for webgl
uses: actions/upload-artifact@v4
with:
name: WebGL_3-1-8
path: ./Dev/Plugin/Assets/Effekseer/Plugins
webgl_3-1-38:
name: WebGL Build with emsdk 3.1.38
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Cache emsdk
id: cache
uses: actions/cache@v1
with:
path: ./emsdk
key: ${{ runner.os }}-emsdk-3_1-38
- name: install emsdk 3.1.38
if: steps.cache.outputs.cache-hit != 'true'
run: |
git clone --depth 1 https://github.com/emscripten-core/emsdk.git
cd emsdk
./emsdk install sdk-3.1.38-64bit
cd ..
- run: sh scripts/clone_dependencies.sh
- run: |
./emsdk/emsdk activate sdk-3.1.38-64bit
source ./emsdk/emsdk_env.sh
cd ./Dev/Cpp/webgl
mkdir build2019
cd build2019
emcmake cmake -DCMAKE_BUILD_TYPE=Release ..
make
cp libEffekseerUnity.bc ../../../Plugin/Assets/Effekseer/Plugins/WebGL/3.1.38-64bit/
- name: Upload math result for webgl
uses: actions/upload-artifact@v4
with:
name: WebGL_3-1-38
path: ./Dev/Plugin/Assets/Effekseer/Plugins
merge:
name: merge
runs-on: ubuntu-latest
needs: [android, mac_ios, windows, webgl_1-38,webgl_2-0-19,webgl_3-1-8,webgl_3-1-38]
steps:
- uses: actions/checkout@v4
- name: Download Android
uses: actions/download-artifact@v1
with:
name: Android
- name: Download mac_ios
uses: actions/download-artifact@v1
with:
name: mac_iOS
- name: Download mac_ios
uses: actions/download-artifact@v1
with:
name: Windows
- name: Download webgl 1.38
uses: actions/download-artifact@v1
with:
name: WebGL_1-38
- name: Download webgl 2.0.19
uses: actions/download-artifact@v1
with:
name: WebGL_2-0-19
- name: Download webgl 3.1.8
uses: actions/download-artifact@v1
with:
name: WebGL_3-1-8
- name: Download webgl 3.1.38
uses: actions/download-artifact@v1
with:
name: WebGL_3-1-38
- name: Copy
run: |
mv Android/Android/libs/arm64-v8a/libEffekseerUnity.so Dev/Plugin/Assets/Effekseer/Plugins/Android/libs/arm64-v8a/
mv Android/Android/libs/armeabi-v7a/libEffekseerUnity.so Dev/Plugin/Assets/Effekseer/Plugins/Android/libs/armeabi-v7a/
mv Android/Android/libs/x86/libEffekseerUnity.so Dev/Plugin/Assets/Effekseer/Plugins/Android/libs/x86/
mv mac_iOS/iOS/libEffekseerUnity.a Dev/Plugin/Assets/Effekseer/Plugins/iOS/libEffekseerUnity.a
rm -rf Dev/Plugin/Assets/Effekseer/Plugins/EffekseerUnity.bundle
cp -f -r mac_iOS/EffekseerUnity.bundle Dev/Plugin/Assets/Effekseer/Plugins/
mv WebGL_1-38/WebGL/libEffekseerUnity.bc Dev/Plugin/Assets/Effekseer/Plugins/WebGL/
mv WebGL_2-0-19/WebGL/2.0.19-64bit/libEffekseerUnity.bc Dev/Plugin/Assets/Effekseer/Plugins/WebGL/2.0.19-64bit/
mv WebGL_3-1-8/WebGL/3.1.8-64bit/libEffekseerUnity.bc Dev/Plugin/Assets/Effekseer/Plugins/WebGL/3.1.8-64bit/
mv WebGL_3-1-38/WebGL/3.1.38-64bit/libEffekseerUnity.bc Dev/Plugin/Assets/Effekseer/Plugins/WebGL/3.1.38-64bit/
mv Windows/x86/EffekseerUnity.dll Dev/Plugin/Assets/Effekseer/Plugins/x86/
mv Windows/x86_64/EffekseerUnity.dll Dev/Plugin/Assets/Effekseer/Plugins/x86_64/
- name: Upload math result
uses: actions/upload-artifact@v4
with:
name: merged
path: Dev/Plugin/Assets/Effekseer
- run: pip install PyYAML
- run: mkdir dist
- run: |
cd Dev/Plugin
python3 ../../create_unitypackage.py -r -o ../../dist/Effekseer.tar.gz Assets/Effekseer
mv ../../dist/Effekseer.tar.gz ../../dist/Effekseer.unitypackage
- name: Upload math result
uses: actions/upload-artifact@v4
with:
name: Effekseer.unitypackage
path: dist