adds tests to linux build

pull/1/head
Moisés Guimarães 2017-12-18 15:54:15 -03:00
parent 1a4496036b
commit 7316777736
2 changed files with 29 additions and 24 deletions

View File

@ -2,30 +2,9 @@
set -e
set -x
# create docker container
CONT=$(date +%s)
TAG=manylinux1-x86_64
docker run \
-d \
--rm \
-v `pwd`:/wolfcrypt-py \
-w /wolfcrypt-py \
--name ${CONT} \
${TAG} \
bash -c "tail -f /var/log/lastlog"
docker exec ${CONT} bash -c "if [ -d dist ]; then mv dist tmpdist; fi"
for PYVERSION in cp27-cp27m cp27-cp27mu cp34-cp34m cp35-cp35m cp36-cp36m
do
docker exec ${CONT} /opt/python/${PYVERSION}/bin/python setup.py bdist_wheel
docker exec ${CONT} rm -rf .eggs
done
docker exec ${CONT} bash -c 'for i in $(ls dist/*.whl); do auditwheel repair $i -w tmpdist; done;'
docker exec ${CONT} bash -c "rm -rf dist"
docker exec ${CONT} bash -c "mv tmpdist dist"
docker rm -f ${CONT}
wolfssl/manylinux1-x86_64 \
bash -c "manylinux1/build_wheels.sh"

View File

@ -0,0 +1,26 @@
#!/bin/bash
set -e -x
# preserve dist
if [ -d dist ]; then mv dist tmpdist; fi
# Compile wheels
for PYBIN in /opt/python/*/bin; do
"${PYBIN}/python" setup.py bdist_wheel
rm -rf .eggs
done
# Bundle external shared libraries into the wheels
for whl in dist/*.whl; do
auditwheel repair "$whl" -w tmpdist/
done
# restore dist
rm -rf dist && mv tmpdist dist
# Install packages and test
for PYBIN in /opt/python/*/bin/; do
"${PYBIN}/pip" install -r requirements/test.txt
"${PYBIN}/pip" install wolfcrypt --no-index -f dist
"${PYBIN}/py.test" tests
done