Skip to content
54 changes: 42 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,60 @@ language: python
matrix:
include:
- sudo: required
services: docker
env: RELEASE=trusty
services:
- docker
env:
- RELEASE=trusty
- sudo: required
env: RELEASE=precise
env:
- RELEASE=precise
- language: c
os: osx
osx_image: xcode8.2
env:
- RELEASE=sierra
- language: c
os: osx
osx_image: xcode7.3
env:
- RELEASE=elcapitan
- language: c
os: osx
osx_image: xcode6.4
env:
- RELEASE=yosemite

env:
global:
- VERSION='3.7-dev'
- ALIAS=nightly
- VERSION='3.7-dev'
- ALIAS='nightly'

install:
- pushd /opt/pyenv/
- sudo git checkout master
- sudo git pull
- popd
- python -m pip install virtualenv
- |
if [[ "$(uname)" == "Linux" ]] ; then
pushd /opt/pyenv/
sudo git checkout master
sudo git pull
popd
else
brew uninstall pyenv
brew install pyenv --HEAD
fi
if ! python -m pip >&/dev/null; then
wget https://bootstrap.pypa.io/get-pip.py
sudo python get-pip.py
fi
- sudo -H python -m pip install virtualenv --upgrade

before_script:
- 'export INSTALL_DEST=${INSTALL_DEST:-/opt/python}'
- 'export LSB_RELEASE=${LSB_RELEASE:-$(lsb_release -rs || echo ${$(sw_vers -productVersion)%*.*})}'
- 'export OS_NAME=${OS_NAME:-$(lsb_release -is | tr "A-Z" "a-z" || echo "osx")}'
- export LSB_RELEASE=$(lsb_release -rs 2>/dev/null || sw_vers -productVersion | sed 's/^\([0-9][0-9]*.[0-9][0-9]*\).*/\1/')
- 'export OS_NAME=$((lsb_release -is 2>/dev/null || echo "osx") | tr [[:upper:]] [[:lower:]])'
- 'export ARCH=${ARCH:-$(uname -m)}'
- 'export PACKAGES=${PACKAGES:-pip nose pytest mock wheel}'
- 'export CPYTHON_ONLY_PKGS="numpy"'
- export PYTHON_CONFIGURE_OPTS="--with-wide-unicode --enable-shared --enable-ipv6 --enable-loadable-sqlite-extensions --with-computed-gotos $CONFIGURE_OPTS"

script: ./bin/compile

after_success: ./bin/archive
Expand All @@ -43,3 +72,4 @@ addons:
- $LSB_RELEASE/
target_paths:
- /binaries/$OS_NAME/$LSB_RELEASE/$ARCH

6 changes: 5 additions & 1 deletion bin/archive
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,11 @@ for DEST in $DESTS ; do

shopt -s nullglob
for f in *.* ; do
sha256sum $f > ${f}.sha256sum.txt
if command -v sha256sum; then
sha256sum $f > ${f}.sha256sum.txt
else
shasum -a 256 $f > ${f}.sha256sum.txt
fi
done

popd &>/dev/null
Expand Down
10 changes: 8 additions & 2 deletions bin/compile
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,14 @@ function install_numpy() {

set -o xtrace

sudo env PYTHON_BUILD_ROOT=/opt/pyenv/plugins/python-build \
/opt/pyenv/plugins/python-build/bin/python-build $VERSION $INSTALL_DEST/$VERSION
if [[ "$(uname)" == "Linux" ]] ; then
PYENV_ROOT=/opt/pyenv
else
PYENV_ROOT=/usr/local/opt/pyenv
fi

sudo env PYTHON_BUILD_ROOT=$PYENV_ROOT/plugins/python-build \
$PYENV_ROOT/plugins/python-build/bin/python-build $VERSION $INSTALL_DEST/$VERSION

if [[ $ALIAS ]] ; then
rm -f $INSTALL_DEST/$ALIAS
Expand Down