-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
588 lines (538 loc) · 18.8 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
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
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
.dependencies: &dependencies
- |
if [[ ! -f prereq/deps/depends.marker ]]; then
mkdir -p prereq/deps
pushd prereq
git clone https://github.com/davisking/dlib.git
cmake -DCMAKE_POSITION_INDEPENDENT_CODE=On -DCMAKE_INSTALL_PREFIX=/opt/neuon -DCMAKE_BUILD_TYPE=Release -DUSE_SSE2_INSTRUCTIONS=1 -DUSE_SSE4_INSTRUCTIONS=1 -DUSE_AVX_INSTRUCTIONS=1 -DDLIB_NO_GUI_SUPPORT=1 -Sdlib -Bdlib.build
cmake --build dlib.build --target install -- DESTDIR=$PWD/deps -j8
git clone https://github.com/google/googletest.git
cmake -DCMAKE_POSITION_INDEPENDENT_CODE=On -DCMAKE_INSTALL_PREFIX=/opt/neuon -DCMAKE_BUILD_TYPE=Release -Sgoogletest -Bgoogletest.build
cmake --build googletest.build --target install -- DESTDIR=$PWD/deps -j8
git clone https://github.com/sergeyrachev/aquila.git -b mfec
cmake -DCMAKE_POSITION_INDEPENDENT_CODE=On -DCMAKE_INSTALL_PREFIX=/opt/neuon -DCMAKE_BUILD_TYPE=Release -Saquila -Baquila.build
cmake --build aquila.build --target install -- DESTDIR=$PWD/deps -j8
git clone https://github.com/gabime/spdlog.git
cmake -DCMAKE_POSITION_INDEPENDENT_CODE=On -DCMAKE_INSTALL_PREFIX=/opt/neuon -DCMAKE_BUILD_TYPE=Release -Sspdlog -Bspdlog.build
cmake --build spdlog.build --target install -- DESTDIR=$PWD/deps -j8
touch deps/depends.marker
popd
fi
.prereq: &prereq
- |
if [[ ! -f prereq/tools/cmake.marker ]]; then
mkdir -p prereq/tools
pushd prereq
wget -P ./ https://github.com/Kitware/CMake/releases/download/v3.18.4/cmake-3.18.4-Linux-x86_64.tar.gz
tar -C ./tools --strip-component=1 -xzf ./cmake-3.18.4-Linux-x86_64.tar.gz
touch tools/cmake.marker
popd
fi
if [[ ! -f prereq/deps/tensorflow.marker ]]; then
mkdir -p prereq/deps/opt/neuon
pushd prereq
wget -P ./ https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-cpu-linux-x86_64-1.15.0.tar.gz
tar -C ./deps/opt/neuon -xzf ./libtensorflow-cpu-linux-x86_64-1.15.0.tar.gz
touch ./deps/tensorflow.marker
popd
fi
if [[ ! -f prereq/deps/boost.marker ]]; then
mkdir -p prereq/deps
pushd prereq
wget -P ./ https://dl.bintray.com/boostorg/release/1.72.0/source/boost_1_72_0.tar.gz
tar -C ./ -xzf ./boost_1_72_0.tar.gz
pushd ./boost_1_72_0 && ./bootstrap.sh && popd
pushd ./boost_1_72_0 && ./b2 -j8 -d0 --build-type=minimal --build-dir=boost.build/ --prefix=../deps/opt/neuon/ --without-python link=shared threading=multi variant=release runtime-link=shared architecture=x86 address-model=64 install && popd
touch ./deps/boost.marker
popd
fi
if [[ ! -d prereq/build.env ]]; then
mkdir -p prereq
pushd prereq
python3 -m venv ./build.env
. ./build.env/bin/activate && python3 -m pip install --upgrade setuptools wheel
popd
fi
export PATH="${PWD}/prereq/tools/bin:${PATH}"
variables:
DOCKER_DRIVER: overlay2
DOCKER_TLS_CERTDIR: "/certs"
stages:
- environment
- prereq
- build
- build-demo
- test
env-arch:
stage: environment
image: docker:19.03.1
services:
- docker:19.03.1-dind
tags:
- docker
before_script:
- docker login -u $CI_REGISTRY_USER -p $CI_JOB_TOKEN $CI_REGISTRY
script:
- |
docker build -t $CI_REGISTRY_IMAGE/build-arch:latest -f ci/build.arch.Dockerfile ci
docker push $CI_REGISTRY_IMAGE/build-arch:latest
rules:
- if: '$CI_PIPELINE_SOURCE == "push"'
changes:
- ci/build.arch.Dockerfile
env-centos-8:
stage: environment
image: docker:19.03.1
services:
- docker:19.03.1-dind
tags:
- docker
before_script:
- docker login -u $CI_REGISTRY_USER -p $CI_JOB_TOKEN $CI_REGISTRY
script:
- |
docker build -t $CI_REGISTRY_IMAGE/build-centos-8:latest -f ci/build.centos-8.Dockerfile ci
docker push $CI_REGISTRY_IMAGE/build-centos-8:latest
rules:
- if: '$CI_PIPELINE_SOURCE == "push"'
changes:
- ci/build.centos-8.Dockerfile
env-ubuntu-18:
stage: environment
image: docker:19.03.1
services:
- docker:19.03.1-dind
tags:
- docker
before_script:
- docker login -u $CI_REGISTRY_USER -p $CI_JOB_TOKEN $CI_REGISTRY
script:
- |
docker build -t $CI_REGISTRY_IMAGE/build-ubuntu-18:latest -f ci/build.ubuntu-18.Dockerfile ci
docker push $CI_REGISTRY_IMAGE/build-ubuntu-18:latest
rules:
- if: '$CI_PIPELINE_SOURCE == "push"'
changes:
- ci/build.ubuntu-18.Dockerfile
prereq-centos-8:
image: $CI_REGISTRY_IMAGE/build-centos-8:latest
stage: prereq
tags:
- docker
cache:
key: prereq.centos.8
paths:
- prereq/tools
- prereq/deps
- prereq/build.env
script:
- *prereq
- *dependencies
artifacts:
paths:
- prereq/tools
- prereq/deps
- prereq/build.env
expire_in: 6 months
variables:
GIT_STRATEGY: none
rules:
- if: '$TARGET_PLATFORM == "centos-8"'
- if: '$TARGET_PLATFORM == "any"'
prereq-ubuntu-18:
image: $CI_REGISTRY_IMAGE/build-ubuntu-18:latest
stage: prereq
tags:
- docker
cache:
key: prereq.ubuntu.18
paths:
- prereq/tools
- prereq/deps
- prereq/build.env
script:
- *prereq
- *dependencies
artifacts:
paths:
- prereq/tools
- prereq/deps
- prereq/build.env
expire_in: 6 months
variables:
GIT_STRATEGY: none
rules:
- if: '$TARGET_PLATFORM == "ubuntu-18"'
- if: '$TARGET_PLATFORM == "any"'
build-arch-latest:
stage: build
tags:
- docker
image: $CI_REGISTRY_IMAGE/build-arch:latest
cache:
key: prereq.arch
paths:
- prereq/deps
before_script:
- *dependencies
- |
export TAG=$(git describe --tags --abbrev=0)
export REVISION=$(git rev-parse --short HEAD)
export TWEAK=$(git rev-list --count ${TAG}.. )
export TAG=${TAG:-0.0.0}.${TWEAK:-0}
export REVISION=${REVISION:-00000000}
mkdir build.arch
echo $TAG > build.arch/TAG
echo $REVISION > build.arch/REVISION
script:
- |
cmake -DNEUON_PREFIX_PATH=${PWD}/prereq/deps/opt/neuon -DBUILD_SHARED_LIBS=On -DCMAKE_POSITION_INDEPENDENT_CODE=On -DCMAKE_PREFIX_PATH=${PWD}/prereq/deps/opt/neuon -DCMAKE_INSTALL_PREFIX=/opt/neuon -DCPACK_SET_DESTDIR=On -DCMAKE_BUILD_TYPE=Release -Dversion=${TAG} -Drevision=${REVISION} -S. -Bbuild.arch
cmake --build build.arch -- -j8
pushd build.arch
cpack -G "TGZ;ZIP"
popd
artifacts:
name: neuon-${CI_COMMIT_REF_SLUG}+g${CI_COMMIT_SHORT_SHA}-arch
paths:
- build.arch/sources/*.whl
- build.arch/examples/arch.Dockerfile
- build.arch/*.tar.gz
- build.arch/*.zip
- build.arch/TAG
- build.arch/REVISION
expire_in: 1 month
rules:
- if: '$TARGET_PLATFORM == "arch"'
- if: '$TARGET_PLATFORM == "any"'
build-centos-8:
image: $CI_REGISTRY_IMAGE/build-centos-8:latest
stage: build
tags:
- docker
needs:
- prereq-centos-8
before_script:
- |
export TAG=$(git describe --tags --abbrev=0)
export REVISION=$(git rev-parse --short HEAD)
export TWEAK=$(git rev-list --count ${TAG}.. )
export TAG=${TAG:-0.0.0}.${TWEAK:-0}
export REVISION=${REVISION:-00000000}
export PATH=$PWD/prereq/tools/bin:$PATH
. ./prereq/build.env/bin/activate
mkdir build.centos.8
echo $TAG > build.centos.8/TAG
echo $REVISION > build.centos.8/REVISION
script:
- |
cmake -DNEUON_PREFIX_PATH=${PWD}/prereq/deps/opt/neuon -DBUILD_SHARED_LIBS=On -DCMAKE_POSITION_INDEPENDENT_CODE=On -DCMAKE_PREFIX_PATH=${PWD}/prereq/deps/opt/neuon -DCMAKE_INSTALL_PREFIX=/opt/neuon -DCMAKE_INSTALL_LIBDIR=lib -DCPACK_SET_DESTDIR=On -DCPACK_RPM_PACKAGE_RELOCATABLE=Off -DCMAKE_BUILD_TYPE=Release -Dversion=${TAG} -Drevision=${REVISION} -S. -Bbuild.centos.8
cmake --build build.centos.8 -- -j8
pushd build.centos.8
cpack --verbose -G RPM
popd
artifacts:
name: neuon-${CI_COMMIT_REF_SLUG}+g${CI_COMMIT_SHORT_SHA}-centos-8
paths:
- build.centos.8/source/*.whl
- build.centos.8/examples/centos-8.Dockerfile
- build.centos.8/*.rpm
- build.centos.8/TAG
- build.centos.8/REVISION
expire_in: 1 month
rules:
- if: '$TARGET_PLATFORM == "centos-8"'
- if: '$TARGET_PLATFORM == "any"'
build-ubuntu-18:
image: $CI_REGISTRY_IMAGE/build-ubuntu-18:latest
stage: build
tags:
- docker
needs:
- prereq-ubuntu-18
before_script:
- |
export TAG=$(git describe --tags --abbrev=0)
export REVISION=$(git rev-parse --short HEAD)
export TWEAK=$(git rev-list --count ${TAG}.. )
export TAG=${TAG:-0.0.0}.${TWEAK:-0}
export REVISION=${REVISION:-00000000}
export PATH=$PWD/prereq/tools/bin:$PATH
. ./prereq/build.env/bin/activate
mkdir build.ubuntu.18/
echo $TAG > build.ubuntu.18/TAG
echo $REVISION > build.ubuntu.18/REVISION
script:
- |
cmake -DNEUON_PREFIX_PATH=${PWD}/prereq/deps/opt/neuon -DBUILD_SHARED_LIBS=On -DCMAKE_POSITION_INDEPENDENT_CODE=On -DCMAKE_PREFIX_PATH=${PWD}/prereq/deps/opt/neuon -DCMAKE_INSTALL_PREFIX=/opt/neuon -DCPACK_SET_DESTDIR=On -DCMAKE_BUILD_TYPE=Release -Dversion=${TAG} -Drevision=${REVISION} -S. -Bbuild.ubuntu.18
cmake --build build.ubuntu.18 -- -j8
pushd build.ubuntu.18
cpack --verbose -G DEB
popd
artifacts:
name: neuon-${CI_COMMIT_REF_SLUG}+g${CI_COMMIT_SHORT_SHA}-ubuntu-18
paths:
- build.ubuntu.18/sources/*.whl
- build.ubuntu.18/examples/ubuntu-18.Dockerfile
- build.ubuntu.18/*.deb
- build.ubuntu.18/TAG
- build.ubuntu.18/REVISION
expire_in: 1 month
rules:
- if: '$TARGET_PLATFORM == "ubuntu-18"'
- if: '$TARGET_PLATFORM == "any"'
build-demo-arch:
stage: build-demo
needs:
- job: build-arch-latest
artifacts: true
tags:
- docker
image: docker:19.03.1
services:
- docker:19.03.1-dind
variables:
GIT_STRATEGY: none
before_script:
- |
export TAG=$(cat build.arch/TAG)
export REVISION=$(cat build.arch/REVISION)
docker login -u $CI_REGISTRY_USER -p $CI_JOB_TOKEN $CI_REGISTRY
script:
- |
docker build -t $CI_REGISTRY_IMAGE/demo-arch:${TAG} -t $CI_REGISTRY_IMAGE/demo-arch:latest -f build.arch/examples/arch.Dockerfile build.arch
docker push $CI_REGISTRY_IMAGE/demo-arch:${TAG}
docker push $CI_REGISTRY_IMAGE/demo-arch:latest
rules:
- if: '$TARGET_PLATFORM == "arch"'
- if: '$TARGET_PLATFORM == "any"'
build-demo-centos-8:
stage: build-demo
needs:
- job: build-centos-8
artifacts: true
tags:
- docker
image: docker:19.03.1
services:
- docker:19.03.1-dind
variables:
GIT_STRATEGY: none
before_script:
- |
export TAG=$(cat build.centos.8/TAG)
export REVISION=$(cat build.centos.8/REVISION)
docker login -u $CI_REGISTRY_USER -p $CI_JOB_TOKEN $CI_REGISTRY
script:
- |
docker build -t $CI_REGISTRY_IMAGE/demo-centos-8:${TAG} -t $CI_REGISTRY_IMAGE/demo-centos-8:latest -f build.centos.8/examples/centos-8.Dockerfile build.centos.8
docker push $CI_REGISTRY_IMAGE/demo-centos-8:${TAG}
docker push $CI_REGISTRY_IMAGE/demo-centos-8:latest
rules:
- if: '$TARGET_PLATFORM == "centos-8"'
- if: '$TARGET_PLATFORM == "any"'
build-demo-ubuntu-18:
stage: build-demo
needs:
- job: build-ubuntu-18
artifacts: true
tags:
- docker
image: docker:19.03.1
services:
- docker:19.03.1-dind
variables:
GIT_STRATEGY: none
before_script:
- |
export TAG=$(cat build.ubuntu.18/TAG)
export REVISION=$(cat build.ubuntu.18/REVISION)
docker login -u $CI_REGISTRY_USER -p $CI_JOB_TOKEN $CI_REGISTRY
script:
- |
docker build -t $CI_REGISTRY_IMAGE/demo-ubuntu-18:${TAG} -t $CI_REGISTRY_IMAGE/demo-ubuntu-18:latest -f build.ubuntu.18/examples/ubuntu-18.Dockerfile build.ubuntu.18
docker push $CI_REGISTRY_IMAGE/demo-ubuntu-18:${TAG}
docker push $CI_REGISTRY_IMAGE/demo-ubuntu-18:latest
rules:
- if: '$TARGET_PLATFORM == "ubuntu-18"'
- if: '$TARGET_PLATFORM == "any"'
test-demo-image-ubuntu-18:
stage: test
needs:
- job: build-demo-ubuntu-18
artifacts: false
tags:
- docker
image: docker:19.03.1
services:
- docker:19.03.1-dind
variables:
GIT_STRATEGY: none
before_script:
- docker login -u $CI_REGISTRY_USER -p $CI_JOB_TOKEN $CI_REGISTRY
script:
- |
docker pull $CI_REGISTRY_IMAGE/demo-ubuntu-18:latest
docker run -t --rm $CI_REGISTRY_IMAGE/demo-ubuntu-18:latest /opt/neuon/share/neuon/examples/res/unsync.mp4
docker run -t --rm $CI_REGISTRY_IMAGE/demo-ubuntu-18:latest /opt/neuon/share/neuon/examples/res/sync.mpg
rules:
- if: '$TARGET_PLATFORM == "ubuntu-18"'
- if: '$TARGET_PLATFORM == "any"'
test-demo-image-arch:
stage: test
needs:
- job: build-demo-arch
artifacts: false
tags:
- docker
image: docker:19.03.1
services:
- docker:19.03.1-dind
variables:
GIT_STRATEGY: none
before_script:
- docker login -u $CI_REGISTRY_USER -p $CI_JOB_TOKEN $CI_REGISTRY
script:
- |
docker pull $CI_REGISTRY_IMAGE/demo-arch:latest
docker run -t --rm $CI_REGISTRY_IMAGE/demo-arch:latest /opt/neuon/share/neuon/examples/res/unsync.mp4
docker run -t --rm $CI_REGISTRY_IMAGE/demo-arch:latest /opt/neuon/share/neuon/examples/res/sync.mpg
rules:
- if: '$TARGET_PLATFORM == "arch"'
- if: '$TARGET_PLATFORM == "any"'
test-demo-image-centos-8:
stage: test
needs:
- job: build-demo-centos-8
artifacts: false
tags:
- docker
image: docker:19.03.1
services:
- docker:19.03.1-dind
variables:
GIT_STRATEGY: none
before_script:
- docker login -u $CI_REGISTRY_USER -p $CI_JOB_TOKEN $CI_REGISTRY
script:
- |
docker pull $CI_REGISTRY_IMAGE/demo-centos-8:latest
docker run -t --rm $CI_REGISTRY_IMAGE/demo-centos-8:latest /opt/neuon/share/neuon/examples/res/unsync.mp4
docker run -t --rm $CI_REGISTRY_IMAGE/demo-centos-8:latest /opt/neuon/share/neuon/examples/res/sync.mpg
rules:
- if: '$TARGET_PLATFORM == "centos-8"'
- if: '$TARGET_PLATFORM == "any"'
prereq-win:
stage: prereq
tags:
- windows
cache:
key: prereq.windows
paths:
- prereq/deps
- prereq/build.env
script:
- |
if not exist "prereq/deps/ffmpeg.marker" (
mkdir prereq/deps
pushd prereq
curl -L -O https://github.com/BtbN/FFmpeg-Builds/releases/download/autobuild-2020-11-10-12-44/ffmpeg-n4.3.1-25-g1936413eda-win64-gpl-shared-4.3.zip
7z x -y ffmpeg-n4.3.1-25-g1936413eda-win64-gpl-shared-4.3.zip
rename ffmpeg-n4.3.1-25-g1936413eda-win64-gpl-shared-4.3 ffmpeg
move ffmpeg deps
pushd deps
copy /y nul ffmpeg.marker
popd
popd
)
if not exist "prereq/deps/tensorflow.marker" (
mkdir prereq/deps
pushd prereq
curl -L -O https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-cpu-windows-x86_64-1.15.0.zip
7z x -y -odeps/tensorflow libtensorflow-cpu-windows-x86_64-1.15.0.zip
pushd deps
copy /y nul tensorflow.marker
popd
popd
)
if not exist "prereq/deps/boost.marker" (
mkdir prereq/deps
pushd prereq
curl -L -O https://dl.bintray.com/boostorg/release/1.72.0/source/boost_1_72_0.zip
7z x -y boost_1_72_0.zip
pushd boost_1_72_0
call "c:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"
call bootstrap.bat
b2.exe -d0 -j4 link=static threading=multi variant=release toolset=msvc-16.0 --build-type=minimal runtime-link=static --prefix=%CD%/../deps/boost --build-dir=%CD%/boost.build/ --without-python --layout=tagged architecture=x86 address-model=64 install
popd
pushd deps
copy /y nul boost.marker
popd
popd
)
if not exist "prereq/build.env" (
mkdir prereq
pushd prereq
python -m venv build.env
call build.env/bin/activate.bat
python -m pip install --upgrade setuptools wheel
popd
)
if not exist "prereq/deps/depends.marker" (
mkdir prereq/deps
pushd prereq
git clone https://github.com/davisking/dlib.git
cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_POSITION_INDEPENDENT_CODE=On -DCMAKE_INSTALL_PREFIX=%CD%/deps/dlib -DCMAKE_BUILD_TYPE=Release -DUSE_SSE2_INSTRUCTIONS=1 -DUSE_SSE4_INSTRUCTIONS=1 -DUSE_AVX_INSTRUCTIONS=1 -DDLIB_NO_GUI_SUPPORT=1 -Sdlib -Bdlib.build
cmake --build dlib.build --config Release --target install
git clone https://github.com/sergeyrachev/aquila.git -b mfec
cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_POSITION_INDEPENDENT_CODE=On -DCMAKE_INSTALL_PREFIX=%CD%/deps/aquila -DCMAKE_BUILD_TYPE=Release -Saquila -Baquila.build
cmake --build aquila.build --config Release --target install
git clone https://github.com/gabime/spdlog.git
cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_POSITION_INDEPENDENT_CODE=On -DCMAKE_INSTALL_PREFIX=%CD%/deps/spdlog -DCMAKE_BUILD_TYPE=Release -Sspdlog -Bspdlog.build
cmake --build spdlog.build --config Release --target install
git clone https://github.com/open-source-parsers/jsoncpp.git
cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_POSITION_INDEPENDENT_CODE=On -DCMAKE_INSTALL_PREFIX=%CD%/deps/jsoncpp -DCMAKE_BUILD_TYPE=Release -Sspdlog -Bjsoncpp.build
cmake --build jsoncpp.build --config Release --target install
pushd deps
copy /y nul depends.marker
popd
popd
)
artifacts:
paths:
- prereq/deps
- prereq/build.env
expire_in: 2 hour
variables:
GIT_STRATEGY: none
rules:
- if: '$TARGET_PLATFORM == "windows"'
- if: '$TARGET_PLATFORM == "any"'
build-windows:
stage: build
tags:
- windows
needs:
- prereq-win
script:
- |
mkdir build.windows
git describe --tags --abbrev=0 > build.windows/TAG
set /P TAG=<build.windows/TAG
git rev-parse --short HEAD > build.windows/REVISION
set /P REVISION=<build.windows/REVISION
git rev-list --count %TAG%.. > build.windows/TWEAK
set /P TWEAK=<build.windows/TWEAK
set /P TAG=%TAG%.%TWEAK%
call prereq/build.env/bin/activate.bat
cmake -G "Visual Studio 16 2019" -A x64 -T host=x64 -DNEUON_PREFIX_PATH=%CD%/prereq/deps -DBUILD_SHARED_LIBS=On -DCMAKE_POSITION_INDEPENDENT_CODE=On -DCMAKE_PREFIX_PATH=%CD%/prereq/deps -DCMAKE_INSTALL_PREFIX=neuon -DCPACK_SET_DESTDIR=On -DCMAKE_BUILD_TYPE=Release -Dversion=%TAG% -Drevision=%REVISION% -S. -Bbuild.windows
cmake --build --config Release .
cpack --verbose -G ZIP
artifacts:
name: neuon-%CI_COMMIT_REF_SLUG%+g%CI_COMMIT_SHORT_SHA%-windows
paths:
- build.windows/*.whl
- build.windows/*.zip
expire_in: 1 month
rules:
- if: '$TARGET_PLATFORM == "windows"'
- if: '$TARGET_PLATFORM == "any"'