From 7b6202b587dd321af27433e8cc18f9d54fc96522 Mon Sep 17 00:00:00 2001 From: Jakob Kraus Date: Thu, 23 Jan 2025 19:23:14 +0100 Subject: [PATCH] fix: publish action --- .github/workflows/publish.yml | 70 ++++++++++++----------------------- rustmodels/Cargo.toml | 2 +- 2 files changed, 24 insertions(+), 48 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 5e05efb..dbc040a 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -8,120 +8,96 @@ permissions: jobs: linux: - runs-on: ${{ matrix.platform.runner }} + runs-on: ubuntu-22.04 strategy: matrix: - platform: - - runner: ubuntu-22.04 - target: x86_64 - - runner: ubuntu-22.04 - target: x86 - - runner: ubuntu-22.04 - target: aarch64 - - runner: ubuntu-22.04 - target: armv7 - - runner: ubuntu-22.04 - target: ppc64le + target: [x86_64, x86, aarch64, armv7, ppc64le] steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: - python-version: 3.x + python-version: "3.10" + - name: Verify Python Interpreter + run: python --version && python -c "import platform; print(platform.python_implementation())" - name: Build wheels uses: PyO3/maturin-action@v1 with: - target: ${{ matrix.platform.target }} + target: ${{ matrix.target }} args: --release --out dist --find-interpreter sccache: "true" manylinux: auto - name: Upload wheels uses: actions/upload-artifact@v4 with: - name: wheels-linux-${{ matrix.platform.target }} + name: wheels-linux-${{ matrix.target }} path: dist musllinux: - runs-on: ${{ matrix.platform.runner }} + runs-on: ubuntu-22.04 strategy: matrix: - platform: - - runner: ubuntu-22.04 - target: x86_64 - - runner: ubuntu-22.04 - target: x86 - - runner: ubuntu-22.04 - target: aarch64 - - runner: ubuntu-22.04 - target: armv7 + target: [x86_64, x86, aarch64, armv7] steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: - python-version: 3.x + python-version: "3.10" - name: Build wheels uses: PyO3/maturin-action@v1 with: - target: ${{ matrix.platform.target }} + target: ${{ matrix.target }} args: --release --out dist --find-interpreter sccache: "true" manylinux: musllinux_1_2 - name: Upload wheels uses: actions/upload-artifact@v4 with: - name: wheels-musllinux-${{ matrix.platform.target }} + name: wheels-musllinux-${{ matrix.target }} path: dist windows: - runs-on: ${{ matrix.platform.runner }} + runs-on: windows-latest strategy: matrix: - platform: - - runner: windows-latest - target: x64 - - runner: windows-latest - target: x86 + target: [x64, x86] steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: - python-version: 3.x - architecture: ${{ matrix.platform.target }} + python-version: "3.10" + architecture: ${{ matrix.target }} - name: Build wheels uses: PyO3/maturin-action@v1 with: - target: ${{ matrix.platform.target }} + target: ${{ matrix.target }} args: --release --out dist --find-interpreter sccache: "true" - name: Upload wheels uses: actions/upload-artifact@v4 with: - name: wheels-windows-${{ matrix.platform.target }} + name: wheels-windows-${{ matrix.target }} path: dist macos: - runs-on: ${{ matrix.platform.runner }} + runs-on: macos-latest strategy: matrix: - platform: - - runner: macos-12 - target: x86_64 - - runner: macos-14 - target: aarch64 + target: [x86_64, aarch64] steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: - python-version: 3.x + python-version: "3.10" - name: Build wheels uses: PyO3/maturin-action@v1 with: - target: ${{ matrix.platform.target }} + target: ${{ matrix.target }} args: --release --out dist --find-interpreter sccache: "true" - name: Upload wheels uses: actions/upload-artifact@v4 with: - name: wheels-macos-${{ matrix.platform.target }} + name: wheels-macos-${{ matrix.target }} path: dist sdist: diff --git a/rustmodels/Cargo.toml b/rustmodels/Cargo.toml index 294435e..983df0c 100644 --- a/rustmodels/Cargo.toml +++ b/rustmodels/Cargo.toml @@ -11,7 +11,7 @@ crate-type = ["cdylib"] medmodels-core = { workspace = true } medmodels-utils = { workspace = true } -pyo3 = { version = "0.22", features = ["chrono"] } +pyo3 = { version = "0.22", features = ["chrono", "extension-module"] } pyo3-polars = "0.19.0" polars = { workspace = true } chrono = { workspace = true }