summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2019-07-31 17:00:58 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2019-07-31 17:00:58 +0200
commitd087d778ffb62e2713cb848540bcc819470365bd (patch)
treed69692a274dd1c7d0672e6bb7155a0fc106f9d49 /.gitlab-ci.yml
parentc8bd2513ecba169cff44c09c8058c36987357b18 (diff)
parent3759ce55ba79b8d3b9d8ed247a252273ee7dade3 (diff)
Merge branch 'feature/upstream' into develop
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml125
1 files changed, 125 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000..f35992f
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,125 @@
+# .gitlab-ci.yml -- to test some source code build scenarios
+# Copyright (C) 2016-2019 Olaf Meeuwissen
+#
+# License: GPL-3.0+
+
+variables:
+ REGISTRY_HUB: "registry.gitlab.com/sane-project/ci-envs"
+ CONFIGURE_MINI: "--enable-silent-rules"
+ CONFIGURE_FULL: "--with-usb --enable-avahi --enable-pnm-backend"
+
+stages:
+ - prepare
+ - compile
+ - archive
+ - release
+
+prepare:
+ image: $REGISTRY_HUB:debian-stretch-mini
+ stage: prepare
+ script:
+ - git ls-files | xargs ./tools/style-check.sh
+ - ./autogen.sh
+ - ./tools/create-changelog.sh
+ - ./tools/update-upstreams.sh
+ - ./configure
+ - make dist
+ artifacts:
+ paths:
+ - sane-backends-*.tar.gz
+ expire_in: 1 day
+
+.compile_template: &compile_definition
+ stage: compile
+ script:
+ - mkdir build
+ - cd build
+ - tar xzf ../sane-backends-*.tar.gz --strip-components=1
+ - ./configure $CONFIGURE_OPTS
+ - make -j2 -k $MAKE_FLAGS
+
+compile:debian-9-mini:
+ image: $REGISTRY_HUB:debian-stretch-mini
+ variables:
+ CONFIGURE_OPTS: "$CONFIGURE_MINI"
+ MAKE_FLAGS: "CFLAGS=-Werror"
+ <<: *compile_definition
+
+compile:debian-9-full:
+ image: $REGISTRY_HUB:debian-stretch-full
+ variables:
+ CONFIGURE_OPTS: "$CONFIGURE_MINI $CONFIGURE_FULL"
+ MAKE_FLAGS: "CFLAGS=-Werror CXXFLAGS=-Werror"
+ <<: *compile_definition
+ after_script:
+ - make -C build/doc html-pages
+ - rm -rf lists && mkdir lists && mv build/doc/*.html lists/
+ - cd build/doc && doxygen doxygen-sanei.conf && mv sanei-html ../../doc
+ artifacts:
+ paths:
+ - sane-backends-*.tar.gz
+ - lists
+ - doc/sanei-html
+ expire_in: 1 day
+
+compile:debian-10-mini:
+ image: $REGISTRY_HUB:debian-buster-mini
+ variables:
+ CONFIGURE_OPTS: "$CONFIGURE_MINI"
+ #MAKE_FLAGS: "CFLAGS=-Werror"
+ <<: *compile_definition
+
+compile:debian-10-full:
+ image: $REGISTRY_HUB:debian-buster-full
+ variables:
+ CONFIGURE_OPTS: "$CONFIGURE_MINI $CONFIGURE_FULL"
+ #MAKE_FLAGS: "CFLAGS=-Werror"
+ <<: *compile_definition
+
+compile:fedora-29-clang:
+ image: $REGISTRY_HUB:fedora-29-clang
+ variables:
+ CONFIGURE_OPTS: "$CONFIGURE_MINI $CONFIGURE_FULL"
+ <<: *compile_definition
+
+compile:fedora-30-clang:
+ image: $REGISTRY_HUB:fedora-30-clang
+ variables:
+ CONFIGURE_OPTS: "$CONFIGURE_MINI $CONFIGURE_FULL"
+ <<: *compile_definition
+
+compile:alpine-3.10-musl:
+ image: $REGISTRY_HUB:alpine-3.10-musl
+ variables:
+ CONFIGURE_OPTS: "$CONFIGURE_MINI $CONFIGURE_FULL"
+ <<: *compile_definition
+
+archive:
+ image: $REGISTRY_HUB:debian-stretch-full
+ stage: archive
+ dependencies:
+ - compile:debian-9-full
+ script:
+ - tar xzf sane-backends-*.tar.gz --strip-components=1
+ - rm sane-backends-*.tar.gz
+ - ./configure
+ - make distcheck
+ artifacts:
+ paths:
+ - sane-backends-*.tar.gz
+ - lists
+ - doc/sanei-html
+
+release:
+ image: alpine
+ stage: release
+ before_script:
+ - apk --no-cache add curl git jq
+ script:
+ - ./tools/create-release.sh
+ only:
+ - tags
+ when: manual
+ variables:
+ GIT_DEPTH: "3"
+ allow_failure: false