Hand merge of MR !31: Update the CI infrastructure to be faster
authorEric S. Raymond <esr@thyrsus.com>
Fri, 2 Jun 2017 10:42:35 +0000 (06:42 -0400)
committerEric S. Raymond <esr@thyrsus.com>
Fri, 2 Jun 2017 10:42:35 +0000 (06:42 -0400)
.gitignore
.gitlab-ci.yml
Makefile

index f44d6ac180a023dc5cc82393780701d457400c09..560d8697b7a223c75546fa3e937ae94beb02c6e8 100644 (file)
@@ -3,4 +3,5 @@ advent
 compile
 database.h
 database.c
-
+advent.6
+advent.html
index 13ad35d040fb2e7e60de55523ff1cb09ff00fd9d..13004d5f0bb7a24f76b44ccddbb7b25c1187d10a 100644 (file)
@@ -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
index 9fa8a67e28d29da242364eaa548e1fa24e893b8f..23cd7f9dc749be6bbb53eba1ade06e9a3fff154f 100644 (file)
--- 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