Skip to content

Commit c0c3c35

Browse files
committed
Merge branch 'ci-config' into 'PGPROEE9_6'
Make GitLab config green. Changes: - calculate CPU cores number on the fly - temporarily remove sanitize and test stages - switch from debian images to the latest ubuntu, because it doesn't require custom libztd package See merge request !4
2 parents b2b254f + dd49876 commit c0c3c35

File tree

1 file changed

+14
-52
lines changed

1 file changed

+14
-52
lines changed

.gitlab-ci.yml

Lines changed: 14 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,79 +1,41 @@
11
image: debian
22

33
stages:
4-
- sanitize
54
- build
65
- test
7-
- package
86

97
before_script:
108
- export DEBIAN_FRONTEND=noninteractive
9+
- export CORES=$(grep -c ^processor /proc/cpuinfo)
1110
- uname -a
1211
- df -h
1312

14-
build:debian-7:
13+
build:ubuntu-16.04:
1514
stage: build
16-
image: debian:7
15+
image: ubuntu:16.04
1716
only:
1817
- PGPROEE9_6
1918
before_script:
20-
- apt-get update && apt-get install -y gcc make flex bison libreadline-dev zlib1g-dev jade
19+
- apt-get update && apt-get install -y gcc make flex bison libreadline-dev zlib1g-dev jade libzstd0 libzstd-dev
2120
script:
2221
- ./configure
23-
- make -j 2
24-
- make install
25-
when: always
26-
27-
build:debian-8:
28-
stage: build
29-
image: debian:8
30-
only:
31-
- PGPROEE9_6
32-
before_script:
33-
- apt update && apt -y install gcc make flex bison libreadline-dev zlib1g-dev jade
34-
script:
35-
- ./configure
36-
- make -j 2
37-
- make install
38-
when: always
39-
40-
sanitize:clang:
41-
stage: sanitize
42-
only:
43-
- PGPROEE9_6
44-
before_script:
45-
- apt update && apt -y install clang libfindbin-libs-perl
46-
script:
47-
- scan-build ./configure
48-
- scan-build make -j 2
49-
when: always
50-
51-
sanitize:cppcheck:
52-
stage: sanitize
53-
only:
54-
- PGPROEE9_6
55-
before_script:
56-
- apt update && apt -y install cppcheck
57-
script:
58-
- cppcheck --enable=all --std=c11 --std=c++11 --std=posix --error-exitcode=1 -i $(find . -name "*.[c,cpp]")
22+
- make -j $CORES
23+
- apt-get install sudo
24+
- sudo make install
5925
when: always
6026

6127
test:
6228
stage: test
29+
image: ubuntu:16.04
6330
only:
6431
- PGPROEE9_6
6532
before_script:
66-
- apt update && apt -y install gcc make flex bison libreadline-dev zlib1g-dev jade
33+
- apt-get update && apt-get install -y gcc make flex bison libreadline-dev zlib1g-dev jade libzstd0 libzstd-dev
6734
script:
6835
- ./configure
69-
- make -j 2
70-
- make check
71-
when: always
72-
73-
package:
74-
stage: package
75-
only:
76-
- PGPROEE9_6
77-
script:
78-
- echo "Building deb package here"
36+
- make -j $CORES
37+
- apt-get install sudo
38+
- adduser --disabled-password --gecos '' postgres
39+
- echo '%postgres ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
40+
- su -m postgres -c make check
7941
when: always

0 commit comments

Comments
 (0)