From 0d2e988f978e1c1cb8b33f7385b096ec460dba29 Mon Sep 17 00:00:00 2001 From: Pete Gadomski Date: Thu, 6 Feb 2025 10:45:35 -0700 Subject: [PATCH 1/5] ci: guess-and-check wheel build fixes --- .github/workflows/pypi.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pypi.yaml b/.github/workflows/pypi.yaml index cdccfa2..0504db6 100644 --- a/.github/workflows/pypi.yaml +++ b/.github/workflows/pypi.yaml @@ -21,7 +21,7 @@ jobs: platform: - runner: ubuntu-latest target: x86_64 - manylinux: auto + manylinux: "2_28" - runner: ubuntu-latest target: x86 manylinux: auto From 03f5d432fe1c1946f6150a572ae82bccb8d91aaf Mon Sep 17 00:00:00 2001 From: Pete Gadomski Date: Thu, 6 Feb 2025 12:47:18 -0700 Subject: [PATCH 2/5] undo one thing --- .github/workflows/pypi.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pypi.yaml b/.github/workflows/pypi.yaml index 0504db6..cdccfa2 100644 --- a/.github/workflows/pypi.yaml +++ b/.github/workflows/pypi.yaml @@ -21,7 +21,7 @@ jobs: platform: - runner: ubuntu-latest target: x86_64 - manylinux: "2_28" + manylinux: auto - runner: ubuntu-latest target: x86 manylinux: auto From 374d7417d91cb74190353fe5c06e4fe265e3d44d Mon Sep 17 00:00:00 2001 From: Pete Gadomski Date: Thu, 6 Feb 2025 12:51:40 -0700 Subject: [PATCH 3/5] feat: try a re-gen --- .github/workflows/pypi.yaml | 55 ++++++++++++++++++------------------- 1 file changed, 27 insertions(+), 28 deletions(-) diff --git a/.github/workflows/pypi.yaml b/.github/workflows/pypi.yaml index cdccfa2..87c7152 100644 --- a/.github/workflows/pypi.yaml +++ b/.github/workflows/pypi.yaml @@ -2,6 +2,8 @@ name: PyPI on: push: + branches: + - main tags: - "v*" workflow_dispatch: @@ -19,24 +21,18 @@ jobs: strategy: matrix: platform: - - runner: ubuntu-latest + - runner: ubuntu-22.04 target: x86_64 - manylinux: auto - - runner: ubuntu-latest + - runner: ubuntu-22.04 target: x86 - manylinux: auto - - runner: ubuntu-latest + - runner: ubuntu-22.04 target: aarch64 - manylinux: "2_28" - - runner: ubuntu-latest + - runner: ubuntu-22.04 target: armv7 - manylinux: auto - - runner: ubuntu-latest + - runner: ubuntu-22.04 target: s390x - manylinux: auto - - runner: ubuntu-latest + - runner: ubuntu-22.04 target: ppc64le - manylinux: auto steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 @@ -47,8 +43,8 @@ jobs: with: target: ${{ matrix.platform.target }} args: --release --out dist --find-interpreter -F duckdb/bundled - sccache: "true" - manylinux: ${{ matrix.platform.manylinux }} + sccache: ${{ !startsWith(github.ref, 'refs/tags/') }} + manylinux: auto - name: Upload wheels uses: actions/upload-artifact@v4 with: @@ -60,13 +56,13 @@ jobs: strategy: matrix: platform: - - runner: ubuntu-latest + - runner: ubuntu-22.04 target: x86_64 - - runner: ubuntu-latest + - runner: ubuntu-22.04 target: x86 - - runner: ubuntu-latest + - runner: ubuntu-22.04 target: aarch64 - - runner: ubuntu-latest + - runner: ubuntu-22.04 target: armv7 steps: - uses: actions/checkout@v4 @@ -78,7 +74,7 @@ jobs: with: target: ${{ matrix.platform.target }} args: --release --out dist --find-interpreter -F duckdb/bundled - sccache: "true" + sccache: ${{ !startsWith(github.ref, 'refs/tags/') }} manylinux: musllinux_1_2 - name: Upload wheels uses: actions/upload-artifact@v4 @@ -86,7 +82,6 @@ jobs: name: wheels-musllinux-${{ matrix.platform.target }} path: dist - # https://github.com/gadomski/stacrs/issues/1 # windows: # runs-on: ${{ matrix.platform.runner }} # strategy: @@ -106,8 +101,8 @@ jobs: # uses: PyO3/maturin-action@v1 # with: # target: ${{ matrix.platform.target }} - # args: --release --out dist --find-interpreter - # sccache: "true" + # args: --release --out dist --find-interpreter -F duckdb/bundled + # sccache: ${{ !startsWith(github.ref, 'refs/tags/') }} # - name: Upload wheels # uses: actions/upload-artifact@v4 # with: @@ -133,7 +128,7 @@ jobs: with: target: ${{ matrix.platform.target }} args: --release --out dist --find-interpreter -F duckdb/bundled - sccache: "true" + sccache: ${{ !startsWith(github.ref, 'refs/tags/') }} - name: Upload wheels uses: actions/upload-artifact@v4 with: @@ -159,10 +154,12 @@ jobs: name: Release runs-on: ubuntu-latest if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }} - needs: [linux, musllinux, macos, sdist] - environment: - name: pypi - url: https://pypi.org/p/stacrs + needs: + - linux + - musllinux + # - windows + - macos + - sdist permissions: id-token: write contents: write @@ -173,7 +170,9 @@ jobs: uses: actions/attest-build-provenance@v1 with: subject-path: "wheels-*/*" - - uses: PyO3/maturin-action@v1 + - name: Publish to PyPI + if: ${{ startsWith(github.ref, 'refs/tags/') }} + uses: PyO3/maturin-action@v1 with: command: upload args: --non-interactive --skip-existing wheels-*/* From cd4db1ac76eb9e82080a66c92bd5e4ea01887947 Mon Sep 17 00:00:00 2001 From: Pete Gadomski Date: Thu, 6 Feb 2025 12:58:01 -0700 Subject: [PATCH 4/5] extension module --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 5639afe..3d0ef17 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ crate-type = ["cdylib"] [dependencies] duckdb = { version = "1.1.1" } geojson = "0.24.1" -pyo3 = "0.23.4" +pyo3 = { version = "0.23.4", features = ["extension-module"] } pyo3-async-runtimes = { version = "0.23.0", features = [ "tokio", "tokio-runtime", From a11cfa76b0e622c66877d1e7e9312ada1dc69e3f Mon Sep 17 00:00:00 2001 From: Pete Gadomski Date: Thu, 6 Feb 2025 13:17:10 -0700 Subject: [PATCH 5/5] maybe fix? --- .github/workflows/pypi.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pypi.yaml b/.github/workflows/pypi.yaml index 87c7152..3d717f9 100644 --- a/.github/workflows/pypi.yaml +++ b/.github/workflows/pypi.yaml @@ -23,16 +23,22 @@ jobs: platform: - runner: ubuntu-22.04 target: x86_64 + manylinux: auto - runner: ubuntu-22.04 target: x86 + manylinux: auto - runner: ubuntu-22.04 target: aarch64 + manylinux: "2_28" - runner: ubuntu-22.04 target: armv7 + manylinux: auto - runner: ubuntu-22.04 target: s390x + manylinux: auto - runner: ubuntu-22.04 target: ppc64le + manylinux: auto steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 @@ -44,7 +50,7 @@ jobs: target: ${{ matrix.platform.target }} args: --release --out dist --find-interpreter -F duckdb/bundled sccache: ${{ !startsWith(github.ref, 'refs/tags/') }} - manylinux: auto + manylinux: ${{ matrix.platform.manylinux }} - name: Upload wheels uses: actions/upload-artifact@v4 with: