summaryrefslogtreecommitdiffstats
path: root/gitlab/gitlab-ci.yml
diff options
context:
space:
mode:
Diffstat (limited to 'gitlab/gitlab-ci.yml')
-rw-r--r--gitlab/gitlab-ci.yml56
1 files changed, 56 insertions, 0 deletions
diff --git a/gitlab/gitlab-ci.yml b/gitlab/gitlab-ci.yml
new file mode 100644
index 0000000..9cef947
--- /dev/null
+++ b/gitlab/gitlab-ci.yml
@@ -0,0 +1,56 @@
+# gitlab-ci.yml file for the Debian PostgreSQL packages
+# to be used in debian/gitlab-ci.yml:
+# include: https://salsa.debian.org/postgresql/postgresql-common/raw/master/gitlab/gitlab-ci.yml
+
+stages:
+ - build
+ - test
+
+.build: &build
+ stage: build
+ before_script:
+ # allow origtargz to use 'apt-get source'
+ - sed -e 's/^deb /deb-src /' /etc/apt/sources.list > /etc/apt/sources.list.d/src.list
+ - apt-get -q update
+ - apt-get -y --no-install-recommends install devscripts fakeroot liblwp-protocol-https-perl libwww-perl
+ - apt-get -y --no-install-recommends build-dep .
+ # create user for building
+ - useradd buildd
+ - chown -R buildd:buildd .
+ - chown buildd:buildd ..
+ script:
+ - su -c 'origtargz' buildd
+ - if [ -f debian/control.in ]; then su -c 'pg_buildext updatecontrol' buildd; fi
+ - su -c 'dpkg-buildpackage --no-sign -sa -rfakeroot' buildd
+ after_script:
+ - rm -rf deb && mkdir deb
+ - dcmd mv ../*.changes deb
+ artifacts:
+ paths: ['deb']
+
+build:testing: { <<: *build, image: 'debian:testing' }
+build:unstable: { <<: *build, image: 'debian:sid' }
+
+.lintian: &lintian
+ stage: test
+ before_script:
+ - apt-get -q update
+ - apt-get -y --no-install-recommends install lintian
+ script:
+ - lintian --info --display-info deb/*.changes 2>&1 | tee lintian.log
+ artifacts:
+ paths: ['lintian.log']
+
+lintian:testing: { <<: *lintian, dependencies: ['build:testing'], image: 'debian:testing' }
+lintian:unstable: { <<: *lintian, dependencies: ['build:unstable'], image: 'debian:sid' }
+
+.autopkgtest: &autopkgtest
+ stage: test
+ before_script:
+ - apt-get -q update
+ - apt-get -y --no-install-recommends install autopkgtest autodep8
+ script:
+ - autopkgtest deb/*.changes -- null
+
+autopkgtest:testing: { <<: *autopkgtest, dependencies: ['build:testing'], image: 'debian:testing' }
+autopkgtest:unstable: { <<: *autopkgtest, dependencies: ['build:unstable'], image: 'debian:sid' }