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

106 wiersze
2.5 KiB
YAML

# .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
prepare:
image: $REGISTRY_HUB:debian-9-base
stage: prepare
script:
- find -path ./.git -prune -o -type f | xargs tools/style-check.sh
- sed -i '/^AC_INIT/s/,.*/,m4_esyscmd_s([git describe --dirty]),/' configure.ac
- autoconf --force
artifacts:
paths:
- configure
expire_in: 1 day
.compile_template: &compile_definition
stage: compile
script:
- ./configure $CONFIGURE_OPTS
- make -j2 -k $MAKE_FLAGS
compile:debian-8-mini:
image: $REGISTRY_HUB:debian-8-mini
variables:
CONFIGURE_OPTS: "$CONFIGURE_MINI"
MAKE_FLAGS: "CFLAGS=-Werror"
<<: *compile_definition
compile:debian-8-full:
image: $REGISTRY_HUB:debian-8-full
variables:
CONFIGURE_OPTS: "$CONFIGURE_MINI $CONFIGURE_FULL"
MAKE_FLAGS: "CFLAGS=-Werror"
<<: *compile_definition
compile:debian-9-mini:
image: $REGISTRY_HUB:debian-9-mini
variables:
CONFIGURE_OPTS: "$CONFIGURE_MINI"
MAKE_FLAGS: "CFLAGS=-Werror"
<<: *compile_definition
compile:debian-9-full:
image: $REGISTRY_HUB:debian-9-full
variables:
CONFIGURE_OPTS: "$CONFIGURE_MINI $CONFIGURE_FULL"
MAKE_FLAGS: "CFLAGS=-Werror"
<<: *compile_definition
after_script:
- make -C doc html-pages
- rm -rf lists && mkdir lists && mv doc/*.html lists/
- cd doc && doxygen doxygen-sanei.conf
cache:
untracked: true
artifacts:
paths:
- configure
- lists
- doc/sanei-html
expire_in: 1 day
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.9-musl:
image: $REGISTRY_HUB:alpine-3.9-musl
variables:
CONFIGURE_OPTS: "$CONFIGURE_MINI $CONFIGURE_FULL"
<<: *compile_definition
archive:
stage: archive
image: $REGISTRY_HUB:debian-9-full
dependencies:
- compile:debian-9-full
before_script:
- ./config.status --quiet || ./configure "$CONFIGURE_MINI"
script:
- make dist
artifacts:
paths:
- sane-backends-*.tar.gz
- lists
- doc/sanei-html