-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.gitlab-ci.yml
79 lines (69 loc) · 1.7 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
image: gcc
#cache:
# key: apt-cache
# paths:
# - $CI_PROJECT_DIR/.apt
cache:
key: apt-cache
paths:
- .apt
stages:
- build
- tests
.initialize: &initialize
- |
if [ "$USE_PROXY" == "1" ]
then
echo "$APT_PROXY" > /etc/apt/apt.conf.d/proxy.conf
export http_proxy="$http_proxy"
export https_proxy="$https_proxy"
export ftp_proxy="$ftp_proxy"
git config --global http.proxy "$http_proxy"
git config --global http.proxyAuthMethod 'basic'
fi
# set apt conf
export APT_DIR=.apt
export APT_STATE_LISTS=$APT_DIR/lists
export APT_CACHE_ARCHIVES=$APT_DIR/archives
mkdir -p $APT_CACHE_ARCHIVES/partial $APT_STATE_LISTS
rm -f /etc/apt/apt.conf.d/docker-clean
#apt install and update deps
- apt-get update -yq
- apt-get install -y liballegro5-dev valgrind libpcre3-dev libsasl2-dev doxygen graphviz
- git submodule update --init --recursive
- make download-dep
.make_lib: &make_lib
- make -j 6
.make_examples: &make_examples
- make -j 6 examples
.make_tests: &make_tests
- cd "${CI_PROJECT_DIR}"
- make -j 6 examples
- cd examples
- chmod +Xx valgrind.sh
- ./valgrind.sh
build_lib:
stage: build
script:
- *initialize
- *make_lib
artifacts:
paths:
- ${CI_PROJECT_DIR}/libnilorea.a
expire_in: 1 week
build_examples:
stage: build
script:
- *initialize
- *make_examples
artifacts:
paths:
- ${CI_PROJECT_DIR}/examples/ex_*
- ${CI_PROJECT_DIR}/libnilorea.a
- ${CI_PROJECT_DIR}/libnilorea.so
expire_in: 1 week
tests:
stage: tests
script:
- *initialize
- *make_tests