Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add kernel-release.yml #539

Closed
wants to merge 15 commits into from
81 changes: 81 additions & 0 deletions .github/workflows/kernel-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: Build wheels for delta-kernel-python 1

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: 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 (x86_64 Linux)
if: matrix.os == 'ubuntu-latest' && matrix.arch == 'x86_64'
run: |
cd python/delta-kernel-python
maturin build --release
shell: bash

- name: Upload wheels
uses: actions/upload-artifact@v2
with:
name: wheels
path: python/delta-kernel-python/target/wheels/*.whl
1 change: 1 addition & 0 deletions python/delta-kernel-python/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ crate-type = ["cdylib"]
[dependencies]
arrow = { version = "^52.0", features = ["pyarrow"] }
delta_kernel = {version = "^0.2", features = ["cloud", "default", "default-engine"]}
openssl = { version = "0.10", features = ["vendored"] }
url = "2"

[dependencies.pyo3]
Expand Down
Loading