-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
82 lines (75 loc) · 2.64 KB
/
.gitlab-ci.yml
File metadata and controls
82 lines (75 loc) · 2.64 KB
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
before_script:
# setup private key to access nniemann/debian-pkgs
- which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )
- eval $(ssh-agent -s)
- echo "$DEPLOY_PRIVATE_KEY" | tr -d '\r' | ssh-add -
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- ssh-keyscan git.ni.dfki.de >> ~/.ssh/known_hosts
- git config --global user.email "gitlab-ci@git.ni.dfki.de"
- git config --global user.name "gitlab-CI/CD"
# clone nniemann/debian-pkgs. These are debian files for pegmatite, rete, sempr
- git clone git@git.ni.dfki.de:nniemann/debian-pkgs.git /tmp/debian-pkgs
# setup and install of rete will be done in the build phase, as it is
# distro-specific (bionic / xenial)
# install dependencies
- export DEBIAN_FRONTEND=noninteractive #workaround to skip stdin interaction of keyboard-configuration pacakge
- apt update -qq
- apt install -y -qq git g++ cmake
- apt install -y -qq libcereal-dev
- apt install -y -qq libgeos-dev libgeos++-dev
- apt install -y -qq libgeographic-dev libeigen3-dev
- apt install -y -qq libboost-all-dev
- apt install -y -qq libzmqpp-dev libzmq3-dev
- apt install -y -qq qtbase5-dev qtdeclarative5-dev qtlocation5-dev qtpositioning5-dev qtquickcontrols2-5-dev
- apt install -y -qq libgraphviz-dev
stages:
- build
- deploy
build-bionic:
stage: build
image: buildpack-deps:bionic
script:
# get and install sempr
- echo "deb [trusted=yes] file:/tmp/debian-pkgs/bionic ./" >> /etc/apt/sources.list
- apt update -qq
- apt install -y -qq sempr
# build sempr
- mkdir build_bionic && cd build_bionic
- cmake ..
- make -j8
- make package
artifacts:
paths:
- build_bionic
expire_in: 1 hour
build-focal:
stage: build
image: buildpack-deps:focal
script:
# get and install sempr
- echo "deb [trusted=yes] file:/tmp/debian-pkgs/focal ./" >> /etc/apt/sources.list
- apt update -qq
- apt install -y -qq sempr
# build sempr
- mkdir build_focal && cd build_focal
- cmake ..
- make -j8
- make package
artifacts:
paths:
- build_focal
expire_in: 1 hour
deploy-deb:
stage: deploy
image: buildpack-deps:bionic
only:
- tags
script:
- cp build_bionic/sempr*.deb /tmp/debian-pkgs/bionic/
- cp build_focal/sempr*.deb /tmp/debian-pkgs/focal/
- cd /tmp/debian-pkgs
- ./update-pkg-list
- git add --all
- git commit -m "auto deployment of sempr-gui $CI_COMMIT_REF_NAME"
- git push