Skip to content

Commit

Permalink
Merge pull request #1736 from mabel-dev/#1700
Browse files Browse the repository at this point in the history
  • Loading branch information
joocer authored Jun 6, 2024
2 parents b33884f + 7fd3ccb commit 2019a13
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 15 deletions.
34 changes: 21 additions & 13 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -165,13 +165,13 @@ jobs:
DEVELOPER_DIR: /Applications/Xcode.app/Contents/Developer
MACOSX_DEPLOYMENT_TARGET: '10.15'
ARCHFLAGS: -arch x86_64 -arch arm64
PYO3_CROSS_LIB_DIR: /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/${{ matrix.python-version }}/lib
PYO3_CROSS: 1
PYO3_CROSS_PYTHON_VERSION: ${{ matrix.python-version }}
PYO3_CROSS_PYTHON_IMPLEMENTATION: CPython
PYO3_NO_PYTHON: 1
RUST_BACKTRACE: 1
run: python setup.py bdist_wheel
CARGO_PROFILE_RELEASE_BUILD_OVERRIDE_DEBUG: true
run: cargo build --release --target aarch64-apple-darwin

- name: Archive dist artifacts
uses: actions/upload-artifact@v1
Expand All @@ -182,37 +182,45 @@ jobs:
build-windows:
runs-on: windows-latest
strategy:
max-parallel: 3
max-parallel: 4
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12']

steps:
- uses: actions/checkout@master

- name: Download Build Tools for Visual Studio 2019
run: Invoke-WebRequest -Uri https://aka.ms/vs/16/release/vs_buildtools.exe -OutFile vs_buildtools.exe
- uses: actions/[email protected]

- name: Run vs_buildtools.exe install
run: ./vs_buildtools.exe --quiet --wait --norestart --nocache --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --add Microsoft.VisualStudio.Component.VC.v141.x86.x64 --add Microsoft.VisualStudio.Component.VC.140 --includeRecommended
- name: Install rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true

- name: Set up Python ${{ matrix.python-version }} x64
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
architecture: x64

- name: Install Python package dependencies
run: python -m pip install --upgrade cython wheel numpy setuptools_rust

- name: Build binary wheel
run: python setup.py bdist_wheel
- name: Build on Windows
shell: bash
env:
PYO3_CROSS: 1
PYO3_CROSS_PYTHON_VERSION: ${{ matrix.python-version }}
PYO3_CROSS_PYTHON_IMPLEMENTATION: CPython
PYO3_NO_PYTHON: 1
RUST_BACKTRACE: 1
CARGO_PROFILE_RELEASE_BUILD_OVERRIDE_DEBUG: true
run: cargo build --release

- name: Archive dist artifacts
uses: actions/upload-artifact@v1
with:
name: dist-windows-${{ matrix.python-version }}
path: dist


# build-macos,
upload:
needs: [build-linux-cp39, build-linux-cp310, build-linux-cp311, build-linux-cp312, build-windows]
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ name = "compute"
crate-type = ["cdylib"]

[dependencies]
pyo3 = { version = "0.20.3", features = ["extension-module", "abi3-py310"] }
pyo3 = { version = "0.20.3", features = ["extension-module", "abi3-py39"] }
numpy = "0.20"
ndarray = "0.15.3"
pythonize = "0.20"
Expand Down
2 changes: 1 addition & 1 deletion opteryx/__version__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__build__ = 561
__build__ = 564

# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down

0 comments on commit 2019a13

Please sign in to comment.