sane-project-backends/.gitlab-ci.yml

136 wiersze
3.2 KiB
YAML
Czysty Zwykły widok Historia

# .gitlab-ci.yml -- to test some source code build scenarios
2019-02-02 01:38:35 +00:00
# Copyright (C) 2016-2019 Olaf Meeuwissen
#
# 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"
stages:
- tarball
- compile
- snapshot
2019-07-30 13:40:11 +00:00
- release
# 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.
make-dist:
image: $REGISTRY_HUB:debian-buster-mini
stage: tarball
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
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.
.compile_template: &compile_definition
2019-08-11 03:49:19 +00:00
variables:
GIT_DEPTH: "0"
stage: compile
script:
- mkdir build
- cd build
- tar xzf ../sane-backends-*.tar.gz --strip-components=1
- ./configure $CONFIGURE_OPTS
- make -j2 -k $MAKE_FLAGS
debian-9-mini:
image: $REGISTRY_HUB:debian-stretch-mini
variables:
CONFIGURE_OPTS: "$CONFIGURE_MINI"
MAKE_FLAGS: "CFLAGS=-Werror"
<<: *compile_definition
debian-9-full:
image: $REGISTRY_HUB:debian-stretch-full
variables:
CONFIGURE_OPTS: "$CONFIGURE_MINI $CONFIGURE_FULL"
MAKE_FLAGS: "CFLAGS=-Werror CXXFLAGS=-Werror"
<<: *compile_definition
debian-10-mini:
image: $REGISTRY_HUB:debian-buster-mini
variables:
CONFIGURE_OPTS: "$CONFIGURE_MINI"
#MAKE_FLAGS: "CFLAGS=-Werror"
<<: *compile_definition
debian-10-full:
image: $REGISTRY_HUB:debian-buster-full
variables:
CONFIGURE_OPTS: "$CONFIGURE_MINI $CONFIGURE_FULL"
#MAKE_FLAGS: "CFLAGS=-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
fedora-29-clang:
image: $REGISTRY_HUB:fedora-29-clang
2017-07-15 08:19:38 +00:00
variables:
CONFIGURE_OPTS: "$CONFIGURE_MINI $CONFIGURE_FULL"
<<: *compile_definition
fedora-30-clang:
image: $REGISTRY_HUB:fedora-30-clang
variables:
CONFIGURE_OPTS: "$CONFIGURE_MINI $CONFIGURE_FULL"
<<: *compile_definition
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
make-distcheck:
image: $REGISTRY_HUB:debian-buster-full
stage: snapshot
dependencies:
- debian-10-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
2019-07-30 13:40:11 +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