-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy path.gitlab-ci.yml
105 lines (88 loc) · 2.06 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
image: ubuntu:16.04
variables:
GIT_SUBMODULE_STRATEGY: recursive
stages:
- frontend
- build
- test
- install-packages
# build web
frontend:
stage: frontend
image: johnpapa/angular-cli
script:
- cd frontend-angular
- npm install
- ng build --prod
cache:
key: nodeModules
paths:
- frontend-angular/node_modules/
artifacts:
name: build_frontend
paths:
- build/web
# build all and create package
build:
stage: build
dependencies:
- frontend
before_script:
- apt update -qq
- apt-get install -qq wget software-properties-common
# install cmake 3.10
- wget -q https://cmake.org/files/v3.10/cmake-3.10.0-rc4-Linux-x86_64.sh
- mkdir /opt/cmake
- sh cmake-3.10.0-rc4-Linux-x86_64.sh --skip-license --prefix=/opt/cmake
- ln -s /opt/cmake/bin/cmake /usr/bin/cmake
- ln -s /opt/cmake/bin/cpack /usr/bin/cpack
# install other deps
- apt-get install -qq zlib1g-dev libopenblas-dev liblapack-dev libuv-dev build-essential libssl-dev git python
# install gcc 7
- add-apt-repository ppa:ubuntu-toolchain-r/test
- apt-get update
- apt install -qq -y g++-7
- update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 60 --slave /usr/bin/g++ g++ /usr/bin/g++-7
- update-alternatives --config gcc
# tool versions
- cmake --version
- g++ --version
script:
- mkdir -p cmake-build
- cd cmake-build
- cmake ..
- make -j $(nproc)
- cpack -G DEB -V
- cpack -G TGZ
# cache dependencies
cache:
key: deps
paths:
- cmake-build
- trainServer/dependencies/mxnet
- trainServer/dependencies/seasocks
- /root/.hunter
artifacts:
name: build_output
when: always
paths:
- build/
- cmake-build/
# run tests
test:
stage: test
dependencies:
- build
script:
- ./build/catflow-test
# put install packages in extra artifact
install-packages:
stage: install-packages
dependencies:
- build
script:
- ls
artifacts:
name: openhabai-install-package
paths:
- build/pack