build: consolidating gitlab ci/cd configuration script
+# base configuration
image: gcc
+stages: [build, test]
-stages:
- - build
- - test
-
+# build from scratch
compile:
stage: build
script:
- ./bootstrap.sh
- ./configure
- make -j4
- artifacts:
- paths:
- - makefile
- - configure
- - config.h
- - libliquid*
- - src/*/src/*.o
+ artifacts: # save output objects for test stages
+ paths: [makefile, configure, config.h, libliquid*, src/*/src/*.o]
+# run all test programs
check:
stage: test
script:
- make -j4 check
artifacts:
- paths:
- - autotest.json
- expire_in: 1 month
+ paths: [autotest.json]
+# compile and run benchmark program
bench:
stage: test
script:
- make -j4 bench
artifacts:
- paths:
- - benchmark.json
- expire_in: 1 month
+ paths: [benchmark.json]
+# compile and run all example programs
examples:
stage: test
script:
@@ -43,7 +36,5 @@ examples:
- ls examples/*_example | sed "s#examples#./examples#g" > run_examples.sh
- /bin/sh run_examples.sh
artifacts:
- paths:
- - run_examples.sh
- expire_in: 1 month
+ paths: [run_examples.sh]
