Release Updates #38
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build wheels | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
python-version: [3.8] | |
arch: [x86_64, arm64] | |
include: | |
- os: macos-latest | |
arch: x86_64 | |
- os: macos-latest | |
arch: arm64 | |
- os: ubuntu-latest | |
arch: x86_64 | |
- os: ubuntu-latest | |
arch: arm64 | |
- os: windows-latest | |
arch: x86_64 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Rust (Linux and macOS) | |
if: runner.os != 'Windows' | |
run: | | |
curl https://sh.rustup.rs -sSf | sh -s -- -y | |
source $HOME/.cargo/env | |
shell: bash | |
- name: Install maturin | |
run: pip install maturin | |
- name: Build wheel (x86_64 macOS) | |
if: matrix.os == 'macos-latest' && matrix.arch == 'x86_64' | |
run: | | |
rustup target add x86_64-apple-darwin | |
cd python/delta-kernel-python | |
maturin build --release --target x86_64-apple-darwin | |
shell: bash | |
- name: Build wheel (ARM macOS) | |
if: matrix.os == 'macos-latest' && matrix.arch == 'arm64' | |
run: | | |
rustup target add aarch64-apple-darwin | |
cd python/delta-kernel-python | |
maturin build --release --target aarch64-apple-darwin | |
shell: bash | |
- name: Build wheel (Windows) | |
if: runner.os == 'Windows' | |
run: | | |
cd python/delta-kernel-python | |
maturin build --release | |
shell: powershell | |
- name: Build wheel (Linux x86_64) | |
if: matrix.os == 'ubuntu-latest' && matrix.arch == 'x86_64' | |
run: | | |
cd python/delta-kernel-python | |
maturin build --release | |
shell: bash | |
- name: Build wheel (Linux arm64) | |
if: matrix.os == 'ubuntu-latest' && matrix.arch == 'arm64' | |
run: | | |
sudo dpkg --add-architecture arm64 | |
sudo apt-get update | |
sudo apt-get install -y gcc-aarch64-linux-gnu | |
sudo apt-get install -y libssl-dev:arm64 libc6-dev-arm64-cross | |
rustup target add aarch64-unknown-linux-gnu | |
cd python/delta-kernel-python | |
export OPENSSL_DIR=/usr/aarch64-linux-gnu | |
export OPENSSL_LIB_DIR=/usr/aarch64-linux-gnu/lib | |
export OPENSSL_INCLUDE_DIR=/usr/aarch64-linux-gnu/include | |
export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc | |
export CC_aarch64_unknown_linux_gnu=aarch64-linux-gnu-gcc | |
export CXX_aarch64_unknown_linux_gnu=aarch64-linux-gnu-g++ | |
PKG_CONFIG_PATH="/usr/lib/aarch64-linux-gnu/pkgconfig" \ | |
PKG_CONFIG_ALLOW_CROSS=1 \ | |
OPENSSL_STATIC=1 \ | |
maturin build --release --target aarch64-unknown-linux-gnu | |
shell: bash | |
- name: Upload wheels | |
uses: actions/upload-artifact@v2 | |
with: | |
name: wheels | |
path: python/delta-kernel-python/target/wheels/*.whl |