| 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 |  | 
| Jiayu Liu | 096a061 | 2022-10-11 11:46:25 +0800 | [diff] [blame] | 20 | # build Apache Thrift on Travis CI - https://travis-ci.com/ | 
| Roger Meier | a0836f6 | 2013-05-05 00:19:38 +0200 | [diff] [blame] | 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 | 
| Jiayu Liu | a8fded4 | 2022-04-19 17:30:34 +0800 | [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 | 
| Jiayu Liu | a8fded4 | 2022-04-19 17:30:34 +0800 | [diff] [blame] | 28 | # https://docs.travis-ci.com/user/reference/linux | 
| Jiayu Liu | f027dee | 2022-09-19 14:26:37 +0800 | [diff] [blame] | 29 | dist: focal | 
| James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 30 | language: cpp | 
| Henrique Mendonça | aba4b1f | 2015-06-26 20:56:18 +1000 | [diff] [blame] | 31 |  | 
| Nobuaki Sukegawa | a6ab1f5 | 2015-11-28 15:04:39 +0900 | [diff] [blame] | 32 | services: | 
|  | 33 | - docker | 
| Roger Meier | a0836f6 | 2013-05-05 00:19:38 +0200 | [diff] [blame] | 34 |  | 
| Nobuaki Sukegawa | a6ab1f5 | 2015-11-28 15:04:39 +0900 | [diff] [blame] | 35 | install: | 
| Jiayu Liu | 40496a7 | 2022-04-22 11:37:03 +0800 | [diff] [blame] | 36 | # https://docs.travis-ci.com/user/common-build-problems/#build-times-out-because-no-output-was-received | 
|  | 37 | # adding `travis_wait` because kerl building in the docker file takes >10 min for building erlang | 
|  | 38 | # without printing to stdout, resulting in build failures | 
| Jiayu Liu | 684ee07 | 2022-04-22 20:56:29 +0800 | [diff] [blame] | 39 | - if [[ `uname` == "Linux" ]]; then travis_wait 40 build/docker/refresh.sh; fi | 
| Nobuaki Sukegawa | a10697a | 2014-12-21 19:43:22 +0900 | [diff] [blame] | 40 |  | 
| James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 41 | stages: | 
| James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 42 | - docker    # docker images | 
|  | 43 | - thrift    # thrift build jobs | 
| Roger Meier | 7ed94ef | 2015-04-26 16:55:35 +0200 | [diff] [blame] | 44 |  | 
| henrique | ac8d8e2 | 2014-07-23 23:31:04 +0200 | [diff] [blame] | 45 | env: | 
| Roger Meier | 5effab6 | 2014-11-16 22:31:33 +0100 | [diff] [blame] | 46 | global: | 
| Nobuaki Sukegawa | 93fb7ea | 2016-09-04 17:00:11 +0900 | [diff] [blame] | 47 | - SCRIPT="cmake.sh" | 
| Nobuaki Sukegawa | a6ab1f5 | 2015-11-28 15:04:39 +0900 | [diff] [blame] | 48 | - BUILD_ARG="" | 
| James E. King III | d907cc9 | 2018-01-12 10:43:25 -0500 | [diff] [blame] | 49 | - BUILD_ENV="-e CC=gcc -e CXX=g++ -e THRIFT_CROSSTEST_CONCURRENCY=4" | 
| Jiayu Liu | 4f72788 | 2022-09-28 07:39:20 +0800 | [diff] [blame] | 50 | - DISTRO=ubuntu-bionic | 
| Jens Geyer | 66d8976 | 2021-03-20 18:07:17 +0100 | [diff] [blame] | 51 | - BUILD_LIBS="CPP C_GLIB JAVA PYTHON TESTING TUTORIALS"  # only meaningful for CMake builds | 
| James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 52 | - TRAVIS_BUILD_STAGE=test | 
| James E. King, III | cd5be7b | 2017-10-21 10:16:19 -0400 | [diff] [blame] | 53 | # DOCKER_REPO (this works for all builds as a source for docker images - you can override for fork builds in your Travis settings) | 
|  | 54 | - DOCKER_REPO="thrift/thrift-build" | 
|  | 55 | # DOCKER_USER (provide in your Travis settings if you want to build and update docker images once, instead of on every job) | 
|  | 56 | # DOCKER_PASS (same) | 
| henrique | c0a7d72 | 2014-07-26 13:11:12 +0200 | [diff] [blame] | 57 |  | 
| James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 58 | jobs: | 
|  | 59 | include: | 
| James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 60 | # ========================= stage: docker ========================= | 
|  | 61 | - stage: docker | 
|  | 62 | script: true | 
|  | 63 | env: | 
| James E. King III | f5f430d | 2018-06-08 03:37:55 +0000 | [diff] [blame] | 64 | - JOB="Docker Build ubuntu-bionic 18.04 LTS" | 
|  | 65 | - DISTRO=ubuntu-bionic | 
| James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 66 | - TRAVIS_BUILD_STAGE=docker | 
| Jiayu Liu | f027dee | 2022-09-19 14:26:37 +0800 | [diff] [blame] | 67 | - script: true | 
|  | 68 | env: | 
|  | 69 | - JOB="Docker Build ubuntu-focal 20.04 LTS" | 
|  | 70 | - DISTRO=ubuntu-focal | 
|  | 71 | - TRAVIS_BUILD_STAGE=docker | 
| Jiayu Liu | 564b287 | 2022-10-12 11:42:38 +0800 | [diff] [blame] | 72 | - script: true | 
|  | 73 | env: | 
|  | 74 | - JOB="Docker Build ubuntu-jammy 22.04 LTS" | 
|  | 75 | - DISTRO=ubuntu-jammy | 
|  | 76 | - TRAVIS_BUILD_STAGE=docker | 
| Roger Meier | 41ad434 | 2015-03-24 22:30:40 +0100 | [diff] [blame] | 77 |  | 
| James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 78 | # ========================= stage: thrift ======================= | 
|  | 79 | # ------------------------- phase: cross ------------------------ | 
| James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 80 | - stage: thrift | 
|  | 81 | script: build/docker/run.sh | 
| James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 82 | env: | 
|  | 83 | - JOB="Cross Language Tests (Binary Protocol)" | 
|  | 84 | - SCRIPT="cross-test.sh" | 
|  | 85 | - BUILD_ARG="-'(binary)'" | 
| James E. King, III | 65efdff | 2017-09-25 00:13:38 -0400 | [diff] [blame] | 86 |  | 
| James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 87 | - stage: thrift | 
|  | 88 | script: build/docker/run.sh | 
| James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 89 | env: | 
|  | 90 | - JOB="Cross Language Tests (Header, JSON Protocols)" | 
|  | 91 | - SCRIPT="cross-test.sh" | 
|  | 92 | - BUILD_ARG="-'(header|json)'" | 
| Nobuaki Sukegawa | e58ed1a | 2015-11-23 19:23:43 +0900 | [diff] [blame] | 93 |  | 
| James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 94 | - stage: thrift | 
|  | 95 | script: build/docker/run.sh | 
| James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 96 | env: | 
|  | 97 | - JOB="Cross Language Tests (Compact and Multiplexed Protocols)" | 
|  | 98 | - SCRIPT="cross-test.sh" | 
|  | 99 | - BUILD_ARG="-'(compact|multiplexed)'" | 
| Nobuaki Sukegawa | e58ed1a | 2015-11-23 19:23:43 +0900 | [diff] [blame] | 100 |  | 
| James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 101 | # ------------------------- phase: sca -------------------------- | 
|  | 102 | # QA jobs for code analytics and metrics | 
|  | 103 | - stage: thrift | 
|  | 104 | script: build/docker/run.sh | 
|  | 105 | env: | 
|  | 106 | - JOB="Static Code Analysis" | 
|  | 107 | - SCRIPT="sca.sh" | 
| James E. King, III | 65efdff | 2017-09-25 00:13:38 -0400 | [diff] [blame] | 108 |  | 
| James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 109 | # C and C++ undefined behavior. | 
|  | 110 | # A binary crashes if undefined behavior occurs and produces a stack trace. | 
|  | 111 | # python is disabled, see: THRIFT-4360 | 
|  | 112 | - script: build/docker/run.sh | 
|  | 113 | env: | 
|  | 114 | - JOB="UBSan" | 
|  | 115 | - SCRIPT="ubsan.sh" | 
| James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 116 | - BUILD_ARG="--without-python --without-py3" | 
| Roger Meier | 447294f | 2015-12-11 00:04:41 +0100 | [diff] [blame] | 117 |  | 
| James E. King III | 129f332 | 2018-06-27 21:08:08 +0000 | [diff] [blame] | 118 | # ------------------------- phase: autotools -------------------- | 
|  | 119 | # TODO: Remove them once migrated to CMake | 
| Jiayu Liu | 22b0781 | 2022-09-27 14:08:08 +0800 | [diff] [blame] | 120 |  | 
| Jiayu Liu | 564b287 | 2022-10-12 11:42:38 +0800 | [diff] [blame] | 121 | # TODO fix the missing python2 deps or get rid of python2 | 
|  | 122 | # - script: build/docker/run.sh | 
|  | 123 | #   env: | 
|  | 124 | #     - JOB="Autotools (Ubuntu Jammy)" | 
|  | 125 | #     - DISTRO=ubuntu-jammy | 
|  | 126 | #     - SCRIPT="autotools.sh" | 
|  | 127 |  | 
| Jiayu Liu | 22b0781 | 2022-09-27 14:08:08 +0800 | [diff] [blame] | 128 | - script: build/docker/run.sh | 
|  | 129 | env: | 
|  | 130 | - JOB="Autotools (Ubuntu Focal)" | 
|  | 131 | - DISTRO=ubuntu-focal | 
|  | 132 | - SCRIPT="autotools.sh" | 
|  | 133 |  | 
| James E. King III | 129f332 | 2018-06-27 21:08:08 +0000 | [diff] [blame] | 134 | - script: build/docker/run.sh | 
|  | 135 | env: | 
|  | 136 | - JOB="Autotools (Ubuntu Bionic)" | 
| Jiayu Liu | 22b0781 | 2022-09-27 14:08:08 +0800 | [diff] [blame] | 137 | - DISTRO=ubuntu-bionic | 
| James E. King III | 129f332 | 2018-06-27 21:08:08 +0000 | [diff] [blame] | 138 | - SCRIPT="autotools.sh" | 
|  | 139 |  | 
| James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 140 | # ------------------------- phase: cmake ------------------------ | 
|  | 141 | - script: build/docker/run.sh | 
|  | 142 | env: | 
| James E. King III | bf7f76b | 2018-02-28 17:11:05 -0500 | [diff] [blame] | 143 | - JOB="CMake" | 
| James E. King III | 98f379e | 2019-01-22 09:22:04 -0500 | [diff] [blame] | 144 | - BUILD_ARG="-DCMAKE_BUILD_TYPE=Debug" | 
|  | 145 |  | 
|  | 146 | - script: build/docker/run.sh | 
|  | 147 | env: | 
|  | 148 | - JOB="CMake" | 
|  | 149 | - BUILD_ARG="-DCMAKE_BUILD_TYPE=Release" | 
| Nobuaki Sukegawa | a10697a | 2014-12-21 19:43:22 +0900 | [diff] [blame] | 150 |  | 
| James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 151 | # ------------------------- phase: dist ------------------------- | 
|  | 152 | - script: build/docker/run.sh | 
|  | 153 | env: | 
|  | 154 | - JOB="make dist" | 
|  | 155 | - SCRIPT="make-dist.sh" | 
| Roger Meier | 447294f | 2015-12-11 00:04:41 +0100 | [diff] [blame] | 156 |  | 
| James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 157 | - script: build/docker/run.sh | 
|  | 158 | env: | 
|  | 159 | - JOB="Debian Packages" | 
|  | 160 | - SCRIPT="dpkg.sh" | 
| James E. King III | d907cc9 | 2018-01-12 10:43:25 -0500 | [diff] [blame] | 161 |  | 
| James E. King III | a3a5909 | 2018-06-27 21:05:57 +0000 | [diff] [blame] | 162 | # ------------------------- phase: coverity --------------------- | 
|  | 163 | # We build the coverity scan build once monthly using a travis cron job | 
|  | 164 | - if: (env(COVERITY_SCAN_NOTIFICATION_EMAIL) IS present) AND (branch IN (master)) AND (type IN (cron)) | 
|  | 165 | script: build/docker/run.sh | 
|  | 166 | env: | 
|  | 167 | - JOB="Coverity Scan" | 
|  | 168 | - SCRIPT="covscan.sh" | 
| Antoine Cœur | 08a6eb6 | 2019-07-08 18:42:09 +0800 | [diff] [blame] | 169 |  | 
|  | 170 | # ------------------------- phase: swift ------------------------ | 
|  | 171 | # We lint the podspec | 
|  | 172 | - os: osx | 
| Alexander Edge | b4711a6 | 2020-04-24 14:43:03 +0100 | [diff] [blame] | 173 | osx_image: xcode11.3 | 
| Antoine Cœur | 08a6eb6 | 2019-07-08 18:42:09 +0800 | [diff] [blame] | 174 | language: swift | 
|  | 175 | script: | 
|  | 176 | - gem update cocoapods | 
| Alexander Edge | b4711a6 | 2020-04-24 14:43:03 +0100 | [diff] [blame] | 177 | - pod lib lint --allow-warnings --swift-version=5.1 | 
| Antoine Cœur | 08a6eb6 | 2019-07-08 18:42:09 +0800 | [diff] [blame] | 178 | env: | 
|  | 179 | - JOB="pod lib lint" | 
| James E. King III | a3a5909 | 2018-06-27 21:05:57 +0000 | [diff] [blame] | 180 |  | 
|  | 181 | ### ------------------------- phase: osx -------------------------- | 
| James E. King III | bf7f76b | 2018-02-28 17:11:05 -0500 | [diff] [blame] | 182 | # disabled due to the time delays it imposes on build jobs | 
|  | 183 | # - os: osx | 
|  | 184 | #   osx_image: xcode9 | 
|  | 185 | #   script: build/docker/scripts/autotools.sh | 
|  | 186 |  |