2013-05-04 22:19:38 +00:00
|
|
|
#
|
|
|
|
# Licensed to the Apache Software Foundation (ASF) under one
|
|
|
|
# or more contributor license agreements. See the NOTICE file
|
|
|
|
# distributed with this work for additional information
|
|
|
|
# regarding copyright ownership. The ASF licenses this file
|
|
|
|
# to you under the Apache License, Version 2.0 (the
|
|
|
|
# "License"); you may not use this file except in compliance
|
|
|
|
# with the License. You may obtain a copy of the License at
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing,
|
|
|
|
# software distributed under the License is distributed on an
|
|
|
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
|
|
# KIND, either express or implied. See the License for the
|
|
|
|
# specific language governing permissions and limitations
|
|
|
|
# under the License.
|
|
|
|
#
|
|
|
|
|
|
|
|
# build Apache Thrift on Travis CI - https://travis-ci.org/
|
|
|
|
|
2017-09-30 22:44:16 +00:00
|
|
|
#
|
|
|
|
# Docker Integration
|
2017-10-21 14:16:19 +00:00
|
|
|
# see: build/docker/README.md
|
2017-09-30 22:44:16 +00:00
|
|
|
#
|
|
|
|
|
2015-06-26 10:56:18 +00:00
|
|
|
sudo: required
|
2016-02-28 02:28:19 +00:00
|
|
|
dist: trusty
|
2017-09-30 22:44:16 +00:00
|
|
|
language: cpp
|
2015-06-26 10:56:18 +00:00
|
|
|
|
2015-11-28 06:04:39 +00:00
|
|
|
services:
|
|
|
|
- docker
|
2014-12-21 10:43:22 +00:00
|
|
|
|
2015-11-28 06:04:39 +00:00
|
|
|
install:
|
2017-09-30 22:44:16 +00:00
|
|
|
- if [[ `uname` == "Linux" ]]; then build/docker/refresh.sh; fi
|
2014-12-21 10:43:22 +00:00
|
|
|
|
2017-09-30 22:44:16 +00:00
|
|
|
stages:
|
|
|
|
- docker # docker images
|
|
|
|
- thrift # thrift build jobs
|
2015-04-26 14:55:35 +00:00
|
|
|
|
2014-11-16 21:31:33 +00:00
|
|
|
env:
|
|
|
|
global:
|
2016-09-04 08:00:11 +00:00
|
|
|
- SCRIPT="cmake.sh"
|
2015-11-28 06:04:39 +00:00
|
|
|
- BUILD_ARG=""
|
2018-01-12 15:43:25 +00:00
|
|
|
- BUILD_ENV="-e CC=gcc -e CXX=g++ -e THRIFT_CROSSTEST_CONCURRENCY=4"
|
2018-06-08 03:37:55 +00:00
|
|
|
- DISTRO=ubuntu-bionic
|
2016-02-22 12:29:13 +00:00
|
|
|
- BUILD_LIBS="CPP C_GLIB HASKELL JAVA PYTHON TESTING TUTORIALS" # only meaningful for CMake builds
|
2017-09-30 22:44:16 +00:00
|
|
|
- TRAVIS_BUILD_STAGE=test
|
2017-10-21 14:16:19 +00:00
|
|
|
# DOCKER_REPO (this works for all builds as a source for docker images - you can override for fork builds in your Travis settings)
|
|
|
|
- DOCKER_REPO="thrift/thrift-build"
|
|
|
|
# DOCKER_USER (provide in your Travis settings if you want to build and update docker images once, instead of on every job)
|
|
|
|
# DOCKER_PASS (same)
|
2014-07-23 21:31:04 +00:00
|
|
|
|
2017-09-30 22:44:16 +00:00
|
|
|
jobs:
|
2014-12-21 10:43:22 +00:00
|
|
|
include:
|
2017-09-30 22:44:16 +00:00
|
|
|
# ========================= stage: docker =========================
|
|
|
|
- stage: docker
|
|
|
|
script: true
|
|
|
|
env:
|
2018-06-08 03:37:55 +00:00
|
|
|
- JOB="Docker Build ubuntu-xenial 16.04 LTS"
|
2017-09-30 22:44:16 +00:00
|
|
|
- DISTRO=ubuntu-xenial
|
|
|
|
- TRAVIS_BUILD_STAGE=docker
|
|
|
|
- script: true
|
|
|
|
env:
|
2018-06-08 03:37:55 +00:00
|
|
|
- JOB="Docker Build ubuntu-bionic 18.04 LTS"
|
|
|
|
- DISTRO=ubuntu-bionic
|
2017-09-30 22:44:16 +00:00
|
|
|
- TRAVIS_BUILD_STAGE=docker
|
|
|
|
|
|
|
|
# ========================= stage: thrift =======================
|
|
|
|
# ------------------------- phase: cross ------------------------
|
|
|
|
- stage: thrift
|
|
|
|
script: build/docker/run.sh
|
|
|
|
env:
|
|
|
|
- JOB="Cross Language Tests (Binary Protocol)"
|
|
|
|
- SCRIPT="cross-test.sh"
|
|
|
|
- BUILD_ARG="-'(binary)'"
|
|
|
|
|
|
|
|
- stage: thrift
|
|
|
|
script: build/docker/run.sh
|
|
|
|
env:
|
|
|
|
- JOB="Cross Language Tests (Header, JSON Protocols)"
|
|
|
|
- SCRIPT="cross-test.sh"
|
|
|
|
- BUILD_ARG="-'(header|json)'"
|
|
|
|
|
|
|
|
- stage: thrift
|
|
|
|
script: build/docker/run.sh
|
|
|
|
env:
|
|
|
|
- JOB="Cross Language Tests (Compact and Multiplexed Protocols)"
|
|
|
|
- SCRIPT="cross-test.sh"
|
|
|
|
- BUILD_ARG="-'(compact|multiplexed)'"
|
|
|
|
|
|
|
|
# ------------------------- phase: sca --------------------------
|
2014-11-16 21:31:33 +00:00
|
|
|
# QA jobs for code analytics and metrics
|
2017-09-30 22:44:16 +00:00
|
|
|
- stage: thrift
|
|
|
|
script: build/docker/run.sh
|
|
|
|
env:
|
|
|
|
- JOB="Static Code Analysis"
|
|
|
|
- SCRIPT="sca.sh"
|
|
|
|
|
|
|
|
# C and C++ undefined behavior.
|
|
|
|
# A binary crashes if undefined behavior occurs and produces a stack trace.
|
|
|
|
# python is disabled, see: THRIFT-4360
|
|
|
|
- script: build/docker/run.sh
|
|
|
|
env:
|
|
|
|
- JOB="UBSan"
|
|
|
|
- SCRIPT="ubsan.sh"
|
|
|
|
- BUILD_ARG="--without-python --without-py3"
|
|
|
|
|
2018-06-27 21:08:08 +00:00
|
|
|
# ------------------------- phase: autotools --------------------
|
|
|
|
# TODO: Remove them once migrated to CMake
|
|
|
|
- script: build/docker/run.sh
|
|
|
|
env:
|
|
|
|
- JOB="Autotools (Ubuntu Bionic)"
|
|
|
|
- SCRIPT="autotools.sh"
|
|
|
|
|
|
|
|
- script: build/docker/run.sh
|
|
|
|
env:
|
|
|
|
- JOB="Autotools (Ubuntu Xenial)"
|
|
|
|
- DISTRO=ubuntu-xenial
|
|
|
|
- SCRIPT="autotools.sh"
|
|
|
|
|
2017-09-30 22:44:16 +00:00
|
|
|
# ------------------------- phase: cmake ------------------------
|
|
|
|
- script: build/docker/run.sh
|
|
|
|
env:
|
2018-02-28 22:11:05 +00:00
|
|
|
- JOB="CMake"
|
2019-01-22 14:22:04 +00:00
|
|
|
- BUILD_ARG="-DCMAKE_BUILD_TYPE=Debug"
|
|
|
|
|
|
|
|
- script: build/docker/run.sh
|
|
|
|
env:
|
|
|
|
- JOB="CMake"
|
|
|
|
- BUILD_ARG="-DCMAKE_BUILD_TYPE=Release"
|
2017-09-30 22:44:16 +00:00
|
|
|
|
|
|
|
# ------------------------- phase: dist -------------------------
|
|
|
|
- script: build/docker/run.sh
|
|
|
|
env:
|
|
|
|
- JOB="make dist"
|
|
|
|
- SCRIPT="make-dist.sh"
|
|
|
|
|
|
|
|
- script: build/docker/run.sh
|
|
|
|
env:
|
|
|
|
- JOB="Debian Packages"
|
|
|
|
- SCRIPT="dpkg.sh"
|
2018-01-12 15:43:25 +00:00
|
|
|
|
2018-06-27 21:05:57 +00:00
|
|
|
# ------------------------- phase: coverity ---------------------
|
|
|
|
# We build the coverity scan build once monthly using a travis cron job
|
|
|
|
- if: (env(COVERITY_SCAN_NOTIFICATION_EMAIL) IS present) AND (branch IN (master)) AND (type IN (cron))
|
|
|
|
script: build/docker/run.sh
|
|
|
|
env:
|
|
|
|
- JOB="Coverity Scan"
|
|
|
|
- SCRIPT="covscan.sh"
|
2019-07-08 10:42:09 +00:00
|
|
|
|
|
|
|
# ------------------------- phase: swift ------------------------
|
|
|
|
# We lint the podspec
|
|
|
|
- os: osx
|
|
|
|
osx_image: xcode10.1
|
|
|
|
language: swift
|
|
|
|
script:
|
|
|
|
- gem update cocoapods
|
|
|
|
- pod lib lint --allow-warnings --swift-version=3
|
|
|
|
env:
|
|
|
|
- JOB="pod lib lint"
|
|
|
|
|
|
|
|
- os: osx
|
|
|
|
osx_image: xcode10.2
|
|
|
|
language: swift
|
|
|
|
script:
|
|
|
|
- gem update cocoapods
|
|
|
|
- pod lib lint --allow-warnings --swift-version=4.0
|
|
|
|
- pod lib lint --allow-warnings --swift-version=4.2
|
|
|
|
- pod lib lint --allow-warnings --swift-version=5.0
|
|
|
|
env:
|
|
|
|
- JOB="pod lib lint"
|
2018-06-27 21:05:57 +00:00
|
|
|
|
|
|
|
### ------------------------- phase: osx --------------------------
|
2018-02-28 22:11:05 +00:00
|
|
|
# disabled due to the time delays it imposes on build jobs
|
|
|
|
# - os: osx
|
|
|
|
# osx_image: xcode9
|
|
|
|
# script: build/docker/scripts/autotools.sh
|
|
|
|
|