forked from Internet-of-People/iop-location-based-network
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
65 lines (58 loc) · 1.68 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
image: ubuntu:17.04
stages:
- build
- test
- deploy
.build_script: &build_script
script:
- cd generated
- ./regenerate.sh
- cd ..
- rm -rf build
- mkdir build
- cd build
- echo Generating makefiles
- cmake ..
- echo Compiling and installing from sources
- make
- make install
artifacts:
paths:
- build
build:gxx:
stage: build
before_script:
- apt-get update
- apt-get install -y g++ cmake protobuf-compiler libprotobuf-dev libspatialite-dev
<<: *build_script
build:clang:
stage: build
before_script:
- apt-get update
- apt-get install -y clang cmake protobuf-compiler libprotobuf-dev libspatialite-dev
<<: *build_script
test:all:
stage: test
before_script:
- apt-get update
- apt-get install -y libprotobuf-dev libspatialite-dev
script:
- cd build
- test/tests
dependencies:
- build:gxx
package:deb:
stage: deploy
before_script:
- apt-get update
- apt-get install -y g++ cmake protobuf-compiler libprotobuf-dev libspatialite-dev checkinstall
script:
- cp ./package/locnet/description-pak ./build
- cd build
- echo Creating amd64 deb binary
- checkinstall --install=no --fstrans=yes --nodoc --maintainer="Internet of People" --pkgsource="https://gitlab.com/iop-ventures/iop-location-based-network.git" --pkglicense=MIT --pkggroup=net --pkgname=iop-locnet --pkgversion=$CI_PIPELINE_ID --pkgarch=amd64 --type=debian --pkgrelease=ubuntu-1704 --requires="libprotobuf10,libspatialite7"
dependencies:
- build:gxx
artifacts:
paths:
- build/iop-locnet_$CI_PIPELINE_ID-ubuntu-1704_amd64.deb