variables: DEBIAN_FRONTEND: noninteractive LC_ALL: C.UTF-8 GIT_STRATEGY: fetch stages: - build - test - documentation - deploy .freebsd_i386: &freebsd_i386 tags: - freebsd - i386 only: - master - triggers - tags .freebsd_amd64: &freebsd_amd64 tags: - freebsd - amd64 only: - master - triggers - tags .dnf_build_depends: &dnf_build_depends before_script: - dnf -y upgrade - dnf -y install 'dnf-command(builddep)' -y - dnf -y install curl - curl -L http://pkgs.fedoraproject.org/cgit/rpms/knot.git/plain/knot.spec -o knot.spec - dnf -y builddep knot.spec - dnf -y install autoconf automake libtool pkgconfig .yum_build_depends: &yum_build_depends before_script: - yum -y upgrade - yum -y install epel-release - yum -y install curl - curl -L http://pkgs.fedoraproject.org/cgit/rpms/knot.git/plain/knot.spec -o knot.spec - yum-builddep knot.spec -y - yum -y install autoconf automake libtool pkgconfig .fedora_latest: &fedora_latest <<: *dnf_build_depends image: fedora:latest tags: - docker - linux - amd64 .centos_latest: ¢os_latest <<: *yum_build_depends image: centos:latest tags: - docker - linux - amd64 .deb_build_depends: &deb_build_depends before_script: - sed -i 's/deb\.debian\.org/ftp.cz.debian.org/g;s/archive\.ubuntu\.com/cz.archive.ubuntu.com/g' /etc/apt/sources.list - apt-get -y update - apt-get -y dist-upgrade - apt-get -y install build-essential - apt-get -y install ghostscript python-sphinx texinfo texlive texlive-font-utils texlive-generic-extra texlive-latex-extra - apt-get -y install autoconf automake libtool autotools-dev bash-completion bison flex libedit-dev libfstrm-dev libgnutls28-dev libidn2-0-dev liblmdb-dev libprotobuf-c-dev libsystemd-dev libsystemd-dev liburcu-dev pkg-config protobuf-c-compiler .debian_stable: &debian_stable <<: *deb_build_depends image: debian:stable-slim tags: - docker - linux - amd64 .ubuntu_latest: &ubuntu_latest <<: *deb_build_depends image: ubuntu:latest tags: - docker - linux - amd64 .build: &build_job stage: build script: - autoreconf -fi - ./configure --disable-fastparser - make -k all artifacts: untracked: true expire_in: '1 hour' .test: &test_job stage: test script: - make -k check build:fedora:amd64: <<: *fedora_latest <<: *build_job test:fedora:amd64: <<: *fedora_latest <<: *test_job dependencies: - build:fedora:amd64 build:centos:amd64: <<: *centos_latest <<: *build_job test:centos:amd64: <<: *centos_latest <<: *test_job dependencies: - build:centos:amd64 build:ubuntu:amd64: <<: *ubuntu_latest <<: *build_job test:ubuntu:amd64: <<: *ubuntu_latest <<: *test_job dependencies: - build:ubuntu:amd64 build:debian:amd64: <<: *debian_stable <<: *build_job test:debian:amd64: <<: *debian_stable <<: *test_job dependencies: - build:debian:amd64 build:freebsd:i386: <<: *freebsd_i386 <<: *build_job test:freebsd:i386: <<: *freebsd_i386 <<: *test_job dependencies: - build:freebsd:i386 build:freebsd:amd64: <<: *freebsd_amd64 <<: *build_job test:freebsd:amd64: <<: *freebsd_amd64 <<: *test_job dependencies: - build:freebsd:amd64 build:archive: <<: *debian_stable stage: build script: - autoreconf -fi - mkdir _build - cd _build - ../configure - make distcheck only: - tags - triggers artifacts: paths: - _build/*.tar.xz build:documentation: <<: *debian_stable stage: documentation only: - tags - triggers dependencies: - build:debian:amd64 script: - make -C doc html singlehtml pdf artifacts: paths: - doc/_build/html/ - doc/_build/singlehtml/ - doc/_build/latex/knot.pdf expire_in: '1 hour' deploy:documentation: <<: *debian_stable stage: deploy dependencies: - build:documentation only: - tags - triggers script: - "curl --http1.1 --request POST --form token=$WEBSITE_TOKEN --form ref=master --form \"variables[RELEASE_CI_BUILD_REF_NAME]=$CI_COMMIT_REF_NAME\" --form \"variables[RELEASE_CI_BUILD_ID]=$CI_JOB_ID\" https://gitlab.labs.nic.cz/api/v3/projects/5/trigger/builds" artifacts: name: "knot-dns-$CI_COMMIT_REF_NAME-doc" paths: - doc/_build/html/ - doc/_build/singlehtml/ - doc/_build/latex/knot.pdf