-
Notifications
You must be signed in to change notification settings - Fork 18
/
.gitlab-ci.yml
49 lines (45 loc) · 1.23 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
stages:
- docker_image
- build
- test
variables:
DOCKER_IMAGE: $CI_REGISTRY/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME:$CI_COMMIT_REF_SLUG
BRANCHES_REGEXP: "/^ci-test|devel|master$/"
build_image:
stage: docker_image
rules:
- if: '$CI_COMMIT_BRANCH =~ $BRANCHES_REGEXP'
changes:
- .gitlab-ci.yml
- build-config/gitlab-docker/Dockerfile
image: docker:latest
script:
- docker build -t $DOCKER_IMAGE build-config/gitlab-docker
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker push $DOCKER_IMAGE
build-ci-test:
stage: build
rules:
- if: '$CI_COMMIT_BRANCH =~ $BRANCHES_REGEXP'
image: $DOCKER_IMAGE
script:
- cd libevent-2.1.11-stable # first build libevent
- autoreconf --install
- ./configure --prefix=$PWD/../atlas
- make install
- cd ../
- make menuconfig # This creates a file called ".config"
- make # This creates the "busybox" executable
artifacts:
paths:
- busybox
- atlas/lib/*
test-ci-test:
stage: test
rules:
- if: '$CI_COMMIT_BRANCH =~ $BRANCHES_REGEXP'
image: $DOCKER_IMAGE
script:
- export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/atlas/lib
- cd testsuite
- sh runtest