/
.gitlab-ci.yml
107 lines (101 loc) · 2.55 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
image: registry.gitlab.com/seltzer/kioku-srs/linux:latest
stages:
- submodules
- deps
- build
- docs
build_image:
image: docker:git
stage: build
services:
- docker:dind
script:
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN registry.gitlab.com
- echo "Building linux image"
- cd $CI_PROJECT_DIR/docker/linux
- docker build -t registry.gitlab.com/seltzer/kioku-srs/linux .
- docker push registry.gitlab.com/seltzer/kioku-srs/linux:latest
- echo "Building doxygen image"
- cd $CI_PROJECT_DIR/docker/doxygen
- docker build -t registry.gitlab.com/seltzer/kioku-srs/doxygen .
- docker push registry.gitlab.com/seltzer/kioku-srs/doxygen:latest
# todo run tests
# docker run registry.gitlab.com/seltzer/kioku-srs/build /script/to/run/tests
# Don't build this unless we've got it on the docker branch - this is just to prevent it from building every time on master.
only:
- docker
submodules-deps:
stage: submodules
script:
- rm -rf .git/modules extern/*
- git submodule update --init extern/libgit2
- git submodule update --init extern/libssh2
only:
- master
artifacts:
paths:
- extern/libssh2
- extern/libgit2
submodules-build:
stage: submodules
script:
- rm -rf .git/modules extern/*
- git submodule update --init extern/mongoose
- git submodule update --init extern/greatest
- git submodule update --init extern/generic-c-hashmap
- git submodule update --init extern/utf8.h
- git submodule update --init extern/parson
- git submodule update --init extern/tinydir
- git submodule update --init extern/lua
only:
- master
artifacts:
paths:
- extern/mongoose
- extern/greatest
- extern/parson
- extern/lua
- extern/generic-c-hashmap
- extern/tinydir
- extern/utf8.h
deps-gcc:
stage: deps
dependencies:
- submodules-deps
script:
- export clean_first=no
- export build_shared=ON
- ci/linux/build-deps.sh
- export build_shared=OFF
- ci/linux/build-deps.sh
only:
- master
artifacts:
paths:
- extern/install
build-gcc:
stage: build
dependencies:
- deps-gcc
- submodules-build
script:
- export build_shared=ON
- ci/linux/build.sh
- export build_shared=OFF
- ci/linux/build.sh
# todo: Do both 64 & 32 bit builds
only:
- master
artifacts:
paths:
- build
docs:
stage: docs
image: registry.gitlab.com/seltzer/kioku-srs/doxygen:latest
script:
- doxygen
artifacts:
paths:
- doc
only:
- master