Skip to content

Commit

Permalink
Fix Linux build errors: update manylinux image and improve package in…
Browse files Browse the repository at this point in the history
…stallation
  • Loading branch information
oldip committed Sep 21, 2024
1 parent c3b05ef commit 2a04aeb
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and upload to PyPI
name: Build

on: [push, pull_request]

Expand Down Expand Up @@ -54,8 +54,25 @@ jobs:
CIBW_TEST_SKIP: "*-*linux_aarch64 *-macosx_arm64"
CIBW_BEFORE_BUILD_WINDOWS: "pip install delvewheel"
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: "delvewheel repair --add-path build\\pthreads;build\\lzma -w {dest_dir} {wheel}"
CIBW_BEFORE_ALL_LINUX: "yum install -y xz xz-devel || apk add xz-dev"
# CIBW_BEFORE_ALL_LINUX: "yum install -y xz xz-devel || apk add xz-dev"
CIBW_BUILD: "cp38-* cp39-* cp310-* cp311-* cp312-*"
# Use manylinux_2_28 image
CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28
CIBW_MANYLINUX_AARCH64_IMAGE: manylinux_2_28
# Robust package installation
CIBW_BEFORE_ALL_LINUX: |
if command -v dnf; then \
dnf install -y xz xz-devel; \
elif command -v yum; then \
yum install -y xz xz-devel; \
elif command -v apt-get; then \
apt-get update && apt-get install -y xz-utils liblzma-dev; \
elif command -v apk; then \
apk add xz-dev; \
else \
echo "No known package manager found"; \
exit 1; \
fi
- uses: actions/upload-artifact@v3
with:
Expand Down

0 comments on commit 2a04aeb

Please sign in to comment.