blob: e89b3e02cc7afa5443ccba1bef07d99500c46a01 [file] [log] [blame]
Roger Meiera0836f62013-05-05 00:19:38 +02001#
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
James E. King, III0ad20bd2017-09-30 15:44:16 -070022#
23# Docker Integration
James E. King, IIIcd5be7b2017-10-21 10:16:19 -040024# see: build/docker/README.md
Jiayu Liua8fded42022-04-19 17:30:34 +080025#
James E. King, III0ad20bd2017-09-30 15:44:16 -070026
Henrique Mendonçaaba4b1f2015-06-26 20:56:18 +100027sudo: required
Jiayu Liua8fded42022-04-19 17:30:34 +080028# https://docs.travis-ci.com/user/reference/linux
29dist: xenial
James E. King, III0ad20bd2017-09-30 15:44:16 -070030language: cpp
Henrique Mendonçaaba4b1f2015-06-26 20:56:18 +100031
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +090032services:
33 - docker
Roger Meiera0836f62013-05-05 00:19:38 +020034
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +090035install:
Jiayu Liu9042cc22022-04-22 11:32:08 +080036 - if [[ `uname` == "Linux" ]]; then build/docker/refresh.sh; fi
Nobuaki Sukegawaa10697a2014-12-21 19:43:22 +090037
James E. King, III0ad20bd2017-09-30 15:44:16 -070038stages:
James E. King, III0ad20bd2017-09-30 15:44:16 -070039 - docker # docker images
40 - thrift # thrift build jobs
Roger Meier7ed94ef2015-04-26 16:55:35 +020041
henriqueac8d8e22014-07-23 23:31:04 +020042env:
Roger Meier5effab62014-11-16 22:31:33 +010043 global:
Nobuaki Sukegawa93fb7ea2016-09-04 17:00:11 +090044 - SCRIPT="cmake.sh"
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +090045 - BUILD_ARG=""
James E. King IIId907cc92018-01-12 10:43:25 -050046 - BUILD_ENV="-e CC=gcc -e CXX=g++ -e THRIFT_CROSSTEST_CONCURRENCY=4"
James E. King IIIf5f430d2018-06-08 03:37:55 +000047 - DISTRO=ubuntu-bionic
Jens Geyer66d89762021-03-20 18:07:17 +010048 - BUILD_LIBS="CPP C_GLIB JAVA PYTHON TESTING TUTORIALS" # only meaningful for CMake builds
James E. King, III0ad20bd2017-09-30 15:44:16 -070049 - TRAVIS_BUILD_STAGE=test
James E. King, IIIcd5be7b2017-10-21 10:16:19 -040050 # DOCKER_REPO (this works for all builds as a source for docker images - you can override for fork builds in your Travis settings)
51 - DOCKER_REPO="thrift/thrift-build"
52 # DOCKER_USER (provide in your Travis settings if you want to build and update docker images once, instead of on every job)
53 # DOCKER_PASS (same)
henriquec0a7d722014-07-26 13:11:12 +020054
James E. King, III0ad20bd2017-09-30 15:44:16 -070055jobs:
56 include:
James E. King, III0ad20bd2017-09-30 15:44:16 -070057 # ========================= stage: docker =========================
58 - stage: docker
59 script: true
60 env:
James E. King IIIf5f430d2018-06-08 03:37:55 +000061 - JOB="Docker Build ubuntu-xenial 16.04 LTS"
James E. King, III0ad20bd2017-09-30 15:44:16 -070062 - DISTRO=ubuntu-xenial
63 - TRAVIS_BUILD_STAGE=docker
64 - script: true
65 env:
James E. King IIIf5f430d2018-06-08 03:37:55 +000066 - JOB="Docker Build ubuntu-bionic 18.04 LTS"
67 - DISTRO=ubuntu-bionic
James E. King, III0ad20bd2017-09-30 15:44:16 -070068 - TRAVIS_BUILD_STAGE=docker
Roger Meier41ad4342015-03-24 22:30:40 +010069
James E. King, III0ad20bd2017-09-30 15:44:16 -070070 # ========================= stage: thrift =======================
71 # ------------------------- phase: cross ------------------------
James E. King, III0ad20bd2017-09-30 15:44:16 -070072 - stage: thrift
73 script: build/docker/run.sh
James E. King, III0ad20bd2017-09-30 15:44:16 -070074 env:
75 - JOB="Cross Language Tests (Binary Protocol)"
76 - SCRIPT="cross-test.sh"
77 - BUILD_ARG="-'(binary)'"
James E. King, III65efdff2017-09-25 00:13:38 -040078
James E. King, III0ad20bd2017-09-30 15:44:16 -070079 - stage: thrift
80 script: build/docker/run.sh
James E. King, III0ad20bd2017-09-30 15:44:16 -070081 env:
82 - JOB="Cross Language Tests (Header, JSON Protocols)"
83 - SCRIPT="cross-test.sh"
84 - BUILD_ARG="-'(header|json)'"
Nobuaki Sukegawae58ed1a2015-11-23 19:23:43 +090085
James E. King, III0ad20bd2017-09-30 15:44:16 -070086 - stage: thrift
87 script: build/docker/run.sh
James E. King, III0ad20bd2017-09-30 15:44:16 -070088 env:
89 - JOB="Cross Language Tests (Compact and Multiplexed Protocols)"
90 - SCRIPT="cross-test.sh"
91 - BUILD_ARG="-'(compact|multiplexed)'"
Nobuaki Sukegawae58ed1a2015-11-23 19:23:43 +090092
James E. King, III0ad20bd2017-09-30 15:44:16 -070093 # ------------------------- phase: sca --------------------------
94 # QA jobs for code analytics and metrics
95 - stage: thrift
96 script: build/docker/run.sh
97 env:
98 - JOB="Static Code Analysis"
99 - SCRIPT="sca.sh"
James E. King, III65efdff2017-09-25 00:13:38 -0400100
James E. King, III0ad20bd2017-09-30 15:44:16 -0700101 # C and C++ undefined behavior.
102 # A binary crashes if undefined behavior occurs and produces a stack trace.
103 # python is disabled, see: THRIFT-4360
104 - script: build/docker/run.sh
105 env:
106 - JOB="UBSan"
107 - SCRIPT="ubsan.sh"
James E. King, III0ad20bd2017-09-30 15:44:16 -0700108 - BUILD_ARG="--without-python --without-py3"
Roger Meier447294f2015-12-11 00:04:41 +0100109
James E. King III129f3322018-06-27 21:08:08 +0000110 # ------------------------- phase: autotools --------------------
111 # TODO: Remove them once migrated to CMake
112 - script: build/docker/run.sh
113 env:
114 - JOB="Autotools (Ubuntu Bionic)"
115 - SCRIPT="autotools.sh"
116
117 - script: build/docker/run.sh
118 env:
119 - JOB="Autotools (Ubuntu Xenial)"
120 - DISTRO=ubuntu-xenial
121 - SCRIPT="autotools.sh"
122
James E. King, III0ad20bd2017-09-30 15:44:16 -0700123 # ------------------------- phase: cmake ------------------------
124 - script: build/docker/run.sh
125 env:
James E. King IIIbf7f76b2018-02-28 17:11:05 -0500126 - JOB="CMake"
James E. King III98f379e2019-01-22 09:22:04 -0500127 - BUILD_ARG="-DCMAKE_BUILD_TYPE=Debug"
128
129 - script: build/docker/run.sh
130 env:
131 - JOB="CMake"
132 - BUILD_ARG="-DCMAKE_BUILD_TYPE=Release"
Nobuaki Sukegawaa10697a2014-12-21 19:43:22 +0900133
James E. King, III0ad20bd2017-09-30 15:44:16 -0700134 # ------------------------- phase: dist -------------------------
135 - script: build/docker/run.sh
136 env:
137 - JOB="make dist"
138 - SCRIPT="make-dist.sh"
Roger Meier447294f2015-12-11 00:04:41 +0100139
James E. King, III0ad20bd2017-09-30 15:44:16 -0700140 - script: build/docker/run.sh
141 env:
142 - JOB="Debian Packages"
143 - SCRIPT="dpkg.sh"
James E. King IIId907cc92018-01-12 10:43:25 -0500144
James E. King IIIa3a59092018-06-27 21:05:57 +0000145 # ------------------------- phase: coverity ---------------------
146 # We build the coverity scan build once monthly using a travis cron job
147 - if: (env(COVERITY_SCAN_NOTIFICATION_EMAIL) IS present) AND (branch IN (master)) AND (type IN (cron))
148 script: build/docker/run.sh
149 env:
150 - JOB="Coverity Scan"
151 - SCRIPT="covscan.sh"
Antoine Cœur08a6eb62019-07-08 18:42:09 +0800152
153 # ------------------------- phase: swift ------------------------
154 # We lint the podspec
155 - os: osx
Alexander Edgeb4711a62020-04-24 14:43:03 +0100156 osx_image: xcode11.3
Antoine Cœur08a6eb62019-07-08 18:42:09 +0800157 language: swift
158 script:
159 - gem update cocoapods
Alexander Edgeb4711a62020-04-24 14:43:03 +0100160 - pod lib lint --allow-warnings --swift-version=5.1
Antoine Cœur08a6eb62019-07-08 18:42:09 +0800161 env:
162 - JOB="pod lib lint"
James E. King IIIa3a59092018-06-27 21:05:57 +0000163
164 ### ------------------------- phase: osx --------------------------
James E. King IIIbf7f76b2018-02-28 17:11:05 -0500165 # disabled due to the time delays it imposes on build jobs
166 # - os: osx
167 # osx_image: xcode9
168 # script: build/docker/scripts/autotools.sh
169