Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Eric-Arellano/9a0e2fb0970a2cc696d7d752a51f475a to your computer and use it in GitHub Desktop.
Save Eric-Arellano/9a0e2fb0970a2cc696d7d752a51f475a to your computer and use it in GitHub Desktop.
# GENERATED, DO NOT EDIT!
# To change, edit build-support/travis/travis.yml.mustache and run
# ./pants --quiet run build-support/travis:generate_travis_yml > .travis.yml
#
# Tip: Copy the generated `.travis.yml` into https://yamlvalidator.com to validate the YAML
# and see how the entries resolve to normalized JSON (helpful to debug anchors).
# Conditions are documented here: https://docs.travis-ci.com/user/conditions-v1
conditions: v1
# -------------------------------------------------------------------------
# Global setup
# -------------------------------------------------------------------------
env:
global:
- PANTS_CONFIG_FILES="${TRAVIS_BUILD_DIR}/pants.travis-ci.ini"
- PYTEST_PASSTHRU_ARGS="-v --duration=3"
- LC_ALL="en_US.UTF-8"
- BOOTSTRAPPED_PEX_BUCKET=ci-public.pantsbuild.org
- BOOTSTRAPPED_PEX_KEY_PREFIX=${TRAVIS_BUILD_NUMBER}/${TRAVIS_BUILD_ID}/pants.pex
- BOOTSTRAPPED_PEX_URL_PREFIX=s3://${BOOTSTRAPPED_PEX_BUCKET}/${BOOTSTRAPPED_PEX_KEY_PREFIX}
# Stages are documented here: https://docs.travis-ci.com/user/build-stages
stages:
- &bootstrap Bootstrap Pants
- name: &test Test Pants
if: type != cron
- name: &cron Cron
if: type = cron
- name: &build_stable Deploy Pants Pex
if: tag IS present AND tag =~ ^release_.*$
- name: &build_unstable Deploy Pants Pex Unstable
if: tag IS NOT present AND type NOT IN (pull_request, cron)
# -------------------------------------------------------------------------
# Cache config
# -------------------------------------------------------------------------
# Travis cache config for jobs that build the native engine.
native_engine_cache_config: &native_engine_cache_config
before_cache:
# Ensure permissions to do the below removals, which happen with or without caching enabled.
- sudo chown -R travis:travis "${HOME}" "${TRAVIS_BUILD_DIR}"
# Kill all python bytecode in our cached venvs. Some files appear to
# get bytecode compiled in non-yet-understood circumstances leading to
# a full cache re-pack due to new bytecode files.
- find build-support -name "*.py[co]" -delete
cache:
# The default timeout is 180 seconds, and our larger cache uploads exceed this.
# TODO: Figure out why we have such large caches (2-7GB) and try to trim them.
timeout: 500
directories:
- ${HOME}/.cache/pants/rust/cargo
- build-support/pants_dev_deps.py27.venv
- build-support/pants_dev_deps.py36.venv
- build-support/pants_dev_deps.py37.venv
- src/rust/engine/target
# Travis cache config for jobs that run a bootstrapped pants.pex.
pants_run_cache_config: &pants_run_cache_config
before_cache:
# Ensure permissions to do the below removals, which happen with or without caching enabled.
- sudo chown -R travis:travis "${HOME}" "${TRAVIS_BUILD_DIR}"
# The `ivydata-*.properties` & root level `*.{properties,xml}` files'
# effect on resolution time is in the noise, but they are
# re-timestamped in internal comments and fields on each run and this
# leads to travis-ci cache thrash. Kill these files before the cache
# check to avoid un-needed cache re-packing and re-upload (a ~100s
# operation).
- find ${HOME}/.ivy2/pants -type f -name "ivydata-*.properties" -delete
- rm -f ${HOME}/.ivy2/pants/*.{css,properties,xml,xsl}
# We have several tests that do local file:// url resolves for
# com.example artifacts, these disrupt the cache but are fast since
# they're resolved from local files when omitted from the cache.
- rm -rf ${HOME}/.ivy2/pants/com.example
# Render a summary to assist with further tuning the cache.
- du -m -d2 ${HOME}/.cache/pants | sort -r -n
cache:
# The default timeout is 180 seconds, and our larger cache uploads exceed this.
# TODO: Figure out why we have such large caches (2-7GB) and try to trim them.
timeout: 500
directories:
- ${HOME}/.cache/pants/tools
- ${HOME}/.cache/pants/zinc
- ${HOME}/.ivy2/pants
# TODO(John Sirois): Update this to ~/.npm/pants when pants starts
# using its own isolated cache:
# https://github.com/pantsbuild/pants/issues/2485
- ${HOME}/.npm
# -------------------------------------------------------------------------
# Generic shard setups
# -------------------------------------------------------------------------
base_linux_config: &base_linux_config
os: linux
dist: xenial
sudo: required
addons:
apt:
packages:
- lib32stdc++6
- lib32z1
- lib32z1-dev
- gcc-multilib
- python-dev
- openssl
- libssl-dev
- jq
- unzip
language: python
before_install:
- ./build-support/bin/install_aws_cli_for_ci.sh
after_failure:
- ./build-support/bin/ci-failure.sh
py27_linux_config: &py27_linux_config
<<: *base_linux_config
python: &python2_version "2.7"
py36_linux_config: &py36_linux_config
<<: *base_linux_config
python: &python3_version "3.6"
base_linux_test_config: &base_linux_test_config
<<: *base_linux_config
<<: *pants_run_cache_config
before_install:
- PATH="/usr/lib/jvm/java-8-openjdk-amd64/jre/bin":$PATH
- JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
# Increase the max number of user watches to ensure that watchman is able to watch all
# files in the working copy.
- sudo sysctl fs.inotify.max_user_watches=524288
- ./build-support/bin/install_aws_cli_for_ci.sh
before_script:
- ./build-support/bin/get_ci_bootstrapped_pants_pex.sh ${BOOTSTRAPPED_PEX_BUCKET} ${BOOTSTRAPPED_PEX_KEY_PREFIX}.${BOOTSTRAPPED_PEX_KEY_SUFFIX}
py27_linux_test_config: &py27_linux_test_config
<<: *py27_linux_config
<<: *base_linux_test_config
stage: *cron
env:
- &py27_linux_test_config_env BOOTSTRAPPED_PEX_KEY_SUFFIX=py27.linux
py36_linux_test_config: &py36_linux_test_config
<<: *py36_linux_config
<<: *base_linux_test_config
stage: *test
env:
- &py36_linux_test_config_env BOOTSTRAPPED_PEX_KEY_SUFFIX=py36.linux
base_osx_config: &base_osx_config
os: osx
language: generic
before_install:
- curl -L https://github.com/stedolan/jq/releases/download/jq-1.5/jq-osx-amd64 -o /usr/local/bin/jq
- chmod 755 /usr/local/bin/jq
- ./build-support/bin/install_aws_cli_for_ci.sh
py27_osx_config: &py27_osx_config
<<: *base_osx_config
py36_osx_config: &py36_osx_config
<<: *base_osx_config
addons:
brew:
packages: &py36_osx_config_brew_packages
- openssl
env:
- &py36_osx_config_env >
PATH="/usr/local/opt/openssl/bin:$PATH"
LDFLAGS="-L/usr/local/opt/openssl/lib"
CPPFLAGS="-I/usr/local/opt/openssl/include"
PYENV_ROOT="${HOME}/.pyenv"
PATH="${PYENV_ROOT}/shims:${PATH}"
before_install:
- curl -L https://github.com/stedolan/jq/releases/download/jq-1.5/jq-osx-amd64 -o /usr/local/bin/jq
- chmod 755 /usr/local/bin/jq
- ./build-support/bin/install_aws_cli_for_ci.sh
# Clone pyenv directly from GitHub. For multiple osx images, brew's version of pyenv is too old to get
# modern Python 3.6. Pulling from GitHub instead allows us to use the same Python 3 version accross every OSX shard.
- git clone https://github.com/pyenv/pyenv ${PYENV_ROOT}
- ${PYENV_ROOT}/bin/pyenv install 3.6.8
- ${PYENV_ROOT}/bin/pyenv global 3.6.8
base_osx_test_config: &base_osx_test_config
<<: *pants_run_cache_config
before_script:
- ulimit -c unlimited
- ulimit -n 8192
- ./build-support/bin/get_ci_bootstrapped_pants_pex.sh ${BOOTSTRAPPED_PEX_BUCKET} ${BOOTSTRAPPED_PEX_KEY_PREFIX}.${BOOTSTRAPPED_PEX_KEY_SUFFIX}
py27_osx_test_config: &py27_osx_test_config
<<: *py27_osx_config
<<: *base_osx_test_config
stage: *cron
env:
- &py27_osx_test_config_env BOOTSTRAPPED_PEX_KEY_SUFFIX=py27.osx
py36_osx_test_config: &py36_osx_test_config
<<: *py36_osx_config
<<: *base_osx_test_config
stage: *test
env:
# Must duplicate py36_osx_config's env because it cannot be merged into a new anchor
- &py36_osx_test_config_env >
PATH="/usr/local/opt/openssl/bin:$PATH"
LDFLAGS="-L/usr/local/opt/openssl/lib"
CPPFLAGS="-I/usr/local/opt/openssl/include"
PYENV_ROOT="${HOME}/.pyenv"
PATH="${PYENV_ROOT}/shims:${PATH}"
BOOTSTRAPPED_PEX_KEY_SUFFIX=py36.osx
linux_with_fuse: &linux_with_fuse
before_install:
- PATH="/usr/lib/jvm/java-8-openjdk-amd64/jre/bin":$PATH
- JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
# Increase the max number of user watches to ensure that watchman is able to watch all
# files in the working copy.
- sudo sysctl fs.inotify.max_user_watches=524288
- ./build-support/bin/install_aws_cli_for_ci.sh
- sudo apt-get install -y pkg-config fuse libfuse-dev
- sudo modprobe fuse
- sudo chmod 666 /dev/fuse
- sudo chown root:$USER /etc/fuse.conf
travis_docker_image: &travis_docker_image
services:
- docker
before_script:
- ulimit -c unlimited
script:
# NB: This script definition is very likely to be overridden in a consumer, so we alias it
# for re-inclusion.
- &travis_docker_image_launch docker build --rm -t travis_ci
--build-arg "TRAVIS_USER=$(id -un)"
--build-arg "TRAVIS_UID=$(id -u)"
--build-arg "TRAVIS_GROUP=$(id -gn)"
--build-arg "TRAVIS_GID=$(id -g)"
build-support/docker/travis_ci/
# -------------------------------------------------------------------------
# Bootstrap engine shards
# -------------------------------------------------------------------------
base_linux_build_engine: &base_linux_build_engine
<<: *native_engine_cache_config
<<: *travis_docker_image
stage: *bootstrap
script:
- *travis_docker_image_launch
# Note that:
# * We mount ${HOME} to cache the ${HOME}/.cache/pants/rust-toolchain.
# * We also build fs_util, to take advantage of the rust code built during bootstrapping.
- docker run --rm -t
-v "${HOME}:/travis/home"
-v "${TRAVIS_BUILD_DIR}:/travis/workdir"
travis_ci:latest
sh -c "./build-support/bin/ci.sh ${BOOTSTRAP_ARGS} && ./build-support/bin/release.sh -f"
- aws --no-sign-request --region us-east-1 s3 cp ${TRAVIS_BUILD_DIR}/pants.pex ${BOOTSTRAPPED_PEX_URL_PREFIX}.${BOOTSTRAPPED_PEX_KEY_SUFFIX}
py27_linux_build_engine: &py27_linux_build_engine
<<: *py27_linux_config
<<: *base_linux_build_engine
name: "Build Linux native engine and pants.pex (Py2.7 PEX)"
env:
# NB: Only the Py2.7 shard sets PREPARE_DEPLOY to cause the fs_util binary to be uploaded to S3:
# either linux shard could upload this binary, since it does not depend on python at all.
- PREPARE_DEPLOY=1
- CACHE_NAME=linuxpexbuild.py27
- BOOTSTRAPPED_PEX_KEY_SUFFIX=py27.linux
- BOOTSTRAP_ARGS='-2b'
py36_linux_build_engine: &py36_linux_build_engine
<<: *py36_linux_config
<<: *base_linux_build_engine
name: "Build Linux native engine and pants.pex (Py3.6 PEX)"
env:
- CACHE_NAME=linuxpexbuild.py36
- BOOTSTRAPPED_PEX_KEY_SUFFIX=py36.linux
- BOOTSTRAP_ARGS='-b'
base_osx_build_engine: &base_osx_build_engine
<<: *native_engine_cache_config
stage: *bootstrap
# We request the oldest image we can (corresponding to OSX 10.11) for maximum compatibility.
# We use 10.11 as a minimum to avoid https://github.com/rust-lang/regex/issues/489.
# See: https://docs.travis-ci.com/user/reference/osx/#OS-X-Version
osx_image: xcode8
env:
- &base_osx_build_engine_env PREPARE_DEPLOY=1 # To deploy fs_util.
script:
# We also build fs_util, to take advantage of the rust code built during bootstrapping.
- ./build-support/bin/ci.sh ${BOOTSTRAP_ARGS} && ./build-support/bin/release.sh -f
- aws --no-sign-request --region us-east-1 s3 cp ${TRAVIS_BUILD_DIR}/pants.pex ${BOOTSTRAPPED_PEX_URL_PREFIX}.${BOOTSTRAPPED_PEX_KEY_SUFFIX}
after_failure:
- ./build-support/bin/ci-failure.sh
py27_osx_build_engine: &py27_osx_build_engine
<<: *py27_osx_config
<<: *base_osx_build_engine
name: "Build OSX native engine and pants.pex (Py2.7 PEX)"
env:
- *base_osx_build_engine_env
- CACHE_NAME=osxpexbuild.py27
- BOOTSTRAPPED_PEX_KEY_SUFFIX=py27.osx
- BOOTSTRAP_ARGS='-2b'
py36_osx_build_engine: &py36_osx_build_engine
<<: *py36_osx_config
<<: *base_osx_build_engine
name: "Build OSX native engine and pants.pex (Py3.6 PEX)"
env:
- *base_osx_build_engine_env
- *py36_osx_config_env
- CACHE_NAME=osxpexbuild.py36
- BOOTSTRAPPED_PEX_KEY_SUFFIX=py36.osx
- BOOTSTRAP_ARGS='-b'
# -------------------------------------------------------------------------
# Lint
# -------------------------------------------------------------------------
py27_lint: &py27_lint
<<: *py27_linux_test_config
name: "Self-checks and lint (Py2.7 PEX)"
env:
- *py27_linux_test_config_env
- CACHE_NAME=linuxselfchecks.py27
script:
- ./build-support/bin/travis-ci.sh -fmrt2
py36_lint: &py36_lint
<<: *py36_linux_test_config
name: "Self-checks and lint (Py3.6 PEX)"
env:
- *py36_linux_test_config_env
- CACHE_NAME=linuxselfchecks.py36
script:
- ./build-support/bin/travis-ci.sh -fmrt
# -------------------------------------------------------------------------
# Rust lints
# -------------------------------------------------------------------------
linux_rust_clippy: &linux_rust_clippy
<<: *linux_with_fuse
<<: *native_engine_cache_config
name: "Linux Rust Clippy (No PEX)"
env:
- CACHE_NAME=linuxclippy
os: linux
dist: xenial
sudo: required
stage: *test
language: python
python: *python3_version
before_script:
- ulimit -c unlimited
- ulimit -n 8192
script:
- ./build-support/bin/travis-ci.sh -s
cargo_audit: &cargo_audit
<<: *linux_with_fuse
name: "Cargo audit (No PEX)"
env:
- CACHE_NAME=linuxcargoaudit
os: linux
dist: xenial
sudo: required
stage: *cron
script:
- ./build-support/bin/travis-ci.sh -a
# -------------------------------------------------------------------------
# Build wheels
# -------------------------------------------------------------------------
# N.B. With Python 2, we must build pantsbuild.pants with both UCS2 and UCS4 to provide full
# compatibility for end users. This is because we constrain our ABI due to the native engine.
# See https://www.python.org/dev/peps/pep-0513/#ucs-2-vs-ucs-4-builds. Note this distinction is
# not necessary with Python 3.3+ due to flexible storage of Unicode strings (https://www.python.org/dev/peps/pep-0393/).
#
# We treat both Linux UCS4 and OSX UCS2 normally, as these are the defaults for those environments.
# The Linux UCS2 and OSX UCS4 shards, however, must rebuild Python with
# `PYTHON_CONFIGURE_OPTS=--enable-unicode=ucs{2,4}` set, along with bootstrapping Pants again rather
# than pulling the PEX from AWS.
base_build_wheels: &base_build_wheels
stage: *test
env:
- &base_build_wheels_env PREPARE_DEPLOY=1
py27_linux_build_wheels_no_ucs: &py27_linux_build_wheels_no_ucs
# Similar to the bootstrap shard, we build Linux wheels in a docker image to maximize
# compatibility. This is a Py2.7 shard, so it is not subject to #6985.
<<: *travis_docker_image
<<: *base_build_wheels
py27_linux_build_wheels_ucs2: &py27_linux_build_wheels_ucs2
<<: *py27_linux_config
<<: *py27_linux_build_wheels_no_ucs
<<: *native_engine_cache_config
name: "Build wheels - Linux and cp27m (UCS2)"
env:
- *base_build_wheels_env
- CACHE_NAME=linuxwheelsbuild.ucs2
script:
- docker build --rm -t travis_ci_py27_ucs2
--build-arg "TRAVIS_USER=$(id -un)"
--build-arg "TRAVIS_UID=$(id -u)"
--build-arg "TRAVIS_GROUP=$(id -gn)"
--build-arg "TRAVIS_GID=$(id -g)"
build-support/docker/travis_ci_py27_ucs2/
- &docker_dry_run_release docker run --rm -t
-v "${HOME}:/travis/home"
-v "${TRAVIS_BUILD_DIR}:/travis/workdir"
travis_ci_py27_ucs2:latest
sh -c "./build-support/bin/ci.sh -2b
&& ./build-support/bin/check_pants_pex_abi.sh cp27m
&& RUN_PANTS_FROM_PEX=1 ./build-support/bin/release.sh -n"
py27_linux_build_wheels_ucs4: &py27_linux_build_wheels_ucs4
<<: *py27_linux_build_wheels_no_ucs
<<: *py27_linux_test_config
# `py27_linux_test_config` overrides the stage set by `base_build_wheels`, so we re-override it.
stage: *test
name: "Build wheels - Linux and cp27mu (UCS4)"
env:
- *py27_linux_test_config_env
- *base_build_wheels_env
- CACHE_NAME=linuxwheelsbuild.ucs4
script:
- *travis_docker_image_launch
- docker run --rm -t
-v "${HOME}:/travis/home"
-v "${TRAVIS_BUILD_DIR}:/travis/workdir"
travis_ci:latest
sh -c "./build-support/bin/check_pants_pex_abi.sh cp27mu
&& RUN_PANTS_FROM_PEX=1 ./build-support/bin/release.sh -n"
py27_osx_build_wheels_no_ucs: &py27_osx_build_wheels_no_ucs
<<: *base_build_wheels
osx_image: xcode8
py27_osx_build_wheels_ucs2: &py27_osx_build_wheels_ucs2
<<: *py27_osx_test_config
<<: *py27_osx_build_wheels_no_ucs
name: "Build wheels - OSX and cp27m (UCS2)"
env:
- *py27_osx_test_config_env
- *base_build_wheels_env
- CACHE_NAME=osxwheelsbuild.ucs2
script:
- ./build-support/bin/check_pants_pex_abi.sh cp27m
- RUN_PANTS_FROM_PEX=1 ./build-support/bin/release.sh -n
py27_osx_build_wheels_ucs4: &py27_osx_build_wheels_ucs4
<<: *py27_osx_config
<<: *py27_osx_build_wheels_no_ucs
<<: *native_engine_cache_config
name: "Build wheels - OSX and cp27mu (UCS4)"
addons:
brew:
packages:
- openssl
env:
- *base_build_wheels_env
- CACHE_NAME=osxwheelsbuild.ucs4
- PATH="/usr/local/opt/openssl/bin:$PATH"
LDFLAGS="-L/usr/local/opt/openssl/lib"
CPPFLAGS="-I/usr/local/opt/openssl/include"
PYENV_ROOT="${HOME}/.pyenv"
PATH="${PYENV_ROOT}/shims:${PATH}"
- PYTHON_CONFIGURE_OPTS=--enable-unicode=ucs4
# We set $PY to ensure the UCS4 interpreter is used when bootstrapping the PEX.
- PY=${PYENV_ROOT}/shims/python2.7
before_install:
- curl -L https://github.com/stedolan/jq/releases/download/jq-1.5/jq-osx-amd64 -o /usr/local/bin/jq
- chmod 755 /usr/local/bin/jq
- ./build-support/bin/install_aws_cli_for_ci.sh
- git clone https://github.com/pyenv/pyenv ${PYENV_ROOT}
- ${PYENV_ROOT}/bin/pyenv install 2.7.13
- ${PYENV_ROOT}/bin/pyenv global 2.7.13
script:
- ./build-support/bin/ci.sh -2b
- ./build-support/bin/check_pants_pex_abi.sh cp27mu
- RUN_PANTS_FROM_PEX=1 ./build-support/bin/release.sh -n
# -------------------------------------------------------------------------
# Rust tests
# -------------------------------------------------------------------------
base_rust_tests: &base_rust_tests
<<: *native_engine_cache_config
stage: *test
before_script:
- ulimit -c unlimited
- ulimit -n 8192
linux_rust_tests: &linux_rust_tests
<<: *base_rust_tests
<<: *linux_with_fuse
name: "Linux Rust tests (No PEX)"
env:
- CACHE_NAME=linuxrusttests
os: linux
dist: xenial
sudo: required
language: python
python: *python3_version
script:
- ./build-support/bin/travis-ci.sh -e
osx_rust_tests: &osx_rust_tests
<<: *base_rust_tests
name: "OSX Rust tests (No PEX)"
env:
- CACHE_NAME=macosrusttests
os: osx
# Fuse actually works on this image. It hangs on many others.
osx_image: xcode8.3
addons:
homebrew:
casks:
- osxfuse
script:
# N.B. We run this with Python 2 because this osx_image does not have
# Python 3.6 in its environment. We do not care which Python version
# we use and do not want to incur the cost of using pyenv to get 3.6.
- ./build-support/bin/travis-ci.sh -e2
# -------------------------------------------------------------------------
# OSX sanity checks
# -------------------------------------------------------------------------
base_osx_sanity_check: &base_osx_sanity_check
script:
- MODE=debug ./build-support/bin/travis-ci.sh -m
# TODO: Update this to use 10.14 once it is available
base_osx_10_12_sanity_check: &base_osx_10_12_sanity_check
<<: *base_osx_sanity_check
osx_image: xcode9.2
py27_osx_10_12_sanity_check: &py27_osx_10_12_sanity_check
<<: *py27_osx_test_config
<<: *base_osx_10_12_sanity_check
name: "OSX 10.12 sanity check (Py2.7 PEX)"
env:
- *py27_osx_test_config_env
- CACHE_NAME=macos10.12sanity.py27
py36_osx_10_12_sanity_check: &py36_osx_10_12_sanity_check
<<: *py36_osx_test_config
<<: *base_osx_10_12_sanity_check
name: "OSX 10.12 sanity check (Py3.6 PEX)"
env:
- *py36_osx_test_config_env
- CACHE_NAME=macos10.12sanity.py36
base_osx_10_13_sanity_check: &base_osx_10_13_sanity_check
<<: *base_osx_sanity_check
osx_image: xcode10.1
py27_osx_10_13_sanity_check: &py27_osx_10_13_sanity_check
<<: *py27_osx_test_config
<<: *base_osx_10_13_sanity_check
name: "OSX 10.13 sanity check (Py2.7 PEX)"
env:
- *py27_osx_test_config_env
- CACHE_NAME=macos10.13sanity.py27
py36_osx_10_13_sanity_check: &py36_osx_10_13_sanity_check
<<: *py36_osx_test_config
<<: *base_osx_10_13_sanity_check
name: "OSX 10.13 sanity check (Py3.6 PEX)"
env:
- *py36_osx_test_config_env
- CACHE_NAME=macos10.13sanity.py36
# -------------------------------------------------------------------------
# Platform specific tests
# -------------------------------------------------------------------------
py27_osx_platform_tests: &py27_osx_platform_tests
<<: *py27_osx_test_config
name: "OSX platform-specific tests (Py2.7 PEX)"
env:
- *py27_osx_test_config_env
- CACHE_NAME=macosplatformtests.py27
script:
- ./build-support/bin/travis-ci.sh -z2
py36_osx_platform_tests: &py36_osx_platform_tests
<<: *py36_osx_test_config
name: "OSX platform-specific tests (Py3.6 PEX)"
env:
- *py36_osx_test_config_env
- CACHE_NAME=macosplatformtests.py36
script:
- ./build-support/bin/travis-ci.sh -z
# -------------------------------------------------------------------------
# JVM tests
# -------------------------------------------------------------------------
base_jvm_tests: &base_jvm_tests
<<: *linux_with_fuse
py27_jvm_tests: &py27_jvm_tests
<<: *py27_linux_test_config
<<: *base_jvm_tests
name: "JVM tests (Py2.7 PEX)"
env:
- *py27_linux_test_config_env
- CACHE_NAME=linuxjvmtests.py27
script:
- ./build-support/bin/travis-ci.sh -j2
py36_jvm_tests: &py36_jvm_tests
<<: *py36_linux_test_config
<<: *base_jvm_tests
name: "JVM tests (Py3.6 PEX)"
env:
- *py36_linux_test_config_env
- CACHE_NAME=linuxjvmtests.py36
script:
- ./build-support/bin/travis-ci.sh -j
# -------------------------------------------------------------------------
# Deploy
# -------------------------------------------------------------------------
deploy_stable_multiplatform_pex: &deploy_stable_multiplatform_pex
name: "Deploy stable multiplatform pants.pex"
os: linux
language: python
stage: *build_stable
env:
- CACHE_NAME=linuxpexdeploystable
- RUN_PANTS_FROM_PEX=1
- PANTS_PEX_RELEASE=stable
script:
- ./build-support/bin/release.sh -p
deploy:
# See https://docs.travis-ci.com/user/deployment/releases/
provider: releases
# The pantsbuild-ci-bot OAuth token, see the pantsbuild vault for details.
api_key:
secure: "u0aCsiuVGOg28YxG0sQUovuUm29kKwQfFgHbNz2TT5L+cGoHxGl4aoVOCtuwWYEtbNGmYc8/3WRS3C/jOiqQj6JEgHUzWOsnfKUObEqNhisAmXbzBbKc0wPQTL8WNK+DKFh32sD3yPYcw+a5PTLO56+o7rqlI25LK7A17WesHC4="
file_glob: true
file: dist/deploy/pex/*
skip_cleanup: true
on:
# We only release a pex for Pants releases, which are tagged.
tags: true
repo: pantsbuild/pants
deploy_unstable_multiplatform_pex: &deploy_unstable_multiplatform_pex
name: "Deploy unstable multiplatform pants.pex"
os: linux
language: python
stage: *build_unstable
env:
- CACHE_NAME=linuxpexdeployunstable
- RUN_PANTS_FROM_PEX=1
- PREPARE_DEPLOY=1
script:
- ./build-support/bin/release.sh -p && mkdir -p dist/deploy/pex/ && mv dist/pants*.pex dist/deploy/pex/
# -------------------------------------------------------------------------
# Test matrix
# -------------------------------------------------------------------------
matrix:
include:
- <<: *py27_linux_build_engine
- <<: *py36_linux_build_engine
- <<: *py27_osx_build_engine
- <<: *py36_osx_build_engine
- <<: *py27_lint
- <<: *py36_lint
- <<: *linux_rust_clippy
- <<: *cargo_audit
- <<: *py27_linux_test_config
name: "Unit tests for pants and pants-plugins (Py2.7 PEX)"
stage: *test
env:
- *py27_linux_test_config_env
- CACHE_NAME=linuxunittests.py27
script:
- ./build-support/bin/travis-ci.sh -2lp
- <<: *py36_linux_test_config
name: "Unit tests for pants and pants-plugins (Py3.6 PEX)"
env:
- *py36_linux_test_config_env
- CACHE_NAME=linuxunittests.py36
script:
- ./build-support/bin/travis-ci.sh -lp
- <<: *py27_linux_build_wheels_ucs2
- <<: *py27_linux_build_wheels_ucs4
- <<: *py27_osx_build_wheels_ucs2
- <<: *py27_osx_build_wheels_ucs4
- <<: *py36_linux_test_config
name: "Integration tests for pants - shard 0 (Py3.6 PEX)"
env:
- *py36_linux_test_config_env
- CACHE_NAME=integrationshard0
script:
- ./build-support/bin/travis-ci.sh -c -i 0/19
- <<: *py36_linux_test_config
name: "Integration tests for pants - shard 1 (Py3.6 PEX)"
env:
- *py36_linux_test_config_env
- CACHE_NAME=integrationshard1
script:
- ./build-support/bin/travis-ci.sh -c -i 1/19
- <<: *py36_linux_test_config
name: "Integration tests for pants - shard 2 (Py3.6 PEX)"
env:
- *py36_linux_test_config_env
- CACHE_NAME=integrationshard2
script:
- ./build-support/bin/travis-ci.sh -c -i 2/19
- <<: *py36_linux_test_config
name: "Integration tests for pants - shard 3 (Py3.6 PEX)"
env:
- *py36_linux_test_config_env
- CACHE_NAME=integrationshard3
script:
- ./build-support/bin/travis-ci.sh -c -i 3/19
- <<: *py36_linux_test_config
name: "Integration tests for pants - shard 4 (Py3.6 PEX)"
env:
- *py36_linux_test_config_env
- CACHE_NAME=integrationshard4
script:
- ./build-support/bin/travis-ci.sh -c -i 4/19
- <<: *py36_linux_test_config
name: "Integration tests for pants - shard 5 (Py3.6 PEX)"
env:
- *py36_linux_test_config_env
- CACHE_NAME=integrationshard5
script:
- ./build-support/bin/travis-ci.sh -c -i 5/19
- <<: *py36_linux_test_config
name: "Integration tests for pants - shard 6 (Py3.6 PEX)"
env:
- *py36_linux_test_config_env
- CACHE_NAME=integrationshard6
script:
- ./build-support/bin/travis-ci.sh -c -i 6/19
- <<: *py36_linux_test_config
name: "Integration tests for pants - shard 7 (Py3.6 PEX)"
env:
- *py36_linux_test_config_env
- CACHE_NAME=integrationshard7
script:
- ./build-support/bin/travis-ci.sh -c -i 7/19
- <<: *py36_linux_test_config
name: "Integration tests for pants - shard 8 (Py3.6 PEX)"
env:
- *py36_linux_test_config_env
- CACHE_NAME=integrationshard8
script:
- ./build-support/bin/travis-ci.sh -c -i 8/19
- <<: *py36_linux_test_config
name: "Integration tests for pants - shard 9 (Py3.6 PEX)"
env:
- *py36_linux_test_config_env
- CACHE_NAME=integrationshard9
script:
- ./build-support/bin/travis-ci.sh -c -i 9/19
- <<: *py36_linux_test_config
name: "Integration tests for pants - shard 10 (Py3.6 PEX)"
env:
- *py36_linux_test_config_env
- CACHE_NAME=integrationshard10
script:
- ./build-support/bin/travis-ci.sh -c -i 10/19
- <<: *py36_linux_test_config
name: "Integration tests for pants - shard 11 (Py3.6 PEX)"
env:
- *py36_linux_test_config_env
- CACHE_NAME=integrationshard11
script:
- ./build-support/bin/travis-ci.sh -c -i 11/19
- <<: *py36_linux_test_config
name: "Integration tests for pants - shard 12 (Py3.6 PEX)"
env:
- *py36_linux_test_config_env
- CACHE_NAME=integrationshard12
script:
- ./build-support/bin/travis-ci.sh -c -i 12/19
- <<: *py36_linux_test_config
name: "Integration tests for pants - shard 13 (Py3.6 PEX)"
env:
- *py36_linux_test_config_env
- CACHE_NAME=integrationshard13
script:
- ./build-support/bin/travis-ci.sh -c -i 13/19
- <<: *py36_linux_test_config
name: "Integration tests for pants - shard 14 (Py3.6 PEX)"
env:
- *py36_linux_test_config_env
- CACHE_NAME=integrationshard14
script:
- ./build-support/bin/travis-ci.sh -c -i 14/19
- <<: *py36_linux_test_config
name: "Integration tests for pants - shard 15 (Py3.6 PEX)"
env:
- *py36_linux_test_config_env
- CACHE_NAME=integrationshard15
script:
- ./build-support/bin/travis-ci.sh -c -i 15/19
- <<: *py36_linux_test_config
name: "Integration tests for pants - shard 16 (Py3.6 PEX)"
env:
- *py36_linux_test_config_env
- CACHE_NAME=integrationshard16
script:
- ./build-support/bin/travis-ci.sh -c -i 16/19
- <<: *py36_linux_test_config
name: "Integration tests for pants - shard 17 (Py3.6 PEX)"
env:
- *py36_linux_test_config_env
- CACHE_NAME=integrationshard17
script:
- ./build-support/bin/travis-ci.sh -c -i 17/19
- <<: *py36_linux_test_config
name: "Integration tests for pants - shard 18 (Py3.6 PEX)"
env:
- *py36_linux_test_config_env
- CACHE_NAME=integrationshard18
script:
- ./build-support/bin/travis-ci.sh -c -i 18/19
- <<: *py27_linux_test_config
name: "Blacklisted integration tests for pants - shard 0 (Py2.7 PEX w/ Py3.6 constraints)"
stage: *test
env:
- *py27_linux_test_config_env
- PANTS_PYTHON_SETUP_INTERPRETER_CONSTRAINTS="['CPython>=3.6']"
- CACHE_NAME=integrationshard0.py27blacklist
script:
- ./build-support/bin/travis-ci.sh -c2w -i 0/1
- <<: *py27_linux_test_config
name: "Integration tests for pants - shard 0 (Py2.7 PEX)"
env:
- *py27_linux_test_config_env
- CACHE_NAME=cronshard0
script:
- ./build-support/bin/travis-ci.sh -c2 -i 0/20
- <<: *py27_linux_test_config
name: "Integration tests for pants - shard 1 (Py2.7 PEX)"
env:
- *py27_linux_test_config_env
- CACHE_NAME=cronshard1
script:
- ./build-support/bin/travis-ci.sh -c2 -i 1/20
- <<: *py27_linux_test_config
name: "Integration tests for pants - shard 2 (Py2.7 PEX)"
env:
- *py27_linux_test_config_env
- CACHE_NAME=cronshard2
script:
- ./build-support/bin/travis-ci.sh -c2 -i 2/20
- <<: *py27_linux_test_config
name: "Integration tests for pants - shard 3 (Py2.7 PEX)"
env:
- *py27_linux_test_config_env
- CACHE_NAME=cronshard3
script:
- ./build-support/bin/travis-ci.sh -c2 -i 3/20
- <<: *py27_linux_test_config
name: "Integration tests for pants - shard 4 (Py2.7 PEX)"
env:
- *py27_linux_test_config_env
- CACHE_NAME=cronshard4
script:
- ./build-support/bin/travis-ci.sh -c2 -i 4/20
- <<: *py27_linux_test_config
name: "Integration tests for pants - shard 5 (Py2.7 PEX)"
env:
- *py27_linux_test_config_env
- CACHE_NAME=cronshard5
script:
- ./build-support/bin/travis-ci.sh -c2 -i 5/20
- <<: *py27_linux_test_config
name: "Integration tests for pants - shard 6 (Py2.7 PEX)"
env:
- *py27_linux_test_config_env
- CACHE_NAME=cronshard6
script:
- ./build-support/bin/travis-ci.sh -c2 -i 6/20
- <<: *py27_linux_test_config
name: "Integration tests for pants - shard 7 (Py2.7 PEX)"
env:
- *py27_linux_test_config_env
- CACHE_NAME=cronshard7
script:
- ./build-support/bin/travis-ci.sh -c2 -i 7/20
- <<: *py27_linux_test_config
name: "Integration tests for pants - shard 8 (Py2.7 PEX)"
env:
- *py27_linux_test_config_env
- CACHE_NAME=cronshard8
script:
- ./build-support/bin/travis-ci.sh -c2 -i 8/20
- <<: *py27_linux_test_config
name: "Integration tests for pants - shard 9 (Py2.7 PEX)"
env:
- *py27_linux_test_config_env
- CACHE_NAME=cronshard9
script:
- ./build-support/bin/travis-ci.sh -c2 -i 9/20
- <<: *py27_linux_test_config
name: "Integration tests for pants - shard 10 (Py2.7 PEX)"
env:
- *py27_linux_test_config_env
- CACHE_NAME=cronshard10
script:
- ./build-support/bin/travis-ci.sh -c2 -i 10/20
- <<: *py27_linux_test_config
name: "Integration tests for pants - shard 11 (Py2.7 PEX)"
env:
- *py27_linux_test_config_env
- CACHE_NAME=cronshard11
script:
- ./build-support/bin/travis-ci.sh -c2 -i 11/20
- <<: *py27_linux_test_config
name: "Integration tests for pants - shard 12 (Py2.7 PEX)"
env:
- *py27_linux_test_config_env
- CACHE_NAME=cronshard12
script:
- ./build-support/bin/travis-ci.sh -c2 -i 12/20
- <<: *py27_linux_test_config
name: "Integration tests for pants - shard 13 (Py2.7 PEX)"
env:
- *py27_linux_test_config_env
- CACHE_NAME=cronshard13
script:
- ./build-support/bin/travis-ci.sh -c2 -i 13/20
- <<: *py27_linux_test_config
name: "Integration tests for pants - shard 14 (Py2.7 PEX)"
env:
- *py27_linux_test_config_env
- CACHE_NAME=cronshard14
script:
- ./build-support/bin/travis-ci.sh -c2 -i 14/20
- <<: *py27_linux_test_config
name: "Integration tests for pants - shard 15 (Py2.7 PEX)"
env:
- *py27_linux_test_config_env
- CACHE_NAME=cronshard15
script:
- ./build-support/bin/travis-ci.sh -c2 -i 15/20
- <<: *py27_linux_test_config
name: "Integration tests for pants - shard 16 (Py2.7 PEX)"
env:
- *py27_linux_test_config_env
- CACHE_NAME=cronshard16
script:
- ./build-support/bin/travis-ci.sh -c2 -i 16/20
- <<: *py27_linux_test_config
name: "Integration tests for pants - shard 17 (Py2.7 PEX)"
env:
- *py27_linux_test_config_env
- CACHE_NAME=cronshard17
script:
- ./build-support/bin/travis-ci.sh -c2 -i 17/20
- <<: *py27_linux_test_config
name: "Integration tests for pants - shard 18 (Py2.7 PEX)"
env:
- *py27_linux_test_config_env
- CACHE_NAME=cronshard18
script:
- ./build-support/bin/travis-ci.sh -c2 -i 18/20
- <<: *py27_linux_test_config
name: "Integration tests for pants - shard 19 (Py2.7 PEX)"
env:
- *py27_linux_test_config_env
- CACHE_NAME=cronshard19
script:
- ./build-support/bin/travis-ci.sh -c2 -i 19/20
- <<: *linux_rust_tests
- <<: *osx_rust_tests
- <<: *py27_linux_test_config
name: "Python contrib tests (Py2.7 PEX)"
stage: *test
env:
- *py27_linux_test_config_env
- CACHE_NAME=linuxcontribtests.py27
script:
- ./build-support/bin/travis-ci.sh -2n
- <<: *py36_linux_test_config
name: "Python contrib tests (Py3.6 PEX)"
env:
- *py36_linux_test_config_env
- CACHE_NAME=linuxcontribtests.py36
script:
- ./build-support/bin/travis-ci.sh -n
- <<: *py27_osx_10_12_sanity_check
- <<: *py36_osx_10_12_sanity_check
- <<: *py27_osx_10_13_sanity_check
- <<: *py36_osx_10_13_sanity_check
- <<: *py27_osx_platform_tests
- <<: *py36_osx_platform_tests
- <<: *py27_jvm_tests
- <<: *py36_jvm_tests
- <<: *deploy_stable_multiplatform_pex
- <<: *deploy_unstable_multiplatform_pex
deploy:
# Deploy whatever a previous stage has left in dist/deploy.
# See: https://docs.travis-ci.com/user/deployment/s3/
provider: s3
access_key_id: AKIAIWOKBXVU3JLY6EGQ
secret_access_key:
secure: "UBVbpdYJ81OsDGKlPRBw6FlPJGlxosnFQ4A1xBbU5GwEBfv90GoKc6J0UwF+I4CDwytj/BlAks1XbW0zYX0oeIlXDnl1Vfikm1k4hfIr6VCLHKppiU69FlEs+ph0Dktz8+aUWhrvJzICZs6Gu08kTBQ5++3ulDWDeTHqjr713YM="
bucket: binaries.pantsbuild.org
local_dir: dist/deploy
# Otherwise travis will stash dist/deploy and the deploy will fail.
skip_cleanup: true
acl: public_read
on:
condition: $PREPARE_DEPLOY = 1
# NB: We mainly want deploys for `master` commits; but we also need new binaries for stable
# release branches; eg `1.3.x`
all_branches: true
repo: pantsbuild/pants
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment