forked from pantsbuild/pants
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
221 lines (218 loc) · 6.64 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
# GENERATED, DO NOT EDIT!
# To change, edit `build-support/bin/generate_travis_yml.py` and run:
# ./pants run build-support/bin:generate_travis_yml > .travis.yml
conditions: v1
deploy:
'on':
all_branches: true
condition: $PREPARE_DEPLOY = 1
repo: pantsbuild/pants
provider: script
script: ./build-support/bin/deploy_to_s3.py
skip_cleanup: true
env:
global:
- PANTS_CONFIG_FILES="${TRAVIS_BUILD_DIR}/pants.ci.toml"
- PANTS_DYNAMIC_UI=false
- LC_ALL="en_US.UTF-8"
- AWS_BUCKET=ci-public.pantsbuild.org
- MACOS_PYENV_PY27_VERSION=2.7.18
- MACOS_PYENV_PY37_VERSION=3.7.7
- MACOS_PYENV_PY38_VERSION=3.8.3
- PYENV_ROOT_OSX=${HOME}/.pants_pyenv
- PYENV_ROOT="${PYENV_ROOT:-${PYENV_ROOT_OSX}}"
- PATH="${PYENV_ROOT}/shims:${PATH}"
- AWS_CLI_ROOT="${HOME}/.aws_cli"
- AWS_ACCESS_KEY_ID__TO_BE_REEXPORTED_ON_DEPLOYS=AKIAV6A6G7RQ2HFZ5KP7
- secure: oEmZoB4oP4ygCMRZp86AhB40ppH87pduS0p3zVVAnTLFLkrnA4qP0TvEOqwzc6DFceQuJ6telJOGUnB4ouFIl8aBoRW7KaIuudjVWxcBLEUDdoXlA9hGSY+BOTiBmMVX5g7Wdhfngy4nygrk01cG2UWvfm62VrexeV+48twaBJE=
- RUST_BACKTRACE="all"
jobs:
include:
- addons:
apt:
packages:
- lib32stdc++6
- lib32z1
- lib32z1-dev
- gcc-multilib
- python-dev
- openssl
- libssl-dev
- jq
- unzip
- shellcheck
after_failure:
- ./build-support/bin/ci-failure.sh
before_cache:
- sudo chown -R travis:travis "${HOME}" "${TRAVIS_BUILD_DIR}"
- find build-support -name "*.py[co]" -delete
- ./build-support/bin/prune_travis_cache.sh
before_install:
- ./build-support/bin/install_aws_cli_for_ci.sh
- pyenv global 2.7.17 3.6.10 3.7.6 3.8.1
cache:
directories:
- ${AWS_CLI_ROOT}
- ${PYENV_ROOT_OSX}
- ${HOME}/.rustup
- ${HOME}/.cargo
- ${HOME}/.cache/pants/pants_dev_deps
- src/rust/engine/target
timeout: 500
dist: bionic
env:
- PREPARE_DEPLOY=1
- CACHE_NAME=wheels.linux
if: commit_message !~ /\[ci skip-build-wheels\]/ OR type NOT IN (pull_request,
cron)
language: python
name: Build Linux wheels and fs_util
os: linux
python:
- '2.7'
- '3.6'
- '3.7'
script:
- 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/
- docker run --rm -t -v "${HOME}:/travis/home" -v "${TRAVIS_BUILD_DIR}:/travis/workdir"
travis_ci:latest sh -c "curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs
| sh -s -- -y --default-toolchain none && source /travis/home/.cargo/env &&
./build-support/bin/release.sh -n && USE_PY38=true ./build-support/bin/release.sh
-n && ./build-support/bin/release.sh -f"
services:
- docker
stage: Build Wheels
- before_cache:
- sudo chown -R travis:travis "${HOME}" "${TRAVIS_BUILD_DIR}"
- find build-support -name "*.py[co]" -delete
- ./build-support/bin/prune_travis_cache.sh
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
- ./build-support/bin/install_python_for_ci.sh ${MACOS_PYENV_PY37_VERSION} ${MACOS_PYENV_PY38_VERSION}
before_script:
- ulimit -n 8192
cache:
directories:
- ${AWS_CLI_ROOT}
- ${PYENV_ROOT_OSX}
- ${HOME}/.rustup
- ${HOME}/.cargo
- ${HOME}/.cache/pants/pants_dev_deps
- src/rust/engine/target
timeout: 500
env:
- PATH="/usr/local/opt/openssl/bin:${PATH}"
- LDFLAGS="-L/usr/local/opt/openssl/lib"
- CPPFLAGS="-I/usr/local/opt/openssl/include"
- PATH="${PYENV_ROOT}/versions/${MACOS_PYENV_PY27_VERSION}/bin:${PATH}"
- PATH="${PYENV_ROOT}/versions/${MACOS_PYENV_PY37_VERSION}/bin:${PATH}"
- PATH="${PYENV_ROOT}/versions/${MACOS_PYENV_PY38_VERSION}/bin:${PATH}"
- PREPARE_DEPLOY=1
- CACHE_NAME=wheels.osx
if: commit_message !~ /\[ci skip-build-wheels\]/ OR type NOT IN (pull_request,
cron)
language: generic
name: Build macOS wheels and fs_util
os: osx
osx_image: xcode8
script:
- curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain
none
- source ${HOME}/.cargo/env
- ./build-support/bin/release.sh -n
- USE_PY38=true ./build-support/bin/release.sh -n
- ./build-support/bin/release.sh -f
stage: Build Wheels
- addons:
apt:
packages:
- lib32stdc++6
- lib32z1
- lib32z1-dev
- gcc-multilib
- python-dev
- openssl
- libssl-dev
- jq
- unzip
- shellcheck
after_failure:
- ./build-support/bin/ci-failure.sh
before_install:
- ./build-support/bin/install_aws_cli_for_ci.sh
- pyenv global 2.7.17 3.6.10 3.7.6 3.8.1
deploy:
api_key:
secure: u0aCsiuVGOg28YxG0sQUovuUm29kKwQfFgHbNz2TT5L+cGoHxGl4aoVOCtuwWYEtbNGmYc8/3WRS3C/jOiqQj6JEgHUzWOsnfKUObEqNhisAmXbzBbKc0wPQTL8WNK+DKFh32sD3yPYcw+a5PTLO56+o7rqlI25LK7A17WesHC4=
file: dist/deploy/pex/*
file_glob: true
'on':
repo: pantsbuild/pants
tags: true
provider: releases
skip_cleanup: true
dist: bionic
env:
- PANTS_PEX_RELEASE=stable
- CACHE_NAME=deploy.stable
language: python
name: Deploy stable pants.pex
os: linux
python:
- '2.7'
- '3.6'
- '3.7'
script:
- ./build-support/bin/release.sh -p
stage: Deploy Pants Pex
- addons:
apt:
packages:
- lib32stdc++6
- lib32z1
- lib32z1-dev
- gcc-multilib
- python-dev
- openssl
- libssl-dev
- jq
- unzip
- shellcheck
after_failure:
- ./build-support/bin/ci-failure.sh
before_install:
- ./build-support/bin/install_aws_cli_for_ci.sh
- pyenv global 2.7.17 3.6.10 3.7.6 3.8.1
dist: bionic
env:
- PREPARE_DEPLOY=1
- CACHE_NAME=deploy.unstable
language: python
name: Deploy unstable pants.pex
os: linux
python:
- '2.7'
- '3.6'
- '3.7'
script:
- ./build-support/bin/release.sh -p
- mkdir -p dist/deploy/pex/
- mv dist/pants*.pex dist/deploy/pex/
stage: Deploy Pants Pex Unstable
notifications:
webhooks:
on_start: always
urls:
- https://webhooks.toolchain.com/travis/repo/pantsbuild/pants/
stages:
- if: type != cron
name: Build Wheels
- if: tag IS present AND tag =~ ^release_.*$
name: Deploy Pants Pex
- if: tag IS NOT present AND type NOT IN (pull_request, cron)
name: Deploy Pants Pex Unstable