Skip to content
Snippets Groups Projects
Commit e36060b9dd8c authored by Frank Bessou's avatar Frank Bessou :spider_web:
Browse files

chore: explicitly handle CI environment in build_wheel.sh

parent fa0c3de9b114
No related branches found
No related tags found
1 merge request!74Topic/default/publication on pypi
......@@ -2,4 +2,6 @@
set -ex
[ "$CI_PROJECT_DIR" ] && SOURCE_DIR="$CI_PROJECT_DIR" || SOURCE_DIR="/mnt/host/RQL"
mkdir -p dist
......@@ -5,5 +7,5 @@
mkdir -p dist
if ! test -e /.dockerenv; then
exec docker run --rm -it -v $(pwd):/mnt/host/rql quay.io/pypa/manylinux_2_24_x86_64 sh /mnt/host/rql/$0
if ! test -e /.dockerenv && [ ! "$GITLAB_CI" ] ; then
exec docker run --rm -it -v "$(pwd)":"$SOURCE_DIR" quay.io/pypa/manylinux_2_24_x86_64 sh "$SOURCE_DIR"/"$0"
fi
......@@ -8,6 +10,6 @@
fi
cd /mnt/host
cd "$SOURCE_DIR"
VERSION=6.2.0
curl -L https://github.com/Gecode/gecode/archive/refs/tags/release-$VERSION.tar.gz | tar -xzf -
......@@ -22,7 +24,7 @@
mkdir -p /wheelhouse
# Compile wheels
for PYBIN in $PYBINS; do
"${PYBIN}/pip" wheel --use-feature=in-tree-build /mnt/host/rql -w /wheelhouse
"${PYBIN}/pip" wheel "$SOURCE_DIR" -w /wheelhouse
done
# Bundle external shared libraries into the wheels
......@@ -35,5 +37,5 @@
"${PYBIN}/pip" install pytest
"${PYBIN}/pip" install rql --no-index -f /wheelhouse
echo "************ test on $PYBIN"
(cd "/mnt/host"; "${PYBIN}/py.test" rql)
(cd "$SOURCE_DIR"; "${PYBIN}/py.test" rql)
done
......@@ -39,2 +41,2 @@
done
mv /wheelhouse/rql*manylinux*.whl /mnt/host/rql/dist/
mv /wheelhouse/rql*manylinux*.whl "$SOURCE_DIR"/dist/
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment