# .gitlab-ci.yml -- to test some source code build scenarios # Copyright (C) 2016-2018 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-8-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 after_script: - make -C doc html-pages - mkdir lists && mv doc/*.html lists/ cache: untracked: true artifacts: paths: - configure - lists expire_in: 1 day compile:alpine-3.6-musl: image: $REGISTRY_HUB:alpine-3.6-musl variables: CONFIGURE_OPTS: "$CONFIGURE_MINI $CONFIGURE_FULL" <<: *compile_definition compile:fedora-25-clang: image: $REGISTRY_HUB:fedora-25-clang variables: CONFIGURE_OPTS: "$CONFIGURE_MINI $CONFIGURE_FULL" <<: *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 compile:fedora-26-clang: image: $REGISTRY_HUB:fedora-26-clang variables: CONFIGURE_OPTS: "$CONFIGURE_MINI $CONFIGURE_FULL" <<: *compile_definition archive: stage: archive image: $REGISTRY_HUB:debian-8-full dependencies: - compile:debian-8-full before_script: - ./config.status --quiet || ./configure "$CONFIGURE_MINI" script: - make dist artifacts: paths: - sane-backends-*.tar.gz - lists