Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
127 commits
Select commit Hold shift + click to select a range
b5c3828
Add scripts to build Linux and MacOS wheels
danielsuo Dec 13, 2017
07f5a6b
First test for macos wheels
danielsuo Dec 13, 2017
dd278b6
Add S3 uploads
danielsuo Dec 13, 2017
7130980
Add to-do list
danielsuo Dec 13, 2017
ec6b32d
Add test scripts
danielsuo Dec 13, 2017
28c882d
Add run script
danielsuo Dec 13, 2017
f93e8d5
Test many linux wheels
danielsuo Dec 13, 2017
cec0d1b
Add linux tests
danielsuo Dec 13, 2017
6334ac5
Make operations quiet so travis logs don't get filled up
danielsuo Dec 13, 2017
f326f7c
Use src instead of brainiak as manylinux1 build directory
danielsuo Dec 13, 2017
91291bd
Remove symlink that causes brew to break in macos
danielsuo Dec 14, 2017
c3f1605
Comment out linux testing for now
danielsuo Dec 14, 2017
5e807ee
Fix up wheel dir paths
danielsuo Dec 14, 2017
2c54322
Don't delete mpi4py
danielsuo Dec 14, 2017
beb3246
Update pip install
danielsuo Dec 14, 2017
0d5505e
Remove quiet flag for debugging
danielsuo Dec 14, 2017
884738c
Specify x86_64 architecture only
danielsuo Dec 14, 2017
d53062c
Remove delocate-path
danielsuo Dec 14, 2017
e06e1a4
List wheel dir for debugging
danielsuo Dec 14, 2017
6ae8bee
Try uploading to s3
danielsuo Dec 14, 2017
39ff30d
Uninstall with yes flag
danielsuo Dec 14, 2017
0fa8411
Tag mpi4py and implement conditional install
danielsuo Dec 14, 2017
a23a419
Update README
danielsuo Dec 14, 2017
c499ccb
Restore .travis.yml, convert pr-check.sh
danielsuo Dec 14, 2017
4fc0264
Fix travis.yml
danielsuo Dec 14, 2017
fe6d2fd
Fix wheel typo
danielsuo Dec 14, 2017
9b7b8fd
Fix manylinux1 pr-check
danielsuo Dec 14, 2017
22dad1a
Fix run-checks errors
danielsuo Dec 14, 2017
0fe9ae4
Add Python 3.6 and fix linux wheel testing
danielsuo Dec 14, 2017
4b34a3e
Fix mpich related bugs in wheel testing
danielsuo Dec 14, 2017
4ca3b39
Update readme
danielsuo Dec 14, 2017
79ab35c
Refactor prcheck
danielsuo Dec 14, 2017
f7def62
Trash commit
danielsuo Dec 14, 2017
de5d38d
Slightly less trash commit. Must go home
danielsuo Dec 14, 2017
b46829a
Maybe the last one for now?
danielsuo Dec 14, 2017
4340c57
manylinux now passing tests
danielsuo Dec 15, 2017
102236b
Fix python3.6 bug
danielsuo Dec 15, 2017
ab13272
Use brainiak/manylinux docker for linux wheels
danielsuo Dec 15, 2017
adab3fb
Testing stages
danielsuo Dec 15, 2017
a4c59ed
Linux converted
danielsuo Dec 15, 2017
caf78c8
FIx wheel directory
danielsuo Dec 15, 2017
338a22b
Test s3 upload
danielsuo Dec 15, 2017
9a4457e
Fix MacOS wheel paths
danielsuo Dec 15, 2017
09b6905
Enable MacOS
danielsuo Dec 15, 2017
e9bf23d
Minimal s3 test
danielsuo Dec 15, 2017
378af96
Minimal s3 test
danielsuo Dec 15, 2017
b95d822
Minimal s3 test
danielsuo Dec 15, 2017
91bc327
Test MacOS build
danielsuo Dec 15, 2017
f2dc799
Remove quiet flags
danielsuo Dec 15, 2017
6fde470
Upgrade pip
danielsuo Dec 15, 2017
c14d369
Check stage publishing
danielsuo Dec 15, 2017
00e6b14
Update travis.yml with draft flow
danielsuo Dec 15, 2017
73b785d
Install pip within virtual environment
danielsuo Dec 15, 2017
732823d
Stages not well documented
danielsuo Dec 15, 2017
2322252
Force ARCH x86_64
danielsuo Dec 15, 2017
a1cce4b
Update macos
danielsuo Dec 15, 2017
17e4a31
Fix
danielsuo Dec 15, 2017
f9c6a0c
Fix MacOS tests
Dec 15, 2017
3761937
Skip editable install if wheels
danielsuo Dec 15, 2017
4a14983
Fix bdist
danielsuo Dec 15, 2017
705d919
Fix coverage bugs
danielsuo Dec 16, 2017
8f1a259
Turn on silent
danielsuo Dec 16, 2017
11f8726
Fix MacOS bug
danielsuo Dec 16, 2017
5c58804
Show commands in install python
danielsuo Dec 16, 2017
3421560
Update MacOS python versions
danielsuo Dec 16, 2017
e3afa9c
Turn off sudo required for Linux build wheels
danielsuo Dec 16, 2017
c3739eb
Turn on sudo required for Linux build wheels
danielsuo Dec 16, 2017
bb05f85
Fix MacOS pkg versions
danielsuo Dec 16, 2017
a43f51b
Unset MacOS environment variables before testing
danielsuo Dec 16, 2017
54e55e3
Fix up linux install
danielsuo Dec 16, 2017
2829555
Fix linux
danielsuo Dec 16, 2017
4fdf1a6
MacOS and Linux fixes
danielsuo Dec 16, 2017
95d75c1
Fix pytest path
danielsuo Dec 16, 2017
35e703c
MacoS 3.4 only
danielsuo Dec 16, 2017
4c06ec7
Mac 3.4.4
danielsuo Dec 16, 2017
85abd8b
Update test wheels
danielsuo Dec 16, 2017
d425cf0
asdf
danielsuo Dec 16, 2017
be61032
Only build docs if not in binary mode
danielsuo Dec 16, 2017
9eb2ad7
Test yaml generator
danielsuo Dec 16, 2017
14916fb
Update travis
danielsuo Dec 16, 2017
bc5f866
Update travis
danielsuo Dec 16, 2017
5637abe
Output ordered .travis.yml [ci skip]
danielsuo Dec 17, 2017
2132feb
Upload to TRAVIS_COMMIT
danielsuo Dec 17, 2017
dc70206
Turn on output for pip install in test-wheels-macos
danielsuo Dec 17, 2017
bd18490
Fix travis
danielsuo Dec 17, 2017
8b01441
update travis
danielsuo Dec 17, 2017
c5e68f0
Update brew in hopes that we can download llvm resource
danielsuo Dec 17, 2017
02f5062
Add third stage
danielsuo Dec 17, 2017
4fb64af
Make test s3 scripts executable
danielsuo Dec 17, 2017
a2cd843
Update MacOX to test properly without dependencies
danielsuo Dec 17, 2017
705dae4
Update readme [skip ci]
danielsuo Dec 17, 2017
05fe722
merge [skip ci]
danielsuo Dec 17, 2017
d25993b
[skip ci] Refactor test stages
danielsuo Dec 19, 2017
b22640d
Comment out pypi upload; update conditional stages
danielsuo Dec 19, 2017
eec8321
Fix change in repo
danielsuo Dec 19, 2017
29cd76d
Update yaml
danielsuo Dec 19, 2017
2d6c867
Test pypi credentials
danielsuo Dec 19, 2017
f2b5d90
Fix matrix
danielsuo Dec 19, 2017
af4e215
Add language key
danielsuo Dec 19, 2017
ad1ed69
Silly bug
danielsuo Dec 19, 2017
740bc47
Move virtual environments to directory above current
danielsuo Dec 19, 2017
428a242
Update environment var
danielsuo Dec 19, 2017
6485784
Update environment var
danielsuo Dec 19, 2017
3acd919
Update environment var
danielsuo Dec 19, 2017
4613225
Update environment var
danielsuo Dec 19, 2017
72c7d7f
Add version string
danielsuo Dec 19, 2017
ac47db2
Full test
danielsuo Dec 19, 2017
5ffdfd3
Typo
danielsuo Dec 19, 2017
c89c345
Typo
danielsuo Dec 19, 2017
0e3b889
Refactor generate yaml [skip ci]
danielsuo Dec 19, 2017
c99b77f
Small edit [skip ci]
danielsuo Dec 19, 2017
c7f341a
[skip ci] Regenerate yaml post refactor
danielsuo Dec 19, 2017
7b0c206
Remove Test phase for faster testing
danielsuo Dec 20, 2017
bca9d56
Remove quiet flags so mac jobs don't time out
danielsuo Dec 20, 2017
7eb122b
Update keys
danielsuo Dec 20, 2017
f6382ba
Update README [skip ci]
danielsuo Dec 20, 2017
e4c5e2c
Store mpi4py wheels
danielsuo Dec 20, 2017
c91d542
Update wheel dir
danielsuo Dec 20, 2017
b6e7d34
Don't pick up wrong platform
danielsuo Dec 21, 2017
19eecab
Pipeline test
danielsuo Dec 21, 2017
c03a779
Update generate yaml [skip ci]
danielsuo Dec 21, 2017
2a50780
Generate yaml
danielsuo Dec 21, 2017
231b9e9
Update README [skip ci]
danielsuo Dec 21, 2017
9e6cc16
Update generate yaml
danielsuo Dec 21, 2017
5bd6dae
Update readme [skip ci]
danielsuo Dec 21, 2017
6d01809
Check if we can pass build without building or installing mpi4py whee…
danielsuo Dec 21, 2017
e2afb07
[skip ci] Fix bug where test-wheels-macos grabs wrong python
danielsuo Jan 9, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
429 changes: 385 additions & 44 deletions .travis.yml

Large diffs are not rendered by default.

70 changes: 70 additions & 0 deletions bin/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Wheel to-dos

# TODO
- Investigate [caching](https://docs.travis-ci.com/user/caching) for pip / brew and for getting wheels from job to job
- Problematic issues with installs
- `pip install` hangs
- `brew` hangs when updating, or unable to download bottle -> forces compilation
- `apt` unreachable
- Python packages incorrectly installed / files not found (e.g., six)
- Deal with versions and tagging (pypi only accepts non-dev tags)
- Recreate and encrypt keys for brainiak/brainiak
- Update documentation
- End-to-end test
- Get things working on Jenkins
- Verify using other MPI (e.g., Intel MPI, mpich3)
- Build for other OSs (e.g., xcode[VERSION], 32-bit Linux, Windows)
- Rename MacOS wheels for multiple versions?
- Test on other python distros (e.g., conda)?
- Change quiet to no progress bar (merged, but not released in pip. See [here](https://github.com/pypa/pip/pull/4194/commits/0124945031e93236c2300eb45c2f962768be62d8))

# To verify
- Upload to S3 even for PRs (custom deploy)
- NOTE: untrusted builds don't have access to encrypted environment variables or deploy
- Download from S3 and install
- Pick up from the correct travis commit
- Upload to TestPyPI
- Upload wheels to PyPI (uncomment)
- Only upload to PyPI on tagged master
- Only need to build mpi4py occasionally; not with every commit, and not with every job
- mpi4py should always commit to s3://brainiak/.whl

# Completed
- Fix stages; it appears that everything just gets lumped into a single stage
- Test-with-deps: test source with dependencies + can be installed (doesn't check install now)
- Test-wout-deps: test binary without dependencies + can be installed (doesn't check tests now)
- Confirm stages that run only on master commit to main don't run for PRs other branchs
- Clean up buckets appropriately
- Change upload / download to $TRAVIS_COMMIT/.whl
- Test local install (```pip``` vs. ```python setup.py```, editable vs. not)
- Only deploy on tag (uncomment)
- Deploy only on master (uncomment in ```.travis.yml```)
- Default implementation should grab wheels matching current brainiak version
- Allow setup.py to take argument for mpi4py wheel location
- Modify ```setup.py``` to handle conditional MPI install
- Move all scripts to bin
- Upload wheels to S3
- Split test and build stages
- Add bdist exception for editable installs
- Enforce BrainIAK dependencies while installing dev requirements
- Add back quiet / silent flags
- Refactor build and test scripts
- Consolidate python version numbers across various scripts
- Rationalize variables; different scripts call the same things different things
- Resolve coverage running pytest as module
- Split wheel build, test install, test run into three travis stages
- Separate install python and build wheels in MacOS
- Create brainiak/manylinux Docker image
- Have dev and prod S3 buckets for testing wheels
- Add LICENSE into whl file
- Checkout mpi4py tag so we always create the same wheel
- Figure out ```pr-check.sh```, other testing scripts, and documentation
- Change ```pr-check.sh``` to optionally take a ```PYTHON``` argument, using ```python3``` if unspecified
- Change ```pr-check.sh``` to optionally install a wheel (or automatically find the wheel based on the ```PYTHON```argument) insead of from source
- Restore ```.travis.yml``` and make sure previous tests working
- Linux build script
- Linux test script
- MacOS build script
- MacOS test script
- ~~Export PATH and clean up logic~~
- ~~Package documentation [link](http://python-packaging.readthedocs.io/en/latest/non-code-files.html)~~
54 changes: 54 additions & 0 deletions bin/build-dist-macos.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#!/usr/bin/env bash

# Cause the script to exit if a single command fails.
set -e

# Show explicitly which commands are currently running.
set -x

SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE:-$0}")"; pwd)
WHEEL_DIR=$SCRIPT_DIR/../dist
mkdir -p $WHEEL_DIR

# git clone -q https://bitbucket.org/mpi4py/mpi4py
# pushd mpi4py
# git checkout 3.0.0
# popd

for VERSION in $VERSIONS
do
MAJOR=${VERSION%.*}
# Replicate readlink -f
PYTHON_DIR=$(dirname $(realpath $(which python$MAJOR)))
PYTHON=$PYTHON_DIR/python$MAJOR
DELOCATE=$(dirname $PYTHON)/delocate-wheel

git clean -f -f -x -d -q -e dist

# Use virtual environments because we want to install later
pushd ..
$PYTHON -m venv venv
source venv/bin/activate
popd

# pushd mpi4py
# git clean -f -f -x -d -q
# $PYTHON setup.py -q bdist_wheel -d $WHEEL_DIR
# $DELOCATE $WHEEL_DIR/*.whl
# popd

$PYTHON -m pip install .
$PYTHON setup.py bdist_wheel -d $WHEEL_DIR
$DELOCATE $WHEEL_DIR/*.whl

# Build source distribution
if [ $MAJOR == '3.4' ]
then
$PYTHON setup.py sdist
fi

deactivate
rm -rf ../venv
done

# rm -rf mpi4py
48 changes: 48 additions & 0 deletions bin/build-dist-manylinux1.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#!/usr/bin/env bash

# Caust the script to exit if a single command fails.
set -e

# Show explicitly which commands are currently running.
set -x

# Install dependencies
yum install -y -q \
mpich2-devel

SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE:-$0}")"; pwd)
WHEEL_DIR=$SCRIPT_DIR/../dist
mkdir -p $WHEEL_DIR
mkdir -p tmp

# - Use the brainiak source stored in /brainiak via docker run command
# - Use head of mpi4py (we can pick some more suitable tag)
# git clone -q https://bitbucket.org/mpi4py/mpi4py /mpi4py
# pushd /mpi4py
# git checkout 3.0.0
# popd

for VERSION in cp34-cp34m cp35-cp35m cp36-cp36m; do
PYTHON=/opt/python/$VERSION/bin/python
$PYTHON -m pip install -U pip wheel

# pushd /mpi4py
# git clean -f -f -x -d -q
# $PYTHON setup.py -q bdist_wheel -d tmp
# auditwheel repair tmp/*.whl -w $WHEEL_DIR
# popd

git clean -f -f -x -d -q -e dist
$PYTHON -m pip install -q .
$PYTHON setup.py -q bdist_wheel -d tmp
auditwheel repair tmp/*.whl -w $WHEEL_DIR

# Build source distribution
if [ $VERSION = "cp34-cp34m" ]
then
$PYTHON setup.py -q sdist
fi
done

# rm -rf /mpi4py
rm -rf tmp
3 changes: 3 additions & 0 deletions bin/build-dist.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash

docker run --rm -w /src -v `pwd`:/src -ti brainiak/manylinux ./bin/build-dist-manylinux1.sh
19 changes: 19 additions & 0 deletions bin/build-wheel.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env bash


$PYTHON -m pip install -q .
$PYTHON setup.py -q bdist_wheel -d tmp

platform="unknown"
unamestr="$(uname)"
if [[ "$unamestr" == "Linux" ]]
then
auditwheel repair tmp/*.whl -w $WHEEL_DIR
elif [[ "$unamestr" == "Darwin" ]]
then
$DELOCATE tmp/*.whl
mv tmp/*.whl $WHEEL_DIR
else
echo "Unrecognized platform."
exit 1
fi
Loading