Roger Meier | a0836f6 | 2013-05-05 00:19:38 +0200 | [diff] [blame] | 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 | |
James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 22 | # |
| 23 | # Docker Integration |
James E. King, III | cd5be7b | 2017-10-21 10:16:19 -0400 | [diff] [blame] | 24 | # see: build/docker/README.md |
James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 25 | # |
James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 26 | |
Henrique Mendonça | aba4b1f | 2015-06-26 20:56:18 +1000 | [diff] [blame] | 27 | sudo: required |
Nobuaki Sukegawa | d479e23 | 2016-02-28 11:28:19 +0900 | [diff] [blame] | 28 | dist: trusty |
James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 29 | language: cpp |
Henrique Mendonça | aba4b1f | 2015-06-26 20:56:18 +1000 | [diff] [blame] | 30 | |
Nobuaki Sukegawa | a6ab1f5 | 2015-11-28 15:04:39 +0900 | [diff] [blame] | 31 | services: |
| 32 | - docker |
Roger Meier | a0836f6 | 2013-05-05 00:19:38 +0200 | [diff] [blame] | 33 | |
Nobuaki Sukegawa | a6ab1f5 | 2015-11-28 15:04:39 +0900 | [diff] [blame] | 34 | install: |
James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 35 | - if [[ `uname` == "Linux" ]]; then build/docker/refresh.sh; fi |
Nobuaki Sukegawa | a10697a | 2014-12-21 19:43:22 +0900 | [diff] [blame] | 36 | |
James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 37 | stages: |
James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 38 | - docker # docker images |
| 39 | - thrift # thrift build jobs |
Roger Meier | 7ed94ef | 2015-04-26 16:55:35 +0200 | [diff] [blame] | 40 | |
henrique | ac8d8e2 | 2014-07-23 23:31:04 +0200 | [diff] [blame] | 41 | env: |
Roger Meier | 5effab6 | 2014-11-16 22:31:33 +0100 | [diff] [blame] | 42 | global: |
Nobuaki Sukegawa | 93fb7ea | 2016-09-04 17:00:11 +0900 | [diff] [blame] | 43 | - SCRIPT="cmake.sh" |
Nobuaki Sukegawa | a6ab1f5 | 2015-11-28 15:04:39 +0900 | [diff] [blame] | 44 | - BUILD_ARG="" |
James E. King III | d907cc9 | 2018-01-12 10:43:25 -0500 | [diff] [blame] | 45 | - BUILD_ENV="-e CC=gcc -e CXX=g++ -e THRIFT_CROSSTEST_CONCURRENCY=4" |
James E. King III | f5f430d | 2018-06-08 03:37:55 +0000 | [diff] [blame] | 46 | - DISTRO=ubuntu-bionic |
Nobuaki Sukegawa | c40018b | 2016-02-22 21:29:13 +0900 | [diff] [blame] | 47 | - BUILD_LIBS="CPP C_GLIB HASKELL JAVA PYTHON TESTING TUTORIALS" # only meaningful for CMake builds |
James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 48 | - TRAVIS_BUILD_STAGE=test |
James E. King, III | cd5be7b | 2017-10-21 10:16:19 -0400 | [diff] [blame] | 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) |
henrique | c0a7d72 | 2014-07-26 13:11:12 +0200 | [diff] [blame] | 53 | |
James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 54 | jobs: |
| 55 | include: |
James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 56 | # ========================= stage: docker ========================= |
| 57 | - stage: docker |
| 58 | script: true |
| 59 | env: |
James E. King III | f5f430d | 2018-06-08 03:37:55 +0000 | [diff] [blame] | 60 | - JOB="Docker Build ubuntu-xenial 16.04 LTS" |
James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 61 | - DISTRO=ubuntu-xenial |
| 62 | - TRAVIS_BUILD_STAGE=docker |
| 63 | - script: true |
| 64 | env: |
James E. King III | f5f430d | 2018-06-08 03:37:55 +0000 | [diff] [blame] | 65 | - JOB="Docker Build ubuntu-bionic 18.04 LTS" |
| 66 | - DISTRO=ubuntu-bionic |
James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 67 | - TRAVIS_BUILD_STAGE=docker |
Roger Meier | 41ad434 | 2015-03-24 22:30:40 +0100 | [diff] [blame] | 68 | |
James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 69 | # ========================= stage: thrift ======================= |
| 70 | # ------------------------- phase: cross ------------------------ |
| 71 | # apache/thrift official PR builds can exceed 50 minutes per job so combine all cross tests |
| 72 | - stage: thrift |
| 73 | script: build/docker/run.sh |
| 74 | if: repo = apache/thrift |
| 75 | env: |
| 76 | - JOB="Cross Language Tests" |
| 77 | - SCRIPT="cross-test.sh" |
Allen George | bc1344d | 2017-04-28 10:22:03 -0400 | [diff] [blame] | 78 | |
James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 79 | # fork based PR builds cannot exceed 50 minutes per job |
| 80 | - stage: thrift |
| 81 | script: build/docker/run.sh |
| 82 | if: repo != apache/thrift |
| 83 | env: |
| 84 | - JOB="Cross Language Tests (Binary Protocol)" |
| 85 | - SCRIPT="cross-test.sh" |
| 86 | - BUILD_ARG="-'(binary)'" |
James E. King, III | 65efdff | 2017-09-25 00:13:38 -0400 | [diff] [blame] | 87 | |
James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 88 | - stage: thrift |
| 89 | script: build/docker/run.sh |
| 90 | if: repo != apache/thrift |
| 91 | env: |
| 92 | - JOB="Cross Language Tests (Header, JSON Protocols)" |
| 93 | - SCRIPT="cross-test.sh" |
| 94 | - BUILD_ARG="-'(header|json)'" |
Nobuaki Sukegawa | e58ed1a | 2015-11-23 19:23:43 +0900 | [diff] [blame] | 95 | |
James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 96 | - stage: thrift |
| 97 | script: build/docker/run.sh |
| 98 | if: repo != apache/thrift |
| 99 | env: |
| 100 | - JOB="Cross Language Tests (Compact and Multiplexed Protocols)" |
| 101 | - SCRIPT="cross-test.sh" |
| 102 | - BUILD_ARG="-'(compact|multiplexed)'" |
Nobuaki Sukegawa | e58ed1a | 2015-11-23 19:23:43 +0900 | [diff] [blame] | 103 | |
James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 104 | # ------------------------- phase: sca -------------------------- |
| 105 | # QA jobs for code analytics and metrics |
| 106 | - stage: thrift |
| 107 | script: build/docker/run.sh |
| 108 | env: |
| 109 | - JOB="Static Code Analysis" |
| 110 | - SCRIPT="sca.sh" |
James E. King, III | 65efdff | 2017-09-25 00:13:38 -0400 | [diff] [blame] | 111 | |
James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 112 | # C and C++ undefined behavior. |
| 113 | # A binary crashes if undefined behavior occurs and produces a stack trace. |
| 114 | # python is disabled, see: THRIFT-4360 |
| 115 | - script: build/docker/run.sh |
| 116 | env: |
| 117 | - JOB="UBSan" |
| 118 | - SCRIPT="ubsan.sh" |
James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 119 | - BUILD_ARG="--without-python --without-py3" |
Roger Meier | 447294f | 2015-12-11 00:04:41 +0100 | [diff] [blame] | 120 | |
James E. King III | 129f332 | 2018-06-27 21:08:08 +0000 | [diff] [blame] | 121 | # ------------------------- phase: autotools -------------------- |
| 122 | # TODO: Remove them once migrated to CMake |
| 123 | - script: build/docker/run.sh |
| 124 | env: |
| 125 | - JOB="Autotools (Ubuntu Bionic)" |
| 126 | - SCRIPT="autotools.sh" |
| 127 | |
| 128 | - script: build/docker/run.sh |
| 129 | env: |
| 130 | - JOB="Autotools (Ubuntu Xenial)" |
| 131 | - DISTRO=ubuntu-xenial |
| 132 | - SCRIPT="autotools.sh" |
| 133 | |
James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 134 | # ------------------------- phase: cmake ------------------------ |
| 135 | - script: build/docker/run.sh |
| 136 | env: |
James E. King III | bf7f76b | 2018-02-28 17:11:05 -0500 | [diff] [blame] | 137 | - JOB="CMake" |
Nobuaki Sukegawa | a10697a | 2014-12-21 19:43:22 +0900 | [diff] [blame] | 138 | |
James E. King, III | d7142b7 | 2017-09-01 13:00:36 -0700 | [diff] [blame] | 139 | # C++ specific options: compiler plug-in, threading model |
James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 140 | - script: build/docker/run.sh |
| 141 | env: |
James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 142 | - JOB="C++ (Std Thread) and Plugin" |
| 143 | - SCRIPT="cmake.sh" |
| 144 | - BUILD_LIBS="CPP TESTING TUTORIALS" |
cyy | ca8af9b | 2019-01-11 22:13:12 +0800 | [diff] [blame] | 145 | - BUILD_ARG="-DWITH_PLUGIN=ON -DWITH_PYTHON=OFF -DWITH_C_GLIB=OFF -DWITH_JAVA=OFF -DWITH_HASKELL=OFF" |
James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 146 | - BUILD_ENV="-e CC=clang -e CXX=clang++" |
Nobuaki Sukegawa | a6ab1f5 | 2015-11-28 15:04:39 +0900 | [diff] [blame] | 147 | |
James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 148 | # ------------------------- phase: dist ------------------------- |
| 149 | - script: build/docker/run.sh |
| 150 | env: |
| 151 | - JOB="make dist" |
| 152 | - SCRIPT="make-dist.sh" |
Roger Meier | 447294f | 2015-12-11 00:04:41 +0100 | [diff] [blame] | 153 | |
James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 154 | - script: build/docker/run.sh |
| 155 | env: |
| 156 | - JOB="Debian Packages" |
| 157 | - SCRIPT="dpkg.sh" |
James E. King III | d907cc9 | 2018-01-12 10:43:25 -0500 | [diff] [blame] | 158 | |
James E. King III | a3a5909 | 2018-06-27 21:05:57 +0000 | [diff] [blame] | 159 | # ------------------------- phase: coverity --------------------- |
| 160 | # We build the coverity scan build once monthly using a travis cron job |
| 161 | - if: (env(COVERITY_SCAN_NOTIFICATION_EMAIL) IS present) AND (branch IN (master)) AND (type IN (cron)) |
| 162 | script: build/docker/run.sh |
| 163 | env: |
| 164 | - JOB="Coverity Scan" |
| 165 | - SCRIPT="covscan.sh" |
| 166 | |
| 167 | |
| 168 | ### ------------------------- phase: osx -------------------------- |
James E. King III | bf7f76b | 2018-02-28 17:11:05 -0500 | [diff] [blame] | 169 | # disabled due to the time delays it imposes on build jobs |
| 170 | # - os: osx |
| 171 | # osx_image: xcode9 |
| 172 | # script: build/docker/scripts/autotools.sh |
| 173 | |