diff --git a/.github/workflows/wheels.yaml b/.github/workflows/wheels.yaml index 7e90792..4d85af2 100644 --- a/.github/workflows/wheels.yaml +++ b/.github/workflows/wheels.yaml @@ -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 @@ -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