forked from google/glog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
119 lines (112 loc) · 2.92 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
sudo: required
language: bash
services:
- docker
# define the build matrix
env:
global:
- PROJECT_DIR: .
- TOOLCHAIN: gcc-cxx11
- BUILD_PACKAGES: cmake
- RUN_TESTS: true
matrix:
include:
# Linux {
# Ubuntu 14.04
- os: linux
env: >
BUILD_FLAVOR=ubuntu
BUILD_RELEASE=trusty
BUILD_ARCH=amd64
BUILD_PACKAGES=cmake3
- os: linux
env: >
BUILD_FLAVOR=ubuntu
BUILD_RELEASE=trusty
BUILD_ARCH=i386
BUILD_PACKAGES=cmake3
# Ubuntu 16.04
- os: linux
env: >
BUILD_FLAVOR=ubuntu
BUILD_RELEASE=xenial
BUILD_ARCH=amd64
- os: linux
env: >
BUILD_FLAVOR=ubuntu
BUILD_RELEASE=xenial
BUILD_ARCH=i386
# Ubuntu 18.04
- os: linux
env: >
BUILD_FLAVOR=ubuntu
BUILD_RELEASE=bionic
BUILD_ARCH=amd64
TOOLCHAIN=gcc-cxx98
- os: linux
env: >
BUILD_FLAVOR=ubuntu
BUILD_RELEASE=bionic
BUILD_ARCH=amd64
- os: linux
env: >
BUILD_FLAVOR=ubuntu
BUILD_RELEASE=bionic
BUILD_ARCH=amd64
TOOLCHAIN=gcc-gnuxx11
- os: linux
env: >
BUILD_FLAVOR=ubuntu
BUILD_RELEASE=bionic
BUILD_ARCH=amd64
TOOLCHAIN=gcc-cxx17
- os: linux
env: >
BUILD_FLAVOR=ubuntu
BUILD_RELEASE=bionic
BUILD_ARCH=amd64
TOOLCHAIN=clang-cxx17
BUILD_PACKAGES="cmake clang"
# } // end Linux
# Windows build with mingw-w64 on Ubuntu 18.04
- os: linux
env: >
BUILD_FLAVOR=ubuntu
BUILD_RELEASE=bionic
BUILD_ARCH=amd64
TOOLCHAIN=linux-mingw-w64-cxx11
BUILD_PACKAGES="cmake mingw-w64 wine-stable"
- os: linux
env: >
BUILD_FLAVOR=ubuntu
BUILD_RELEASE=bionic
BUILD_ARCH=amd64
TOOLCHAIN=linux-mingw-w64-gnuxx11
BUILD_PACKAGES="cmake mingw-w64 wine-stable"
- os: linux
env: >
BUILD_FLAVOR=ubuntu
BUILD_RELEASE=bionic
BUILD_ARCH=amd64
TOOLCHAIN=linux-mingw-w64-cxx17
BUILD_PACKAGES="cmake mingw-w64 wine-stable"
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" \
Dockerfile.$BUILD_FLAVOR.template | tee Dockerfile.$BUILD_FLAVOR.$BUILD_RELEASE.$BUILD_ARCH
- docker build -f Dockerfile.$BUILD_FLAVOR.$BUILD_RELEASE.$BUILD_ARCH -t glog-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 glog-devel ./.travis.$BUILD_FLAVOR.sh