This repository has been archived by the owner on Nov 24, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 44
/
.gitlab-ci.yml
63 lines (57 loc) · 1.81 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
59
60
61
62
63
variables:
IMAGE: ubuntu:with-hermitcore
GIT_SUBMODULE_STRATEGY: normal
stages:
- prepare
- build
- test
# Stage: prepare
##############################################################################
docker:
stage: prepare
script:
- docker build -t ${IMAGE} .
tags:
- shell
- linux
# 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: ${IMAGE}
tags:
- docker
artifacts:
untracked: true
expire_in: 1 week
paths:
- ./build
# Stage: test
##############################################################################
test:
stage: test
script:
- lscpu
- 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/thr_hello $TDIR/tests/pi $TDIR/benchmarks/stream $TDIR/benchmarks/basic $TDIR/tests/signals $TDIR/tests/test-malloc $TDIR/tests/test-malloc-mt $TDIR/tests/argv_envp"
- export PROXY=./local_prefix/opt/hermit/bin/proxy
- for f in $FILES; do echo "check $f..."; HERMIT_ISLE=qemu HERMIT_CPUS=1 HERMIT_KVM=0 HERMIT_VERBOSE=1 timeout --kill-after=5m 5m $PROXY $f || exit 1; done
- for f in $FILES; do echo "check $f..."; HERMIT_ISLE=qemu HERMIT_CPUS=2 HERMIT_KVM=0 HERMIT_VERBOSE=1 timeout --kill-after=5m 5m $PROXY $f || exit 1; done
- HERMIT_ISLE=qemu HERMIT_CPUS=1 HERMIT_KVM=0 HERMIT_VERBOSE=1 HERMIT_APP_PORT=8000 $PROXY $TDIR/tests/server &
- sleep 10
- curl http://127.0.0.1:8000/help
- sleep 1
- curl http://127.0.0.1:8000/hello
- sleep 1
- kill $!
image: ${IMAGE}
tags:
- docker
dependencies:
- build