Skip to content
Snippets Groups Projects
Commit a0e1aa3b authored by Jan Trávníček's avatar Jan Trávníček
Browse files

Merge branch 'gitlab-ci' into 'master'

Set up GitLab CI

This merge request is now ready. Build with gcc and clang works, all tests pass except tests.aconversion.sh (see #83). The last complete build is [pipelines/917](https://gitlab.fit.cvut.cz/travnja3/automata-library/pipelines/917).

Jobs may sometimes fail due to not enough space on disk, I’m gonna fix this problem soon.

See merge request !25
parents 2a3c7fb8 2d2eb98e
No related branches found
No related tags found
1 merge request!25Set up GitLab CI
Pipeline #
# NOTE #1: Our GitLab CI runs jobs inside Alpine Linux container by default.
#
# NOTE #2: Keep in mind that each job (e.g. test-gcc) is executed in a separate
# isolated environment (it may be even on different machine). There are no
# files implicitly passed between jobs or stages, only artifacts and maybe
# cache (depends on configuration).
before_script:
- case "$CI_BUILD_NAME" in
*-clang) export CXX=clang++ EXTRA_PKGS="$EXTRA_PKGS clang";;
*) export CXX=g++;;
esac
- export JOBS=$(grep -c processor /proc/cpuinfo)
# XXX: Remove after Alpine v3.6 is released and rename tclap-dev@edge to tclap-dev.
- echo '@edge http://repository.fit.cvut.cz/mirrors/alpine/edge/community' >> /etc/apk/repositories
- apk add --no-cache build-base bash libexecinfo-dev
cppunit-dev libxml2-dev tclap-dev@edge $EXTRA_PKGS
#========== Stage build ==========
.build: &build
script:
- make build-release
artifacts:
paths:
- bin-release/
expire_in: 6 hours
stage: build
build-gcc:
<<: *build
build-clang:
<<: *build
build-doc:
variables:
EXTRA_PKGS: doxygen graphviz
script:
- make doc
allow_failure: true
artifacts:
name: docs
paths:
- alib2std/doc/
- alib2data/doc/
- alib2common/doc/
- alib2str/doc/
- alib2raw/doc/
- alib2algo/doc/
- alib2elgo/doc/
- alib2measurepp/doc/
expire_in: 1 week
stage: build
#========== Stage test ==========
.test: &test
variables:
# coreutils are needed because of timeout command used in tests.
EXTRA_PKGS: bc coreutils python3
script:
- make test-release
stage: test
test-gcc:
<<: *test
dependencies:
- build-gcc
test-clang:
<<: *test
dependencies:
- build-clang
......@@ -89,9 +89,9 @@ SUBDIRS_WITH_MAKE = $(dir $(wildcard */makefile))
all:
@echo "What to do master?"
 
debug: test-debug
debug: | build-test-debug test-debug
 
release: test-release
release: | build-test-release test-release
 
build-debug build-test-debug:
for dir in $(SUBDIRS_LIBS); do \
......@@ -143,12 +143,12 @@ build-release build-test-release:
cp translateAddresses $(addsuffix -release, $(BINFOLDER)); \
cp xmlFormat $(addsuffix -release, $(BINFOLDER))
 
test-debug: build-test-debug
test-debug:
for test in $(wildcard tests.*.sh); do \
./$$test debug $(JOBS); \
done
 
test-release: build-test-release
test-release:
for test in $(wildcard tests.*.sh); do \
./$$test release $(JOBS); \
done
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment