Skip to content
This repository was archived by the owner on Jun 27, 2025. It is now read-only.

Commit 2f4d3ed

Browse files
committed
Travis: Build binary wheels
1 parent 3a5df05 commit 2f4d3ed

File tree

1 file changed

+33
-10
lines changed

1 file changed

+33
-10
lines changed

.travis.yml

Lines changed: 33 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,41 @@
11
sudo: required
22
dist: trusty
3-
language: generic
3+
language: python
44
services:
55
- docker
66

7-
cache:
8-
directories:
9-
- ~/.cache/pip
7+
8+
env:
9+
global:
10+
- ROCKSDB_COMMIT=479c566771d6464785f205a368701c689e094fe5
11+
- TWINE_USERNAME=bauerj
12+
- CIBW_MANYLINUX1_X86_64_IMAGE="quay.io/pypa/manylinux2010_x86_64"
13+
- CIBW_MANYLINUX1_I686_IMAGE="quay.io/pypa/manylinux2010_i686"
14+
- CIBW_TEST_COMMAND="rm {project}/rocksdb/tests/__init__.py; pytest {project}/rocksdb/tests"
15+
- CIBW_TEST_REQUIRES=".[test]"
16+
- CIBW_BUILD=*-manylinux1_x86_64
1017

1118
install:
12-
docker build . -t ci-image;
19+
- pip install cibuildwheel==0.11.1
20+
- pip install twine
1321
script:
14-
docker run -v ~/.cache/pip:/home/tester/.cache/pip -v $(pwd):/home/tester/src ci-image:latest tox -e ${TOXENV} ;
15-
env:
16-
- TOXENV=py27
17-
- TOXENV=py36
18-
- TOXENV=docs
22+
- |
23+
export CIBW_BEFORE_BUILD="
24+
if [ ! -d "/tmp/rocksdb" ]; then
25+
yum install -y snappy snappy-devel zlib zlib-devel bzip2 bzip2-devel lz4-devel
26+
pushd /tmp
27+
git clone https://github.com/facebook/rocksdb
28+
cd rocksdb
29+
git reset --hard $ROCKSDB_COMMIT
30+
CXXFLAGS='-flto -Os -s' PORTABLE=1 make shared_lib -j 6
31+
make install-shared
32+
popd
33+
fi
34+
"
35+
- cibuildwheel --output-dir wheelhouse
36+
- ls -la wheelhouse
37+
- |
38+
if [[ $TRAVIS_TAG ]]; then
39+
python -m pip install twine
40+
python -m twine upload wheelhouse/*.whl
41+
fi

0 commit comments

Comments
 (0)