forked from aerys/minko
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
204 lines (187 loc) · 6.33 KB
/
.gitlab-ci.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
stages:
- build
- test
- archive
- release
.build_with_artifacts_template: &build_with_artifacts_template
artifacts:
name: "${CI_PROJECT_NAME}-${CI_JOB_NAME}-${CI_COMMIT_REF_SLUG}-${CI_COMMIT_SHA}"
expire_in: 6 hr
paths:
- build/module
- build/framework/enable.cmake
- build/framework/bin
- build/framework/asset
- build/framework/lib
- build/framework/include
- build/plugin/*/bin
- build/plugin/*/asset
- build/plugin/*/lib
- build/plugin/*/include
- build/plugin/*/enable.cmake
- build/plugin/html-overlay/src/android/tasks/*.java
- build/plugin/html-overlay/src/android/webview/*.java
- build/plugin/sensors/src/android/*.java
- build/plugin/nodejs-worker/src/minko/file/*.java
- build/plugin/video-camera/src/minko/video/*.java
- build/template
- build/cmake
- build/test
- LICENSE.md
- README.md
.archive_template: &archive_template
stage: archive
image: registry.aerys.in/aerys/smartshape-docker/archive:26975
except:
- master
script:
- cd "${CI_PROJECT_DIR}"
- tar -cjSf "/tmp/${ARCHIVE_NAME}" *
- b2 authorize_account "${B2_ACCOUNT_ID}" "${B2_APPLICATION_KEY}"
- b2 upload_file --noProgress --info CI_PIPELINE_ID=${CI_PIPELINE_ID} --info CI_COMMIT_SHA=${CI_COMMIT_SHA} "${B2_ARTIFACTS_BUCKET}" "/tmp/${ARCHIVE_NAME}" "${CI_PROJECT_NAME}/${CI_COMMIT_REF_SLUG}/${ARCHIVE_NAME}"
build:html5:
<<: *build_with_artifacts_template
stage: build
image: registry.aerys.in/aerys/smartshape-docker/html5:14459
script:
- mkdir -p build && cd build
- cmake -DCMAKE_BUILD_TYPE=Release -DWITH_WASM=ON -DWITH_EXAMPLES=OFF -DWITH_PLUGINS=ON -DCMAKE_TOOLCHAIN_FILE=/emsdk_portable/emscripten/sdk/cmake/Modules/Platform/Emscripten.cmake ..
- make -j$(nproc)
build:android:
<<: *build_with_artifacts_template
stage: build
image: registry.aerys.in/aerys/smartshape-docker/android:5702
script:
- mkdir -p build && cd build
- cmake -DCMAKE_BUILD_TYPE=Release -DWITH_EXAMPLES=OFF -DWITH_PLUGINS=ON -DWITH_NODEJS_WORKER=ON -DCMAKE_TOOLCHAIN_FILE=/opt/android-ndk-linux/build/cmake/android.toolchain.cmake ..
- make
build:linux:
<<: *build_with_artifacts_template
stage: build
image: registry.aerys.in/aerys/smartshape-docker/linux64:8398
script:
- mkdir -p build && cd build
- cmake -DCMAKE_BUILD_TYPE=Release -DWITH_EXAMPLES=OFF -DWITH_PLUGINS=ON ..
- make -j$(nproc)
build:linux_offscreen:
<<: *build_with_artifacts_template
stage: build
image: registry.aerys.in/aerys/smartshape-docker/linux64:8398
script:
- ./plugin/serializer/script/download_dependencies.sh .
- mkdir -p build && cd build
- cmake -DCMAKE_BUILD_TYPE=Release -DWITH_EXAMPLES=OFF -DWITH_PLUGINS=ON -DWITH_OFFSCREEN=ON -DWITH_TEXTURE_COMPRESSOR=ON -DWITH_TESTS=ON ..
- make -j$(nproc)
build:windows64:
<<: *build_with_artifacts_template
stage: build
tags:
- windows
script:
- $env:MINKO_HOME="{0}" -f (Get-Location).ToString()
- bash plugin\serializer\script\download_dependencies.sh .
- New-Item -ItemType Directory -Force -Path build
- Set-Location -Path build
- cmake -G "Visual Studio 15 2017 Win64" -DCMAKE_BUILD_TYPE=Release -DWITH_EXAMPLES=OFF -DWITH_PLUGINS=ON ..
- msbuild Project.sln /property:Configuration=Release /property:Platform=x64 /m:4
build:windows64_offscreen:
<<: *build_with_artifacts_template
stage: build
tags:
- windows
script:
- $env:MINKO_HOME="{0}" -f (Get-Location).ToString()
- bash plugin\serializer\script\download_dependencies.sh .
- New-Item -ItemType Directory -Force -Path build
- Set-Location -Path build
- cmake -G "Visual Studio 15 2017 Win64" -DCMAKE_BUILD_TYPE=Release -DWITH_EXAMPLES=OFF -DWITH_PLUGINS=ON -DWITH_OFFSCREEN=ON -DWITH_TEXTURE_COMPRESSOR=ON -DWITH_TESTS=ON ..
- msbuild Project.sln /property:Configuration=Release /property:Platform=x64 /m:4
# Disabled until https://git.aerys.in/aerys/smartshape-engine/issues/166 is fixed.
# test:windows64_offscreen:
# stage: test
# tags:
# - windows
# dependencies:
# - build:windows64_offscreen
# artifacts:
# name: "${CI_PROJECT_NAME}-${CI_JOB_NAME}-${CI_COMMIT_REF_SLUG}-${CI_COMMIT_SHA}"
# when: on_failure
# expire_in: 1 hr
# paths:
# - build/test
# script:
# - cd .\build\test\bin
# - minko-test.exe
test:linux_offscreen:
stage: test
image: registry.aerys.in/aerys/smartshape-docker/linux64:8398
dependencies:
- build:linux_offscreen
artifacts:
name: "${CI_PROJECT_NAME}-${CI_JOB_NAME}-${CI_COMMIT_REF_SLUG}-${CI_COMMIT_SHA}"
when: on_failure
expire_in: 1 hr
paths:
- build/test
script:
- cd ./test/websocket-server
- pip3 install -r requirements.txt
- python3 server.py &
- WS_SERVER_PID=$!
- python3 tls_server.py &
- WSS_SERVER_PID=$!
- cd ../../build/test/bin
- ./minko-test
- kill -SIGINT ${WS_SERVER_PID}
- kill -SIGINT ${WSS_SERVER_PID}
- wait
archive:linux_offscreen:
<<: *archive_template
variables:
GIT_STRATEGY: none
ARCHIVE_NAME: ${CI_PROJECT_NAME}-linux_offscreen-${CI_COMMIT_REF_SLUG}.tar.bz2
dependencies:
- build:linux_offscreen
archive:android:
<<: *archive_template
variables:
GIT_STRATEGY: none
ARCHIVE_NAME: ${CI_PROJECT_NAME}-android-${CI_COMMIT_REF_SLUG}.tar.bz2
dependencies:
- build:android
archive:html5:
<<: *archive_template
variables:
GIT_STRATEGY: none
ARCHIVE_NAME: ${CI_PROJECT_NAME}-html5-${CI_COMMIT_REF_SLUG}.tar.bz2
dependencies:
- build:html5
archive:linux:
<<: *archive_template
variables:
GIT_STRATEGY: none
ARCHIVE_NAME: ${CI_PROJECT_NAME}-linux-${CI_COMMIT_REF_SLUG}.tar.bz2
dependencies:
- build:linux
archive:windows64:
<<: *archive_template
variables:
GIT_STRATEGY: none
ARCHIVE_NAME: ${CI_PROJECT_NAME}-windows64-${CI_COMMIT_REF_SLUG}.tar.bz2
dependencies:
- build:windows64
archive:windows64_offscreen:
<<: *archive_template
variables:
GIT_STRATEGY: none
ARCHIVE_NAME: ${CI_PROJECT_NAME}-windows64_offscreen-${CI_COMMIT_REF_SLUG}.tar.bz2
dependencies:
- build:windows64_offscreen
release:
stage: release
image: registry.aerys.in/aerys/gitlab-flow-release:0.4.1
only:
- tags
variables:
GIT_STRATEGY: none
script: gitlab-flow-release --private-token "${RELEASE_PRIVATE_TOKEN}" release