Skip to content

Commit

Permalink
Fixed wheel build process
Browse files Browse the repository at this point in the history
  • Loading branch information
TimSchneider42 committed May 27, 2024
1 parent 35911e5 commit adb4fd8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,12 @@ jobs:
- name: Install dependencies
run: |
set -a
. ./dependency_versions
set +a
./docker/common/install-dependencies
- name: Python package
run: |
yum -y install zip
./docker/common/manylinux-build-wheels
LIBFRANKA_VERSION=${{ inputs.libfranka-version }} ./docker/common/manylinux-build-wheels
- name: Upload wheels
uses: actions/upload-artifact@v3
Expand Down
3 changes: 2 additions & 1 deletion docker/build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ RUN mkdir -p /build
VOLUME /code
VOLUME /build
WORKDIR /build
ADD docker/common/manylinux-build-wheels /usr/bin/build-wheels
ADD docker/common/manylinux-build-wheels /usr/bin/manylinux-build-wheels
ADD docker/build/build-wheels /usr/bin/
ADD docker/build/run-tests /usr/bin/

# Cleaning up
Expand Down
11 changes: 7 additions & 4 deletions docker/common/manylinux-build-wheels
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/bin/bash
set -e

CODE_DIR="${1:-$(pwd)}"

# Log python versions
echo "Found the following Python versions:"
for PYBIN in /opt/python/*/bin; do
Expand All @@ -10,14 +12,16 @@ for PYBIN in /opt/python/*/bin; do
done

# Build python wheels
mkdir -p wheels
WHEELS_DIR="$(pwd)/wheels"
mkdir -p "${WHEELS_DIR}"
mkdir -p dist
mkdir -p dist_full

# Compile wheels
for PYBIN in /opt/python/*/bin; do
PYBIN_NAME="$(basename "$(dirname "$PYBIN")")"
if [[ "${PYBIN}" =~ ${PYBIN_SUPPORTED_VERSIONS} ]]; then
"${PYBIN}/pip" wheel /code -w wheels/
(mkdir -p "$PYBIN_NAME" && cd "$PYBIN_NAME" && "${PYBIN}/pip" wheel "$CODE_DIR" -w "${WHEELS_DIR}")
fi
done

Expand All @@ -42,5 +46,4 @@ echo "Built the following wheels:"
ls dist

mkdir -p output
libfranka_version=${{ inputs.libfranka-version }}
zip -r "output/libfranka_${libfranka_version//./-}_wheels.zip" dist/
zip -r "output/libfranka_${LIBFRANKA_VERSION//./-}_wheels.zip" dist/

0 comments on commit adb4fd8

Please sign in to comment.