Skip to content

Commit

Permalink
tweak CI builds (#9)
Browse files Browse the repository at this point in the history
* tweak CI builds

* Update CI.yml
  • Loading branch information
diceroll123 authored Jan 14, 2024
1 parent 8f6f8ba commit 4c9ced5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 47 deletions.
54 changes: 8 additions & 46 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: CI

on:
workflow_dispatch:
pull_request:
push:
tags: ["v*"]

Expand All @@ -16,19 +17,13 @@ jobs:
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: "Build wheels - x86_64"
uses: PyO3/maturin-action@v1
with:
target: x86_64
args: --release -i python${{ matrix.python-version }} --out dist
args: --release --find-interpreter --out dist
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
Expand All @@ -39,18 +34,12 @@ jobs:
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: "Build wheels - universal"
uses: PyO3/maturin-action@v1
with:
args: --release -i python${{ matrix.python-version }} --target universal2-apple-darwin --out dist
args: --release --find-interpreter --target universal2-apple-darwin --out dist
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
Expand All @@ -62,24 +51,16 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
platform:
- target: x86_64-pc-windows-msvc
arch: x64
- target: i686-pc-windows-msvc
arch: x86
- target: aarch64-pc-windows-msvc
arch: x64
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.platform.arch }}
- name: "Build wheels - windows"
uses: PyO3/maturin-action@v1
with:
args: --release -i python${{ matrix.python-version }} --out dist
args: --release --find-interpreter --out dist --target ${{ matrix.platform.target }}
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
Expand All @@ -91,23 +72,18 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
target:
- x86_64-unknown-linux-gnu
- i686-unknown-linux-gnu
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: "Build wheels - linux"
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
manylinux: auto
command: build
args: --release -i python${{ matrix.python-version }} -o dist
args: --release --find-interpreter -o dist
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
Expand All @@ -119,7 +95,6 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
platform:
- target: aarch64-unknown-linux-gnu
arch: aarch64
Expand All @@ -134,17 +109,13 @@ jobs:
arch: ppc64
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: "Build wheels - linux-cross"
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
manylinux: auto
docker-options: ${{ matrix.platform.maturin_docker_options }}
args: --release -i python${{ matrix.python-version }} -o dist
args: --release --find-interpreter -o dist
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
Expand All @@ -156,22 +127,17 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
target:
- x86_64-unknown-linux-musl
- i686-unknown-linux-musl
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: "Build wheels - musllinux"
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
manylinux: musllinux_1_2
args: --release -i python${{ matrix.python-version }} -o dist
args: --release --find-interpreter -o dist
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
Expand All @@ -183,7 +149,6 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
platform:
- target: aarch64-unknown-linux-musl
arch: aarch64
Expand All @@ -192,15 +157,12 @@ jobs:
arch: armv7
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: "Build wheels - musllinux-cross"
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
manylinux: musllinux_1_2
args: --release -i python${{ matrix.python-version }} -o dist
args: --release --find-interpreter -o dist
docker-options: ${{ matrix.platform.maturin_docker_options }}
- name: Upload wheels
uses: actions/upload-artifact@v3
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ name = "neofoodclub"
crate-type = ["cdylib"]

[dependencies]
pyo3 = { version = "0.17.3", features = ["extension-module"] }
pyo3 = { version = "0.17.3", features = ["extension-module", "abi3-py38"] }
numpy = "0.17.2"
itertools = "0.10.5"

Expand Down

0 comments on commit 4c9ced5

Please sign in to comment.