From: Pieter Lexis Date: Tue, 21 May 2019 10:39:37 +0000 (+0200) Subject: build docs in circleci X-Git-Tag: dnsdist-1.4.0-rc1~145^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bc728a5563802dd2f19957d049f475c5f1c3f862;p=thirdparty%2Fpdns.git build docs in circleci --- diff --git a/.circleci/config.yml b/.circleci/config.yml index aee0e8c423..9d2161fc23 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -265,6 +265,128 @@ commands: - ccache-cache-{{ arch }}-<< parameters.product >>-{{ .Branch }} - ccache-cache-{{ arch }}-<< parameters.product >>- + install-doc-deps: + description: Install dependencies needed to build the documentation + steps: + - run: + name: Install dependencies + command: | + apt-get update && apt-get -qq -y install \ + autoconf \ + automake \ + bison \ + curl \ + flex \ + g++ \ + git \ + latexmk \ + libboost-all-dev \ + libedit-dev \ + libluajit-5.1-dev \ + libssl-dev \ + make \ + pkg-config \ + ragel \ + virtualenv + if [ "${CIRCLE_PROJECT_USERNAME}" = "PowerDNS" -a "${CIRCLE_PROJECT_REPONAME}" = "pdns" -a "${CIRCLE_BRANCH}" = "master" ]; then + apt-get update && apt-get -qq -y install \ + texlive-full + fi + + build-auth-docs: + description: Build documentation + steps: + - run: + name: autoconf + command: | + BUILDER_VERSION=0.0.0-git1 autoreconf -vfi + - run: + name: configure + command: | + ./configure \ + --disable-lua-records \ + --disable-unit-tests \ + --without-dynmodules \ + --without-modules + - run: + name: build docs + command: | + make -C docs html-docs + if [ "${CIRCLE_PROJECT_USERNAME}" = "PowerDNS" -a "${CIRCLE_PROJECT_REPONAME}" = "pdns" -a "${CIRCLE_BRANCH}" = "master" ]; then + make -C docs all-docs + fi + - run: + name: Upload documents + command: | + if [ "${CIRCLE_PROJECT_USERNAME}" = "PowerDNS" -a "${CIRCLE_PROJECT_REPONAME}" = "pdns" -a "${CIRCLE_BRANCH}" = "master" ]; then + rsync -crv --delete --no-p --chmod=g=rwX --exclude '*~' ./doc/html-docs/ doc_powerdns_com@web1.powerdns.com:/srv/www/doc.powerdns.com/authoritative/ + rsync -crv --no-p --chmod=g=rwX --exclude '*~' ./doc/html-docs.tar.bz2 doc_powerdns_com@web1.powerdns.com:/srv/www/doc.powerdns.com/authoritative/ + rsync -crv --no-p --chmod=g=rwX --exclude '*~' ./doc/PowerDNS-Authoritative.pdf doc_powerdns_com@web1.powerdns.com:/srv/www/doc.powerdns.com/authoritative/ + fi + + build-recursor-docs: + description: Build Recursor documentation + steps: + - run: + name: autoconf + command: | + BUILDER_VERSION=0.0.0-git1 autoreconf -vfi + working_directory: ~/project/pdns/recursordist + - run: + name: configure + command: | + ./configure \ + --disable-unit-tests \ + --disable-protobuf + working_directory: ~/project/pdns/recursordist + - run: + name: build docs + command: | + make html-docs + if [ "${CIRCLE_PROJECT_USERNAME}" = "PowerDNS" -a "${CIRCLE_PROJECT_REPONAME}" = "pdns" -a "${CIRCLE_BRANCH}" = "master" ]; then + make all-docs + fi + working_directory: ~/project/pdns/recursordist + - run: + name: Upload documents + working_directory: ~/project/pdns/recursordist + command: | + if [ "${CIRCLE_PROJECT_USERNAME}" = "PowerDNS" -a "${CIRCLE_PROJECT_REPONAME}" = "pdns" -a "${CIRCLE_BRANCH}" = "master" ]; then + rsync -crv --delete --no-p --chmod=g=rwX --exclude '*~' html-docs/ doc_powerdns_com@web1.powerdns.com:/srv/www/doc.powerdns.com/recursor/ + rsync -crv --no-p --chmod=g=rwX --exclude '*~' html-docs.tar.bz2 doc_powerdns_com@web1.powerdns.com:/srv/www/doc.powerdns.com/recursor/ + rsync -crv --no-p --chmod=g=rwX --exclude '*~' PowerDNS-Recursor.pdf doc_powerdns_com@web1.powerdns.com:/srv/www/doc.powerdns.com/recursor/ + fi + + build-dnsdist-docs: + description: Build dnsdist documentation + steps: + - run: + name: autoconf + command: | + BUILDER_VERSION=0.0.0-git1 autoreconf -vfi + working_directory: ~/project/pdns/dnsdistdist + - run: + name: configure + command: | + ./configure \ + --disable-unit-tests \ + --disable-protobuf + working_directory: ~/project/pdns/dnsdistdist + - run: + name: build docs + command: | + make html-docs + working_directory: ~/project/pdns/dnsdistdist + - run: + name: Upload documents + working_directory: ~/project/pdns/dnsdistdist + command: | + if [ "${CIRCLE_PROJECT_USERNAME}" = "PowerDNS" -a "${CIRCLE_PROJECT_REPONAME}" = "pdns" -a "${CIRCLE_BRANCH}" = "master" ]; then + rsync -crv --delete --no-p --chmod=g=rwX --exclude '*~' html-docs/ dnsdist_org@web1.powerdns.com:/srv/www/dnsdist.org + rsync -crv --no-p --chmod=g=rwX --exclude '*~' html-docs.tar.bz2 dnsdist_org@web1.powerdns.com:/srv/www/dnsdist.org + rsync -crv --no-p --chmod=g=rwX --exclude '*~' dnsdist.pdf dnsdist_org@web1.powerdns.com:/srv/www/dnsdist.org + fi + jobs: build-auth: docker: @@ -723,6 +845,30 @@ jobs: PDNSRECURSOR="/opt/pdns-recursor/sbin/pdns_recursor" \ ./runtests recursor + build-auth-docs: + docker: + - image: debian:stretch + steps: + - checkout-shallow + - install-doc-deps + - build-auth-docs + + build-recursor-docs: + docker: + - image: debian:stretch + steps: + - checkout-shallow + - install-doc-deps + - build-recursor-docs + + build-dnsdist-docs: + docker: + - image: debian:stretch + steps: + - checkout-shallow + - install-doc-deps + - build-dnsdist-docs + workflows: version: 2 build-and-test-all: @@ -774,3 +920,9 @@ workflows: - test-recursor-api: requires: - build-recursor + + build-docs: + jobs: + - build-auth-docs + - build-recursor-docs + - build-dnsdist-docs