Skip to content
This repository has been archived by the owner on Mar 29, 2024. It is now read-only.

Commit

Permalink
travis.yml: Add job to build tulip-python wheel on manylinux1
Browse files Browse the repository at this point in the history
  • Loading branch information
anlambert committed Sep 26, 2018
1 parent bdbf35b commit 0df1b6a
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,32 @@ notifications:
# define build jobs
jobs:
include:
#==============================================================================================================================================================
# Tulip-Python wheels build on manylinux1
- stage: Tulip-Python wheels build (CentOS 5.11 manylinux1)
os: linux
dist: trusty
cache:
directories:
- $HOME/ccache

sudo: required
env:
- ARCH=x86_64
- DOCKER_IMAGE=quay.io/pypa/manylinux1_x86_64

services:
- docker

before_install:
- echo 'DOCKER_OPTS="-H tcp://127.0.0.1:2375 -H unix:///var/run/docker.sock -s devicemapper"' | sudo tee /etc/default/docker > /dev/null
- sudo service docker restart
- sleep 5
- sudo docker pull ${DOCKER_IMAGE}
- sudo docker create -v $HOME/ccache:/ccache --name ccache ${DOCKER_IMAGE}

script:
- sudo docker run --rm=true -e CCACHE_DIR=/ccache --volumes-from ccache --cap-add SYS_ADMIN -v `pwd`:/tulip:rw ${DOCKER_IMAGE} /bin/bash -c "bash -xe /tulip/bundlers/linux/tulip_python_wheels_build.sh"
#==============================================================================================================================================================
# Tulip core build stage on Linux
- stage: Tulip core build (Linux)
Expand Down
34 changes: 34 additions & 0 deletions bundlers/linux/tulip_python_wheels_build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/bash

# This script is only intended to be run in the pypa/manylinux1
# docker image based on Centos 5.11

cd

# install tulip-python wheel deps
yum -y install zlib-devel qhull-devel ccache

# we need at least CMake 2.8.12 in order to build tulip-python wheel
# so let's grab it, compile it and install it
curl -LO https://cmake.org/files/v2.8/cmake-2.8.12.tar.gz
tar -xvzf cmake-2.8.12.tar.gz
cd cmake-2.8.12
./bootstrap --enable-ccache
make -j4
make -j4 install

cd

mkdir tulip_build && cd tulip_build
# iterate on available Python versions
for PYTHON_BIN_PATH in /opt/python/cp*/bin
do
# configure and build tulip-python with specific Python version
cmake -DTULIP_USE_CCACHE=ON -DTULIP_ACTIVATE_PYTHON_WHEEL_TARGET=ON -DPYTHON_EXECUTABLE=$PYTHON_BIN_PATH/python -DCMAKE_BUILD_TYPE=Release /tulip
make -j4 wheel
# install and check that the produced module can be successfully imported
cd ./library/tulip-python/bindings/tulip-core/tulip_module/dist
$PYTHON_BIN_PATH/pip install $(ls -t | head -1)
$PYTHON_BIN_PATH/python -c "import tulip"
cd && cd tulip_build
done

0 comments on commit 0df1b6a

Please sign in to comment.