-
Notifications
You must be signed in to change notification settings - Fork 13
/
.gitlab-ci.yml
58 lines (52 loc) · 1.61 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
stages:
- prepare
- build
- test
variables:
DOCKER_FILE: Dockerfile
DOCKER_TAG: latest
DOCKER_IMAGE: ${CI_REGISTRY_IMAGE}
GIT_SUBMODULE_STRATEGY: normal
FF_GITLAB_REGISTRY_HELPER_IMAGE: 1
.prepare:docker: &prepare_docker
stage: prepare
image:
name: docker
before_script:
- docker version
- docker login --username "${CI_REGISTRY_USER}" --password "${CI_REGISTRY_PASSWORD}" "${CI_REGISTRY}"
script:
- docker build -f ${DOCKER_FILE} -t ${DOCKER_IMAGE}:${DOCKER_TAG} .
- docker push ${DOCKER_IMAGE}:${DOCKER_TAG}
tags:
- docker
prepare:docker:
<<: *prepare_docker
# Stage: build
##############################################################################
build:
stage: build
script:
- mkdir -p build
- cd build
- cmake -DTOOLCHAIN_BIN_DIR=/opt/hermit/bin -DCMAKE_INSTALL_PREFIX=/opt/hermit ..
- make
image: ${CI_REGISTRY_IMAGE}
artifacts:
paths:
- ./build
# Stage: test
##############################################################################
test:
stage: test
script:
- cd build
- export TDIR=./local_prefix/opt/hermit/x86_64-hermit/extra
- export FILES="$TDIR/tests/hello $TDIR/tests/hellof $TDIR/tests/hello++ $TDIR/tests/jacobi $TDIR/tests/thr_hello" #$TDIR/benchmarks/stream" #$TDIR/tests/test-malloc $TDIR/tests/test-malloc-mt"
- for f in $FILES; do echo "check $f..."; timeout --kill-after=5m 5m uhyve -v -c 1 -m 128M $f || exit 1; done
- for f in $FILES; do echo "check $f..."; timeout --kill-after=5m 5m uhyve -v -c 2 -m 128M $f || exit 1; done
image: ${CI_REGISTRY_IMAGE}
dependencies:
- build
tags:
- privileged