From f373d87ba7ca7b2011fe26ea81544daebfdf66fb Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Fri, 2 Jun 2017 06:42:35 -0400 Subject: [PATCH] Hand merge of MR !31: Update the CI infrastructure to be faster --- .gitignore | 3 ++- .gitlab-ci.yml | 43 +++++++++++++++++++++++++++++++++++++------ Makefile | 4 ++-- 3 files changed, 41 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index f44d6ac..560d869 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,5 @@ advent compile database.h database.c - +advent.6 +advent.html diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 13ad35d..13004d5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,10 +1,15 @@ -image: gcc +image: alpine -# build using Makefile -build: +stages: + - build + - test + +# build advent itself +binary: stage: build - before_script: - - apt update && apt -y install make + before_script: + - apk update + - apk add make gcc musl-dev script: - make advent artifacts: @@ -15,8 +20,34 @@ build: paths: - "*.o" +manpage: + stage: build + before_script: + - apk update + - apk add make asciidoc + script: + - make .asc.6 + artifacts: + paths: + - advent.6 + +html: + stage: build + before_script: + - apk update + - apk add make asciidoc libxslt + script: + - make .asc.html + artifacts: + paths: + - advent.html + # run tests using the binary built before test: stage: test + before_script: + - apk update + - apk add make script: - - make check + - cd tests + - make diff --git a/Makefile b/Makefile index 9fa8a67..23cd7f9 100644 --- a/Makefile +++ b/Makefile @@ -45,9 +45,9 @@ check: advent cd tests; $(MAKE) --quiet # Requires asciidoc and xsltproc/docbook stylesheets. -.asc.6: +.asc.6: advent.txt a2x --doctype manpage --format manpage $< -.asc.html: +.asc.html: advent.txt a2x --doctype manpage --format xhtml -D . $< rm -f docbook-xsl.css -- 2.31.1