Skip to content

Commit

Permalink
Merge pull request #1067 from hugovk/build-pillow-wheels
Browse files Browse the repository at this point in the history
Run OS X tests after successful Linux build
  • Loading branch information
wiredfool committed Jan 4, 2015
2 parents 2f1f73a + 3330dba commit ce9b6a4
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 2 deletions.
46 changes: 44 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,18 +54,60 @@ after_success:
- travis_retry pip install coveralls-merge
- coveralls-merge coverage.c.json


- travis_retry pip install pep8 pyflakes
- pep8 --statistics --count PIL/*.py
- pep8 --statistics --count Tests/*.py
- pyflakes *.py | tee >(wc -l)
- pyflakes PIL/*.py | tee >(wc -l)
- pyflakes Tests/*.py | tee >(wc -l)


# Coverage and quality reports on just the latest diff.
# (Installation is very slow on Py3, so just do it for Py2.)
- if [ ${TRAVIS_PYTHON_VERSION:0:1} == "2" ]; then Scripts/diffcover-install.sh; fi
- if [ ${TRAVIS_PYTHON_VERSION:0:1} == "2" ]; then Scripts/diffcover-run.sh; fi

# after_all
- |
if [ "$TRAVIS_REPO_SLUG" = "python-pillow/Pillow" ] && [ "$TRAVIS_BRANCH" = "master" ] && [ "$TRAVIS_PULL_REQUEST" = "false" ]; then
curl -Lo travis_after_all.py https://raw.github.com/dmakhno/travis_after_all/master/travis_after_all.py
python travis_after_all.py
export $(cat .to_export_back)
if [ "$BUILD_LEADER" = "YES" ]; then
if [ "$BUILD_AGGREGATE_STATUS" = "others_succeeded" ]; then
echo "All jobs succeded! Triggering OS X build..."
# Trigger an OS X build at the pillow-wheels repo
./build_children.sh
else
echo "Some jobs failed"
fi
fi
fi
after_failure:
- |
if [ "$TRAVIS_REPO_SLUG" = "python-pillow/Pillow" ] && [ "$TRAVIS_BRANCH" = "master" ] && [ "$TRAVIS_PULL_REQUEST" = "false" ]; then
curl -Lo travis_after_all.py https://raw.github.com/dmakhno/travis_after_all/master/travis_after_all.py
python travis_after_all.py
export $(cat .to_export_back)
if [ "$BUILD_LEADER" = "YES" ]; then
if [ "$BUILD_AGGREGATE_STATUS" = "others_failed" ]; then
echo "All jobs failed"
else
echo "Some jobs failed"
fi
fi
fi
after_script:
- |
if [ "$TRAVIS_REPO_SLUG" = "python-pillow/Pillow" ] && [ "$TRAVIS_BRANCH" = "master" ] && [ "$TRAVIS_PULL_REQUEST" = "false" ]; then
echo leader=$BUILD_LEADER status=$BUILD_AGGREGATE_STATUS
fi
matrix:
fast_finish: true

env:
global:
# travis encrypt AUTH_TOKEN=
secure: yC1RcYF932ICXcw8hR3MHKfw9G9030+w8SgGXhhH2htgsCvKrGtb7kA4pqN7eGS31QsGatj6NmYVOdut3jIqbtP+5Pd3xceGoeo3HMWfS5RPmgbrGmiVYeDH9ZZDDZMH85oRnMU/vfI3T8SdYdyYM3hXAPzXeU6jWxQA48ft4D4=
7 changes: 7 additions & 0 deletions build_children.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

# Get last child project build number from branch named "latest"
BUILD_NUM=$(curl -s 'https://api.travis-ci.org/repos/Pillow/pillow-wheels/branches/latest' | grep -o '^{"branch":{"id":[0-9]*,' | grep -o '[0-9]' | tr -d '\n')

# Restart last child project build
curl -X POST https://api.travis-ci.org/builds/$BUILD_NUM/restart --header "Authorization: token "$AUTH_TOKEN

0 comments on commit ce9b6a4

Please sign in to comment.