forked from Edgio/waflz
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
66 lines (62 loc) · 1.76 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
---
include:
- project: ci-tools/templates
file: /ec_arty.yml
stages:
- build
- upload
build:
only:
- tags
- master
stage: build
image: ubuntu:$UBUNTU_VERSION
before_script:
- cat /etc/lsb-release
- apt-get update
- apt-get install -y sudo lsb-release apt-transport-https ca-certificates git python3 python3-pip build-essential software-properties-common cmake
- apt-get install -y libssl-dev libpcre3-dev libxml2-dev libicu-dev protobuf-compiler libprotobuf-dev liblzma-dev rapidjson-dev
- python3 -m pip install --upgrade pip
- pip install -r requirements.txt
script:
- |
if [[ ${TARGET} == "debug" ]]; then
./build.sh -a
else
./build.sh
fi
- DIST=$(lsb_release -s -c)
- mkdir -p output/${DIST}
- cp -va build/*.{deb,tar.gz} output/${DIST}
- chmod 755 output/${DIST}/*.{deb,tar.gz}
artifacts:
paths:
- output/
expire_in: 1 week
parallel:
matrix:
- UBUNTU_VERSION: ["18.04", "20.04"]
TARGET: [debug, release]
arty:
extends: .ec_arty
only:
- tags
script:
- ls -l output
- |
for dir in output/*/; do
[ -d "${dir}" ] || break
DIST=$(basename ${dir})
for file in ${dir}*.tar.gz; do
[ -f "${file}" ] || break
${AF_HELPER} upload generic --target ${AF_TEAM}/waflz/ "${file}"
done
for file in ${dir}*.deb; do
[ -f "${file}" ] || break
if [[ ! ${file} =~ .*-debug\.deb$ ]]; then
for repo in ${AF_REPOS}; do
${AF_HELPER} upload debian --repo "${repo}" --dist "${DIST}" "${file}"
done
fi
done
done