forked from pantsbuild/pants
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tighten travis matrix and python activation.
A few improvements and fixes to the travis setup: + Upgrade to to python 2.7.14 via `python: "2.7"`. + Use `name` uniformly to name shards and kill the `SHARD` env var which was only used to achieve the same end. + Use anchors to DRY up python version and clippy shard failure ignoring. + Ensure travis `pyenv` pythons are on `PATH`. This works around travis-ci/travis-ci#8315 and nets us both python 2.7 and python 3.6 on all `language: python` shards. This last is needed to support pantsbuild#6428 which fixes pantsbuild#6415.
- Loading branch information
Showing
2 changed files
with
67 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
|
||
cd "$(git rev-parse --show-toplevel)" | ||
|
||
function pyenv_path { | ||
local -r pyenv_root="$(cd "$(dirname "$(which pyenv)")/.." && pwd -P)" | ||
pyenv versions --bare | while read v; do | ||
echo "${pyenv_root}/versions/${v}/bin" | ||
done | ||
} | ||
|
||
if which pyenv &>/dev/null; then | ||
PYENV_PYTHONS="$(pyenv_path)" | ||
PYENV_PATH="$(echo ${PYENV_PYTHONS} | tr ' ' ':')" | ||
|
||
echo "Executing ./build-support/bin/ci.sh "$@" with ${PYENV_PATH} preprended to the PATH" | ||
|
||
export PATH="${PYENV_PATH}:${PATH}" | ||
fi | ||
exec ./build-support/bin/ci.sh "$@" |