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

Commit d5bae57

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

File tree

1 file changed

+32
-10
lines changed

1 file changed

+32
-10
lines changed

.travis.yml

Lines changed: 32 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,40 @@
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
1320
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
21+
- |
22+
export CIBW_BEFORE_BUILD="
23+
if [ ! -d "/tmp/rocksdb" ]; then
24+
yum install -y snappy snappy-devel zlib zlib-devel bzip2 bzip2-devel lz4-devel
25+
pushd /tmp
26+
git clone https://github.com/facebook/rocksdb
27+
cd rocksdb
28+
git reset --hard $ROCKSDB_COMMIT
29+
CXXFLAGS='-flto -Os -s' make shared_lib -j 4
30+
make install-shared
31+
popd
32+
fi
33+
"
34+
- cibuildwheel --output-dir wheelhouse
35+
- ls -la wheelhouse
36+
- |
37+
if [[ $TRAVIS_TAG ]]; then
38+
python -m pip install twine
39+
python -m twine upload wheelhouse/*.whl
40+
fi

0 commit comments

Comments
 (0)