]>
Commit | Line | Data |
---|---|---|
f67539c2 TL |
1 | # |
2 | # Licensed to the Apache Software Foundation (ASF) under one | |
3 | # or more contributor license agreements. See the NOTICE file | |
4 | # distributed with this work for additional information | |
5 | # regarding copyright ownership. The ASF licenses this file | |
6 | # to you under the Apache License, Version 2.0 (the | |
7 | # "License"); you may not use this file except in compliance | |
8 | # with the License. You may obtain a copy of the License at | |
9 | # | |
10 | # http://www.apache.org/licenses/LICENSE-2.0 | |
11 | # | |
12 | # Unless required by applicable law or agreed to in writing, | |
13 | # software distributed under the License is distributed on an | |
14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | |
15 | # KIND, either express or implied. See the License for the | |
16 | # specific language governing permissions and limitations | |
17 | # under the License. | |
18 | # | |
19 | ||
20 | # build Apache Thrift on Travis CI - https://travis-ci.org/ | |
21 | ||
22 | # | |
23 | # Docker Integration | |
24 | # see: build/docker/README.md | |
25 | # | |
26 | ||
27 | sudo: required | |
28 | dist: trusty | |
29 | language: cpp | |
30 | ||
31 | services: | |
32 | - docker | |
33 | ||
34 | install: | |
35 | - if [[ `uname` == "Linux" ]]; then build/docker/refresh.sh; fi | |
36 | ||
37 | stages: | |
38 | - docker # docker images | |
39 | - thrift # thrift build jobs | |
40 | ||
41 | env: | |
42 | global: | |
43 | - SCRIPT="cmake.sh" | |
44 | - BUILD_ARG="" | |
45 | - BUILD_ENV="-e CC=gcc -e CXX=g++ -e THRIFT_CROSSTEST_CONCURRENCY=4" | |
46 | - DISTRO=ubuntu-bionic | |
47 | - BUILD_LIBS="CPP C_GLIB HASKELL JAVA PYTHON TESTING TUTORIALS" # only meaningful for CMake builds | |
48 | - TRAVIS_BUILD_STAGE=test | |
49 | # DOCKER_REPO (this works for all builds as a source for docker images - you can override for fork builds in your Travis settings) | |
50 | - DOCKER_REPO="thrift/thrift-build" | |
51 | # DOCKER_USER (provide in your Travis settings if you want to build and update docker images once, instead of on every job) | |
52 | # DOCKER_PASS (same) | |
53 | ||
54 | jobs: | |
55 | include: | |
56 | # ========================= stage: docker ========================= | |
57 | - stage: docker | |
58 | script: true | |
59 | env: | |
60 | - JOB="Docker Build ubuntu-xenial 16.04 LTS" | |
61 | - DISTRO=ubuntu-xenial | |
62 | - TRAVIS_BUILD_STAGE=docker | |
63 | - script: true | |
64 | env: | |
65 | - JOB="Docker Build ubuntu-bionic 18.04 LTS" | |
66 | - DISTRO=ubuntu-bionic | |
67 | - TRAVIS_BUILD_STAGE=docker | |
68 | ||
69 | # ========================= stage: thrift ======================= | |
70 | # ------------------------- phase: cross ------------------------ | |
71 | - stage: thrift | |
72 | script: build/docker/run.sh | |
73 | env: | |
74 | - JOB="Cross Language Tests (Binary Protocol)" | |
75 | - SCRIPT="cross-test.sh" | |
76 | - BUILD_ARG="-'(binary)'" | |
77 | ||
78 | - stage: thrift | |
79 | script: build/docker/run.sh | |
80 | env: | |
81 | - JOB="Cross Language Tests (Header, JSON Protocols)" | |
82 | - SCRIPT="cross-test.sh" | |
83 | - BUILD_ARG="-'(header|json)'" | |
84 | ||
85 | - stage: thrift | |
86 | script: build/docker/run.sh | |
87 | env: | |
88 | - JOB="Cross Language Tests (Compact and Multiplexed Protocols)" | |
89 | - SCRIPT="cross-test.sh" | |
90 | - BUILD_ARG="-'(compact|multiplexed)'" | |
91 | ||
92 | # ------------------------- phase: sca -------------------------- | |
93 | # QA jobs for code analytics and metrics | |
94 | - stage: thrift | |
95 | script: build/docker/run.sh | |
96 | env: | |
97 | - JOB="Static Code Analysis" | |
98 | - SCRIPT="sca.sh" | |
99 | ||
100 | # C and C++ undefined behavior. | |
101 | # A binary crashes if undefined behavior occurs and produces a stack trace. | |
102 | # python is disabled, see: THRIFT-4360 | |
103 | - script: build/docker/run.sh | |
104 | env: | |
105 | - JOB="UBSan" | |
106 | - SCRIPT="ubsan.sh" | |
107 | - BUILD_ARG="--without-python --without-py3" | |
108 | ||
109 | # ------------------------- phase: autotools -------------------- | |
110 | # TODO: Remove them once migrated to CMake | |
111 | - script: build/docker/run.sh | |
112 | env: | |
113 | - JOB="Autotools (Ubuntu Bionic)" | |
114 | - SCRIPT="autotools.sh" | |
115 | ||
116 | - script: build/docker/run.sh | |
117 | env: | |
118 | - JOB="Autotools (Ubuntu Xenial)" | |
119 | - DISTRO=ubuntu-xenial | |
120 | - SCRIPT="autotools.sh" | |
121 | ||
122 | # ------------------------- phase: cmake ------------------------ | |
123 | - script: build/docker/run.sh | |
124 | env: | |
125 | - JOB="CMake" | |
126 | - BUILD_ARG="-DCMAKE_BUILD_TYPE=Debug" | |
127 | ||
128 | - script: build/docker/run.sh | |
129 | env: | |
130 | - JOB="CMake" | |
131 | - BUILD_ARG="-DCMAKE_BUILD_TYPE=Release" | |
132 | ||
133 | # ------------------------- phase: dist ------------------------- | |
134 | - script: build/docker/run.sh | |
135 | env: | |
136 | - JOB="make dist" | |
137 | - SCRIPT="make-dist.sh" | |
138 | ||
139 | - script: build/docker/run.sh | |
140 | env: | |
141 | - JOB="Debian Packages" | |
142 | - SCRIPT="dpkg.sh" | |
143 | ||
144 | # ------------------------- phase: coverity --------------------- | |
145 | # We build the coverity scan build once monthly using a travis cron job | |
146 | - if: (env(COVERITY_SCAN_NOTIFICATION_EMAIL) IS present) AND (branch IN (master)) AND (type IN (cron)) | |
147 | script: build/docker/run.sh | |
148 | env: | |
149 | - JOB="Coverity Scan" | |
150 | - SCRIPT="covscan.sh" | |
151 | ||
152 | # ------------------------- phase: swift ------------------------ | |
153 | # We lint the podspec | |
154 | - os: osx | |
155 | osx_image: xcode10.1 | |
156 | language: swift | |
157 | script: | |
158 | - gem update cocoapods | |
159 | - pod lib lint --allow-warnings --swift-version=3 | |
160 | env: | |
161 | - JOB="pod lib lint" | |
162 | ||
163 | - os: osx | |
164 | osx_image: xcode10.2 | |
165 | language: swift | |
166 | script: | |
167 | - gem update cocoapods | |
168 | - pod lib lint --allow-warnings --swift-version=4.0 | |
169 | - pod lib lint --allow-warnings --swift-version=4.2 | |
170 | - pod lib lint --allow-warnings --swift-version=5.0 | |
171 | env: | |
172 | - JOB="pod lib lint" | |
173 | ||
174 | ### ------------------------- phase: osx -------------------------- | |
175 | # disabled due to the time delays it imposes on build jobs | |
176 | # - os: osx | |
177 | # osx_image: xcode9 | |
178 | # script: build/docker/scripts/autotools.sh | |
179 |