2016-06-12 11:32:30 +00:00
|
|
|
# .gitlab-ci.yml -- to test some source code build scenarios
|
2019-02-02 01:38:35 +00:00
|
|
|
# Copyright (C) 2016-2019 Olaf Meeuwissen
|
2016-06-12 11:32:30 +00:00
|
|
|
#
|
|
|
|
# License: GPL-3.0+
|
|
|
|
|
|
|
|
variables:
|
|
|
|
REGISTRY_HUB: "registry.gitlab.com/sane-project/ci-envs"
|
2016-07-09 06:10:00 +00:00
|
|
|
CONFIGURE_MINI: "--enable-silent-rules"
|
|
|
|
CONFIGURE_FULL: "--with-usb --enable-avahi --enable-pnm-backend"
|
2016-06-12 11:32:30 +00:00
|
|
|
|
2017-06-02 12:08:44 +00:00
|
|
|
stages:
|
2019-08-06 12:42:08 +00:00
|
|
|
- tarball
|
2017-06-17 03:38:21 +00:00
|
|
|
- compile
|
2019-08-06 12:42:08 +00:00
|
|
|
- snapshot
|
2019-07-30 13:40:11 +00:00
|
|
|
- release
|
2017-06-02 12:08:44 +00:00
|
|
|
|
2019-08-11 03:08:50 +00:00
|
|
|
# This job creates the source tarball that is the *sole* input to our
|
|
|
|
# compile stage. The job is meant to be run on the stable release of
|
|
|
|
# Debian GNU/Linux.
|
|
|
|
|
2019-08-06 12:42:08 +00:00
|
|
|
make-dist:
|
2019-08-11 03:08:50 +00:00
|
|
|
image: $REGISTRY_HUB:debian-buster-mini
|
2019-08-06 12:42:08 +00:00
|
|
|
stage: tarball
|
2017-06-02 12:08:44 +00:00
|
|
|
script:
|
2019-06-29 08:08:52 +00:00
|
|
|
- git ls-files | xargs ./tools/style-check.sh
|
2019-06-05 14:34:56 +00:00
|
|
|
- ./autogen.sh
|
2019-06-29 06:57:04 +00:00
|
|
|
- ./tools/create-changelog.sh
|
2019-06-29 08:29:15 +00:00
|
|
|
- ./tools/update-upstreams.sh
|
2019-06-05 14:34:56 +00:00
|
|
|
- ./configure
|
|
|
|
- make dist
|
2017-06-17 03:38:21 +00:00
|
|
|
artifacts:
|
|
|
|
paths:
|
2019-06-05 14:34:56 +00:00
|
|
|
- sane-backends-*.tar.gz
|
2017-06-17 03:38:21 +00:00
|
|
|
expire_in: 1 day
|
2017-06-02 12:08:44 +00:00
|
|
|
|
2019-08-11 03:49:19 +00:00
|
|
|
# This template is used for all jobs in the compile stage. As the
|
|
|
|
# template solely relies on the source tarball there is no need to
|
|
|
|
# checkout the git repository.
|
|
|
|
|
2017-06-17 03:38:21 +00:00
|
|
|
.compile_template: &compile_definition
|
2019-08-11 03:49:19 +00:00
|
|
|
variables:
|
|
|
|
GIT_DEPTH: "0"
|
2017-06-17 03:38:21 +00:00
|
|
|
stage: compile
|
2016-06-12 11:32:30 +00:00
|
|
|
script:
|
2019-06-05 14:34:56 +00:00
|
|
|
- mkdir build
|
2019-06-06 11:37:08 +00:00
|
|
|
- cd build
|
2019-06-06 11:50:29 +00:00
|
|
|
- tar xzf ../sane-backends-*.tar.gz --strip-components=1
|
2019-06-06 11:37:08 +00:00
|
|
|
- ./configure $CONFIGURE_OPTS
|
|
|
|
- make -j2 -k $MAKE_FLAGS
|
2016-06-12 11:32:30 +00:00
|
|
|
|
2019-08-06 12:42:08 +00:00
|
|
|
debian-9-mini:
|
2019-07-14 05:03:56 +00:00
|
|
|
image: $REGISTRY_HUB:debian-stretch-mini
|
2017-06-22 11:36:59 +00:00
|
|
|
variables:
|
|
|
|
CONFIGURE_OPTS: "$CONFIGURE_MINI"
|
2019-05-22 12:48:32 +00:00
|
|
|
MAKE_FLAGS: "CFLAGS=-Werror"
|
2017-06-22 11:36:59 +00:00
|
|
|
<<: *compile_definition
|
|
|
|
|
2019-08-06 12:42:08 +00:00
|
|
|
debian-9-full:
|
2019-07-14 05:03:56 +00:00
|
|
|
image: $REGISTRY_HUB:debian-stretch-full
|
2017-06-22 11:36:59 +00:00
|
|
|
variables:
|
|
|
|
CONFIGURE_OPTS: "$CONFIGURE_MINI $CONFIGURE_FULL"
|
2019-05-22 12:48:32 +00:00
|
|
|
MAKE_FLAGS: "CFLAGS=-Werror CXXFLAGS=-Werror"
|
2017-06-22 11:36:59 +00:00
|
|
|
<<: *compile_definition
|
|
|
|
|
2019-08-06 12:42:08 +00:00
|
|
|
debian-10-mini:
|
2019-07-14 05:03:56 +00:00
|
|
|
image: $REGISTRY_HUB:debian-buster-mini
|
|
|
|
variables:
|
|
|
|
CONFIGURE_OPTS: "$CONFIGURE_MINI"
|
|
|
|
#MAKE_FLAGS: "CFLAGS=-Werror"
|
|
|
|
<<: *compile_definition
|
|
|
|
|
2019-08-06 12:42:08 +00:00
|
|
|
debian-10-full:
|
2019-07-14 05:03:56 +00:00
|
|
|
image: $REGISTRY_HUB:debian-buster-full
|
|
|
|
variables:
|
|
|
|
CONFIGURE_OPTS: "$CONFIGURE_MINI $CONFIGURE_FULL"
|
|
|
|
#MAKE_FLAGS: "CFLAGS=-Werror"
|
|
|
|
<<: *compile_definition
|
2019-08-11 03:52:03 +00:00
|
|
|
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
|
2019-07-14 05:03:56 +00:00
|
|
|
|
2019-08-06 12:42:08 +00:00
|
|
|
fedora-29-clang:
|
2019-05-04 00:19:26 +00:00
|
|
|
image: $REGISTRY_HUB:fedora-29-clang
|
2017-07-15 08:19:38 +00:00
|
|
|
variables:
|
|
|
|
CONFIGURE_OPTS: "$CONFIGURE_MINI $CONFIGURE_FULL"
|
|
|
|
<<: *compile_definition
|
|
|
|
|
2019-08-06 12:42:08 +00:00
|
|
|
fedora-30-clang:
|
2019-05-04 00:19:26 +00:00
|
|
|
image: $REGISTRY_HUB:fedora-30-clang
|
2018-03-15 00:04:31 +00:00
|
|
|
variables:
|
|
|
|
CONFIGURE_OPTS: "$CONFIGURE_MINI $CONFIGURE_FULL"
|
|
|
|
<<: *compile_definition
|
|
|
|
|
2019-08-06 12:42:08 +00:00
|
|
|
alpine-3.10-musl:
|
2019-06-20 11:02:15 +00:00
|
|
|
image: $REGISTRY_HUB:alpine-3.10-musl
|
2018-03-15 00:41:58 +00:00
|
|
|
variables:
|
|
|
|
CONFIGURE_OPTS: "$CONFIGURE_MINI $CONFIGURE_FULL"
|
|
|
|
<<: *compile_definition
|
|
|
|
|
2019-08-06 12:42:08 +00:00
|
|
|
make-distcheck:
|
2019-08-11 03:52:03 +00:00
|
|
|
image: $REGISTRY_HUB:debian-buster-full
|
2019-08-06 12:42:08 +00:00
|
|
|
stage: snapshot
|
2017-06-17 03:38:21 +00:00
|
|
|
dependencies:
|
2019-08-11 03:52:03 +00:00
|
|
|
- debian-10-full
|
2019-06-05 14:39:44 +00:00
|
|
|
script:
|
2019-07-03 13:19:52 +00:00
|
|
|
- tar xzf sane-backends-*.tar.gz --strip-components=1
|
|
|
|
- rm sane-backends-*.tar.gz
|
|
|
|
- ./configure
|
|
|
|
- make distcheck
|
2017-06-17 03:38:21 +00:00
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- sane-backends-*.tar.gz
|
2018-02-21 11:50:07 +00:00
|
|
|
- lists
|
2018-03-10 01:14:06 +00:00
|
|
|
- doc/sanei-html
|
2019-07-30 13:40:11 +00:00
|
|
|
|
2019-08-06 12:42:08 +00:00
|
|
|
upload:
|
2019-07-30 13:40:11 +00:00
|
|
|
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
|