-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
.gitlab-ci.yml
49 lines (42 loc) · 1.46 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
image: gcc
variables:
POSTGRES_DB: ___vrp___test___
POSTGRES_USER: root
POSTGRES_PASSWORD: "runner"
PGIS_VER: 3
before_script:
- apt-get update -yqq
- apt-get install -y cmake sudo lsb-release
# access the postgres repository
- curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
- sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
- apt-get update -yqq
- pgver="12"
- apt-get install -yqq libboost-graph-dev libtap-parser-sourcehandler-pgtap-perl
postgresql-${pgver}
postgresql-client-${pgver}
postgresql-${pgver}-pgtap
postgresql-${pgver}-postgis-${PGIS_VER}
postgresql-${pgver}-postgis-${PGIS_VER}-scripts
postgresql-${pgver}-pgrouting
postgresql-server-dev-${pgver}
- pg_ctlcluster "${pgver}" main start
- sudo -u postgres psql -d template1 -c "CREATE USER root WITH PASSWORD 'runner' CREATEDB SUPERUSER;"
- pgver=$(psql --version | grep -Po '(?<=psql \(PostgreSQL\) )[^;]+(?=\.\d* \()')
- echo "pgver=${pgver}"
build_vrprouting:
stage: build
script:
- psql --version
- psql -c "select version()" template1
- mkdir build
- cd build
- cmake -DCMAKE_BUILD_TYPE=Debug ..
- make -j 4
- sudo make install
- cd ../tools/testers
- tar -xf matrix_new_values.tar.gz
- ls
- cd ../..
- tools/testers/doc_queries_generator.pl
- bash ./tools/testers/pg_prove_tests.sh root 5432