Update the CI infrastructure to be faster, and to build the man and HTML.

This commit is contained in:
Jason S. Ninneman 2017-06-01 14:56:44 -07:00
parent 40ccd3d80d
commit 8b4fa2895c
3 changed files with 41 additions and 9 deletions

3
.gitignore vendored
View file

@ -3,4 +3,5 @@ advent
compile compile
database.h database.h
database.c database.c
advent.6
advent.html

View file

@ -1,10 +1,15 @@
image: gcc image: alpine
# build using Makefile stages:
build: - build
- test
# build advent itself
binary:
stage: build stage: build
before_script: before_script:
- apt update && apt -y install make - apk update
- apk add make gcc musl-dev
script: script:
- make advent - make advent
artifacts: artifacts:
@ -15,8 +20,34 @@ build:
paths: paths:
- "*.o" - "*.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 # run tests using the binary built before
test: test:
stage: test stage: test
before_script:
- apk update
- apk add make
script: script:
- make check - cd tests
- make

View file

@ -45,9 +45,9 @@ check: advent
cd tests; $(MAKE) --quiet cd tests; $(MAKE) --quiet
# Requires asciidoc and xsltproc/docbook stylesheets. # Requires asciidoc and xsltproc/docbook stylesheets.
.asc.6: .asc.6: advent.txt
a2x --doctype manpage --format manpage $< a2x --doctype manpage --format manpage $<
.asc.html: .asc.html: advent.txt
a2x --doctype manpage --format xhtml -D . $< a2x --doctype manpage --format xhtml -D . $<
rm -f docbook-xsl.css rm -f docbook-xsl.css