-
Notifications
You must be signed in to change notification settings - Fork 48
/
.travis.yml
86 lines (78 loc) · 2 KB
/
.travis.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
80
81
82
83
84
85
sudo: required
language: cpp
services:
- docker
# define the build matrix
env:
global:
- PROJECT_DIR: .
- TOOLCHAIN: default
- BUILD_PACKAGES: ""
- RUN_TESTS: true
- TZ: America/Los_Angeles
matrix:
include:
# Linux {
# Ubuntu 18.04
- os: linux
env: >
BUILD_FLAVOR=ubuntu
BUILD_RELEASE=bionic
BUILD_ARCH=amd64
BUILD_PACKAGES="g++-8"
TOOLCHAIN=gcc-8
# Ubuntu 20.04
- os: linux
env: >
BUILD_FLAVOR=ubuntu
BUILD_RELEASE=focal
BUILD_ARCH=amd64
- os: linux
env: >
BUILD_FLAVOR=ubuntu
BUILD_RELEASE=focal
BUILD_ARCH=amd64
TOOLCHAIN=gcc-cxx20
# link for debian releases: https://www.debian.org/releases/
# Debian 10
- os: linux
env: >
BUILD_FLAVOR=debian
BUILD_RELEASE=buster
BUILD_ARCH=amd64
# Debian 11
- os: linux
env: >
BUILD_FLAVOR=debian
BUILD_RELEASE=bullseye
BUILD_ARCH=amd64
# Clang
- os: linux
env: >
BUILD_FLAVOR=debian
BUILD_RELEASE=bullseye
BUILD_ARCH=amd64
TOOLCHAIN=clang-cxx20
BUILD_PACKAGES="clang"
# } // end Linux
before_install:
# use the Dockerfile.<distro>.template file for building the image with sed magic
- |
sed \
-e "s/@BUILD_FLAVOR@/${BUILD_FLAVOR}/g" \
-e "s/@BUILD_RELEASE@/${BUILD_RELEASE}/g" \
-e "s/@BUILD_ARCH@/${BUILD_ARCH}/g" \
-e "s/@BUILD_PACKAGES@/${BUILD_PACKAGES}/g" \
-e "s#@TZ@#${TZ}#g" \
ci/Dockerfile.template | tee ci/Dockerfile.$BUILD_FLAVOR.$BUILD_RELEASE.$BUILD_ARCH
- docker build -f ci/Dockerfile.$BUILD_FLAVOR.$BUILD_RELEASE.$BUILD_ARCH -t vt-devel .
script: |
# run the respective .travis.<distro>.sh script
docker run \
-e BUILD_FLAVOR="$BUILD_FLAVOR" \
-e BUILD_RELEASE="$BUILD_RELEASE" \
-e BUILD_ARCH="$BUILD_ARCH" \
-e PROJECT_DIR="$PROJECT_DIR" \
-e TOOLCHAIN="$TOOLCHAIN" \
-e RUN_TESTS="$RUN_TESTS" \
-it vt-devel ./ci/travis.sh