Skip to content

Commit

Permalink
fix openssl build, take 3
Browse files Browse the repository at this point in the history
  • Loading branch information
TheEnbyperor committed Oct 15, 2023
1 parent 410e59b commit ecb18f9
Showing 1 changed file with 29 additions and 23 deletions.
52 changes: 29 additions & 23 deletions .github/workflows/wheels.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,15 @@ on: [push, pull_request]

jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
name: Build wheels on ${{ matrix.target }}
runs-on: ubuntu-latest
strategy:
matrix:
os: ["ubuntu-latest", "macos-latest"]
target:
- x86
- x86_64
- aarch64
- armv7

steps:
- uses: actions/checkout@v3
Expand All @@ -17,29 +21,31 @@ jobs:
with:
python-version: '3.11'

- name: Install cibuildwheel
run: python -m pip install cibuildwheel

- name: Build wheels
if: matrix.os == 'ubuntu-latest'
run: python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_BEFORE_ALL: "apt-get install libipc-run-perl"
CIBW_BUILD_FRONTEND: "build"
CIBW_ENVIRONMENT: "PATH=\"$PATH:$HOME/.cargo/bin\""
CIBW_SKIP: "*_i686 cp36-*"

- name: Build wheels
if: matrix.os != 'ubuntu-latest'
run: python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_BUILD_FRONTEND: "build"
CIBW_ENVIRONMENT: "PATH=\"$PATH:$HOME/.cargo/bin\""
CIBW_SKIP: "*_i686 cp36-*"
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
manylinux: auto
args: --release --out dist
before-script-linux: |
# If we're running on rhel centos, install needed packages.
if command -v yum &> /dev/null; then
yum update -y && yum install -y perl-core openssl openssl-devel pkgconfig libatomic
- uses: actions/upload-artifact@v3
# If we're running on i686 we need to symlink libatomic
# in order to build openssl with -latomic flag.
if [[ ! -d "/usr/lib64" ]]; then
ln -s /usr/lib/libatomic.so.1 /usr/lib/libatomic.so
fi
else
# If we're running on debian-based system.
apt update -y && apt-get install -y libssl-dev openssl pkg-config
fi
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl
name: wheels
path: dist

build_sdist:
name: Build source distribution
Expand Down

0 comments on commit ecb18f9

Please sign in to comment.