Skip to content

Commit 5c1a210

Browse files
committed
ci: build manylinux on circle ci
1 parent a54cadc commit 5c1a210

File tree

5 files changed

+96
-32
lines changed

5 files changed

+96
-32
lines changed

.circleci/config.yml

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
ci-steps: &ci-steps
2+
working_directory: /work
3+
steps:
4+
- checkout
5+
- run:
6+
name: build wheel
7+
command: bash /work/ci/build-wheels.sh
8+
9+
version: 2
10+
jobs:
11+
#
12+
# x64
13+
#
14+
manylinux-x64_cp27-cp27m:
15+
docker:
16+
- image: quay.io/pypa/manylinux1_x86_64
17+
<<: *ci-steps
18+
19+
manylinux-x64_cp27-cp27mu:
20+
docker:
21+
- image: quay.io/pypa/manylinux1_x86_64
22+
<<: *ci-steps
23+
24+
manylinux-x64_cp34-cp34m:
25+
docker:
26+
- image: quay.io/pypa/manylinux1_x86_64
27+
<<: *ci-steps
28+
29+
manylinux-x64_cp35-cp35m:
30+
docker:
31+
- image: quay.io/pypa/manylinux1_x86_64
32+
<<: *ci-steps
33+
34+
manylinux-x64_cp36-cp36m:
35+
docker:
36+
- image: quay.io/pypa/manylinux1_x86_64
37+
<<: *ci-steps
38+
#
39+
# x86
40+
#
41+
manylinux-x86_cp27-cp27m:
42+
docker:
43+
- image: quay.io/pypa/manylinux1_i686
44+
<<: *ci-steps
45+
46+
manylinux-x86_cp27-cp27mu:
47+
docker:
48+
- image: quay.io/pypa/manylinux1_i686
49+
<<: *ci-steps
50+
51+
manylinux-x86_cp34-cp34m:
52+
docker:
53+
- image: quay.io/pypa/manylinux1_i686
54+
<<: *ci-steps
55+
56+
manylinux-x86_cp35-cp35m:
57+
docker:
58+
- image: quay.io/pypa/manylinux1_i686
59+
<<: *ci-steps
60+
61+
manylinux-x86_cp36-cp36m:
62+
docker:
63+
- image: quay.io/pypa/manylinux1_i686
64+
<<: *ci-steps
65+
66+
67+
workflows:
68+
version: 2
69+
build-test-deploy:
70+
jobs:
71+
- manylinux-x64_cp27-cp27m
72+
- manylinux-x64_cp27-cp27mu
73+
- manylinux-x64_cp34-cp34m
74+
- manylinux-x64_cp35-cp35m
75+
- manylinux-x64_cp36-cp36m
76+
77+
- manylinux-x86_cp27-cp27m
78+
- manylinux-x86_cp27-cp27mu
79+
- manylinux-x86_cp34-cp34m
80+
- manylinux-x86_cp35-cp35m
81+
- manylinux-x86_cp36-cp36m

.travis.yml

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,29 +10,12 @@ env:
1010
- VERSION=3.4
1111
- VERSION=3.5
1212
- VERSION=3.6
13-
matrix:
14-
include:
15-
- sudo: required
16-
os: linux
17-
language: python
18-
services:
19-
- docker
20-
env: DOCKER_IMAGE=quay.io/pypa/manylinux1_x86_64
21-
- sudo: required
22-
os: linux
23-
language: python
24-
services:
25-
- docker
26-
env: DOCKER_IMAGE=quay.io/pypa/manylinux1_i686
27-
PRE_CMD=linux32
2813

2914
install:
3015
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then source ci/travis_osx_install.sh; fi
31-
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then source ci/travis_linux_install.sh; fi
3216

3317
script:
3418
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then source ci/travis_osx_script.sh; fi
35-
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then source ci/travis_linux_script.sh; fi
3619

3720
after_success:
3821
- ls wheelhouse/

ci/build-wheels.sh

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,24 @@
11
#!/bin/bash
22
set -e -x
33

4-
cd /io
4+
cd /work
55

6-
# compile wheels
7-
for PYBIN in /opt/python/*/bin/; do
8-
${PYBIN}/pip install -r /io/build-requirements.txt
9-
${PYBIN}/pip wheel /io/ -w /tmp/wheelhouse/
10-
done
6+
MANYLINUX_PYTHON=$(echo ${CIRCLE_JOB} | cut -d"_" -f2)
7+
ARCHITECTURE=$(echo ${CIRCLE_JOB} | cut -d"_" -f1 | cut -d"-" -f2)
8+
PYBIN=/opt/python/${MANYLINUX_PYTHON}/bin
9+
echo "MANYLINUX_PYTHON [${MANYLINUX_PYTHON}] ${ARCHITECTURE}"
10+
if [ "$ARCHITECTURE" == "x86" ]
11+
then
12+
echo "x86 architect, use linux32"
13+
PRE_CMD=linux32
14+
fi
15+
${PRE_CMD} ${PYBIN}/pip install -r /work/dev-requirements.txt
16+
${PRE_CMD} ${PYBIN}/pip wheel /work/ -w /tmp/wheelhouse/
1117

12-
# Bundle external shared libraries into the wheels
1318
for whl in /tmp/wheelhouse/bencoder*.whl; do
14-
auditwheel repair $whl -w /io/wheelhouse/
19+
auditwheel repair $whl -w /work/wheelhouse/
1520
done
1621

1722
# Install packages and test again
18-
for PYBIN in /opt/python/*/bin/; do
19-
${PYBIN}/pip install bencoder.pyx --no-index -f /io/wheelhouse
20-
${PYBIN}/pip install pytest pytest-benchmark
21-
(cd /io; ${PYBIN}/py.test)
22-
done
23+
${PRE_CMD} ${PYBIN}/pip install bencoder.pyx --no-index -f /work/wheelhouse
24+
(cd /work; ${PRE_CMD} ${PYBIN}/py.test)

ci/travis_linux_install.sh

Lines changed: 0 additions & 1 deletion
This file was deleted.

ci/travis_linux_script.sh

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)