-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22 from futurecore/travis-deploy
Automatically deploy Revelation binaries to GitHub.
- Loading branch information
Showing
2 changed files
with
52 additions
and
29 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,33 @@ | ||
language: python | ||
|
||
python: | ||
- '2.7' | ||
python: '2.7' | ||
|
||
cache: pip | ||
|
||
env: | ||
- TRANSLATE=true | ||
env: TRANSLATE=true | ||
|
||
install: | ||
- pip install --disable-pip-version-check --upgrade pip | ||
- pip install -r requirements.txt | ||
- cd ${HOME} | ||
- wget https://github.com/cornell-brg/pydgin/archive/master.zip | ||
- unzip master.zip | ||
- mv pydgin-master pydgin | ||
|
||
# Download & extract latest PyPy source code | ||
# Exclude bundled versions of pytest, & pytest-cov | ||
- cd ${HOME} | ||
- wget https://bitbucket.org/pypy/pypy/get/default.tar.gz | ||
- tar xf default.tar.gz --transform 's/pypy-pypy-[0-9a-f]\+/pypy/' | ||
--exclude 'pypy-pypy-*/pytest_cov.py' | ||
|
||
- cd $TRAVIS_BUILD_DIR | ||
- export PYTHONPATH=${PYTHONPATH}:${HOME}/pydgin/ | ||
|
||
- pip install --disable-pip-version-check --upgrade pip | ||
- pip install -r requirements.txt | ||
- cd ${HOME} | ||
- wget https://github.com/cornell-brg/pydgin/archive/master.zip | ||
- unzip master.zip | ||
- mv pydgin-master pydgin | ||
- cd ${HOME} | ||
- wget https://bitbucket.org/pypy/pypy/get/default.tar.gz | ||
- tar xf default.tar.gz --transform 's/pypy-pypy-[0-9a-f]\+/pypy/' --exclude 'pypy-pypy-*/pytest_cov.py' | ||
- cd $TRAVIS_BUILD_DIR | ||
- export PYTHONPATH=${PYTHONPATH}:${HOME}/pydgin/ | ||
script: | ||
- py.test -n 4 -rxXs --color=yes --doctest-modules --cov-config=.coveragerc --cov-report=term-missing --cov=revelation revelation/test/ scripts/ | ||
- test "$TRANSLATE" == "true" && PYTHONPATH=${HOME}/pydgin/:${HOME}/pypy:. ${HOME}/pypy/rpython/bin/rpython --no-pdb --opt=jit revelation/sim.py || true | ||
|
||
after_success: coveralls | ||
|
||
notifications: | ||
slack: | ||
secure: dBy5lkieNPYSmVhBOKXbHKCpgVJLQiuB0K89JmypE03FpRZSJKv1rwz/LG/herCgNOhwJ3/u/VEMEyfucLrkIYsgJjBcxU+Fby//iRZ9IroLLJr9J/xYG53kaMMsmyvohKSBdgl7IPqkwRRWB58Ac9iOvNmZPYsGwxqCHR7pRbHDiR0GmewdpLIylPFsU3G7Q6yGRdoFzTCawM3TYHwkKQOs1gFkBkAcB6LwxH3ZwIN/8caVm2fwU8Edn7nnzJ6vq/od2W2smgRQPfOwUk5FhEagqYQV7DB4Yu5Kx3wug3lWNEEk95KENnQZ7zU+1NjA7e5EERNvXNmdxNmxnaoZeRxj5mjS8PcERMNQd6i5nWOvWXYHhwBvy9CuZ9xBMr3G4TYLEwAo2SrD31h7pmsoHf9rRGOs9Z8P9/zr54M2G0qHoUoyfhah1c3DwnZBuepRzQzBn4i3eUyBKrLADAMQteGKwxKsWyvQybsomOyfpZA/g1cKLszTMoWNLl6S9OaBLjVTYlncwl3qI8Wvjs/pXICmxPuB0in6rAY3KakWo/6ls+QBlergAFTrPGqCH9MutlHICGfxztRaTPWYWRQnJlze896WVE5oGrtn35AUAWaB6ckQOGAAvnkslD4VQaZXxbrvcK0luszVF8OkFqBlPrFjq0cu+iYoNaTMZGusPyA= | ||
- py.test -n 4 -rxs --color=yes --cov-config .coveragerc --cov-report term-missing --cov=revelation revelation/test/ | ||
- python -m doctest scripts/diff_trace.py | ||
- python -m doctest scripts/get_instructions_used.py | ||
- mkdir bin | ||
- test "$TRANSLATE" == "true" && PYTHONPATH=${HOME}/pydgin/:${HOME}/pypy:. ${HOME}/pypy/rpython/bin/rpython --no-pdb --opt=jit revelation/sim.py || true | ||
- mv pydgin-revelation-jit bin/ 2>/dev/null | ||
- test "$TRANSLATE" == "true" && PYTHONPATH=${HOME}/pydgin/:${HOME}/pypy:. ${HOME}/pypy/rpython/bin/rpython --no-pdb -O2 revelation/sim.py || true | ||
- mv pydgin-revelation-nojit bin/ 2>/dev/null | ||
|
||
after_success: | ||
- coveralls | ||
- bash ./scripts/deploy.sh |
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,27 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e # Exit with non-zero exit code if anything fails. | ||
set -x # Trace everything that the script executes. | ||
|
||
if [ "${TRAVIS_PULL_REQUEST}" = "false" ] && [ "${TRAVIS_BRANCH}" = "master" ] && [ `ls ${TRAVIS_BUILD_DIR}/bin/* 2>/dev/null | wc -l` = "2" ]; then | ||
echo -e "Starting to update revelation-bins.\n" | ||
|
||
# Configure git. | ||
git config --global user.email "travis@travis-ci.org" | ||
git config --global user.name "Travis CI" | ||
|
||
# Clone revelation binaries repository. | ||
cd ${HOME} | ||
git clone --quiet --branch=master https://${GH_PUSH_BIN_TOKEN}@github.com/futurecore/revelation-bins.git revelation-bins > /dev/null | ||
|
||
# Copy binary simulators into new repository. | ||
cd revelation-bins | ||
cp ${TRAVIS_BUILD_DIR}/bin/pydgin-revelation* . | ||
|
||
# Add, commit and push binary files. | ||
git add pydgin-revelation* | ||
git commit -m "Travis build ${TRAVIS_BUILD_NUMBER} pushed to master" | ||
git push -fq origin master > /dev/null | ||
|
||
echo -e "Finished pushing to revelation-bins.\n" | ||
fi |