Skip to content

cleanup print statements computeMatrix #7

cleanup print statements computeMatrix

cleanup print statements computeMatrix #7

Workflow file for this run

name: build wheels
# maturin generate-ci github > .github/workflows/maturin.yml
# Also, see: https://github.com/jackh726/bigtools/blob/master/.github/workflows/release-python.yml
on:
push:
pull_request:
permissions:
contents: read
jobs:
linux:
runs-on: ${{ matrix.platform.runner }}
strategy:
matrix:
platform:
- runner: ubuntu-22.04
target: x86_64
- runner: ubuntu-22.04
target: aarch64
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.x
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --release --out dist --find-interpreter
# sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
manylinux: 2_28
before-script-linux: |
set -ex
cat /etc/*release*
if [ "${{ matrix.platform.target }}" = "x86_64" ]; then
# maturin-action's manylinux switches to AlmaLinux 8
dnf install -y epel-release && dnf update -y
dnf install -y gcc gcc-c++ make perl curl clang xz-devel pkgconfig
## we've vendored openssl via Cargo.toml anyway, so this part is no longer used...
# dnf install -y openssl-devel
# export OPENSSL_INCLUDE_DIR=$(pkg-config --variable=includedir openssl)
# export OPENSSL_LIB_DIR=$(pkg-config --variable=libdir openssl)
# export OPENSSL_DIR="$OPENSSL_LIB_DIR/ssl"
elif [ "${{ matrix.platform.target }}" = "aarch64" ]; then
# cross-compiling on Ubuntu 22.04
## We're vendoring openssl because libssl-dev:aarch64 is not available!
apt-get update
apt-get install -y build-essential perl curl clang liblzma-dev pkg-config \
gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libc6-dev-arm64-cross crossbuild-essential-arm64
# export OPENSSL_LIB_DIR=/usr/lib/aarch64-linux-gnu
# export OPENSSL_INCLUDE_DIR=/usr/include/aarch64-linux-gnu
# export OPENSSL_DIR=/usr/lib/aarch64-linux-gnu
# export OPENSSL_NO_VENDOR=1
fi
# export OPENSSL_NO_VENDOR=1
# if [ -z "$OPENSSL_LIB_DIR" ] || [ -z "$OPENSSL_INCLUDE_DIR" ]; then
# echo "OpenSSL development files are not installed or pkg-config is not configured correctly."
# exit 1
# fi
# env | grep SSL # for debugging when rust crate fails to find headers
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-linux-${{ matrix.platform.target }}
path: dist
musllinux:
runs-on: ${{ matrix.platform.runner }}
strategy:
matrix:
platform:
- runner: ubuntu-22.04
target: x86_64
- runner: ubuntu-22.04
target: aarch64
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.x
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --release --out dist --find-interpreter
# sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
manylinux: musllinux_1_2
before-script-linux: |
apt-get update
apt-get install -y musl-tools musl-dev
if [ "${{ matrix.platform.target }}" = "aarch64" ]; then
apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
fi
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-musllinux-${{ matrix.platform.target }}
path: dist
# windows:
# runs-on: ${{ matrix.platform.runner }}
# strategy:
# matrix:
# platform:
# - runner: windows-latest
# target: x64
# - runner: windows-latest
# target: x86
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-python@v5
# with:
# python-version: 3.x
# architecture: ${{ matrix.platform.target }}
# - name: Install And Configure Dependencies
# env:
# VCPKG_DEFAULT_TRIPLET: ${{ matrix.platform.target }}-windows
# OPENSSL_DIR: ${{ github.workspace }}/vcpkg/installed/${{ matrix.platform.target }}-windows
# OPENSSL_ROOT: ${{ github.workspace }}/vcpkg/installed/${{ matrix.platform.target }}-windows
# LZMA_ROOT: ${{ github.workspace }}/vcpkg/installed/${{ matrix.platform.target }}-windows
# run: |
# vcpkg install openssl liblzma
# - name: Build wheels
# uses: PyO3/maturin-action@v1
# with:
# target: ${{ matrix.platform.target }}
# args: --release --out dist --find-interpreter
# # sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
# - name: Upload wheels
# uses: actions/upload-artifact@v4
# with:
# name: wheels-windows-${{ matrix.platform.target }}
# path: dist
macos:
runs-on: ${{ matrix.platform.runner }}
strategy:
matrix:
platform:
- runner: macos-13
target: x86_64
- runner: macos-14
target: aarch64
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.x
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --release --out dist --find-interpreter
# sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-macos-${{ matrix.platform.target }}
path: dist
sdist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build sdist
uses: PyO3/maturin-action@v1
with:
command: sdist
args: --out dist
# sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
- name: Upload sdist
uses: actions/upload-artifact@v4
with:
name: wheels-sdist
path: dist
release:
name: Release
runs-on: ubuntu-latest
if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
needs: [linux, macos, sdist]
permissions:
id-token: write
contents: write
attestations: write
steps:
- uses: actions/download-artifact@v4
- name: Generate artifact attestation
uses: actions/attest-build-provenance@v1
with:
subject-path: 'wheels-*/*'
- name: Publish to PyPI
if: ${{ startsWith(github.ref, 'refs/tags/') }}
uses: PyO3/maturin-action@v1
env:
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
with:
command: upload
args: --non-interactive --skip-existing wheels-*/*