From 9ee3644386b8c674287dd94efa19f813462fff5c Mon Sep 17 00:00:00 2001 From: Markus Unterwaditzer Date: Fri, 27 Jun 2025 21:57:44 +0200 Subject: [PATCH 1/7] Add validation step that wheels actually work --- .github/workflows/build-streams.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/build-streams.yaml b/.github/workflows/build-streams.yaml index 9d7de60e..7d9f0129 100644 --- a/.github/workflows/build-streams.yaml +++ b/.github/workflows/build-streams.yaml @@ -79,6 +79,15 @@ jobs: working-directory: ./sentry_streams docker-options: -e CMAKE_POLICY_VERSION_MINIMUM=3.5 + + - name: Validate wheels + run: | + python -m venv tmp_venv + . tmp_venv/bin/activate + cd tmp_venv/ + pip install ./sentry_streams/dist/* + python -c 'import sentry_streams' + python -c 'import sentry_streams.rust_streams' - name: Upload wheels uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 with: From 34d3df03844d5afd299c39a61416358a4f9a1d0a Mon Sep 17 00:00:00 2001 From: Markus Unterwaditzer Date: Fri, 27 Jun 2025 22:01:18 +0200 Subject: [PATCH 2/7] fix path --- .github/workflows/build-streams.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-streams.yaml b/.github/workflows/build-streams.yaml index 7d9f0129..34ec8a2c 100644 --- a/.github/workflows/build-streams.yaml +++ b/.github/workflows/build-streams.yaml @@ -85,7 +85,7 @@ jobs: python -m venv tmp_venv . tmp_venv/bin/activate cd tmp_venv/ - pip install ./sentry_streams/dist/* + pip install ../sentry_streams/dist/* python -c 'import sentry_streams' python -c 'import sentry_streams.rust_streams' - name: Upload wheels From c5a469378840be17e99aad08a3f60d72c7573170 Mon Sep 17 00:00:00 2001 From: Markus Unterwaditzer Date: Mon, 30 Jun 2025 11:08:40 +0200 Subject: [PATCH 3/7] add ls --- .github/workflows/build-streams.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build-streams.yaml b/.github/workflows/build-streams.yaml index 34ec8a2c..d3859e2d 100644 --- a/.github/workflows/build-streams.yaml +++ b/.github/workflows/build-streams.yaml @@ -85,6 +85,7 @@ jobs: python -m venv tmp_venv . tmp_venv/bin/activate cd tmp_venv/ + ls ../sentry_streams/dist pip install ../sentry_streams/dist/* python -c 'import sentry_streams' python -c 'import sentry_streams.rust_streams' From 1f42dfe9523a3e04e96fafe7961c365dd6217036 Mon Sep 17 00:00:00 2001 From: Markus Unterwaditzer Date: Mon, 30 Jun 2025 13:25:55 +0200 Subject: [PATCH 4/7] fix --- .github/workflows/build-streams.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-streams.yaml b/.github/workflows/build-streams.yaml index d3859e2d..c6f85575 100644 --- a/.github/workflows/build-streams.yaml +++ b/.github/workflows/build-streams.yaml @@ -86,7 +86,7 @@ jobs: . tmp_venv/bin/activate cd tmp_venv/ ls ../sentry_streams/dist - pip install ../sentry_streams/dist/* + pip install ../sentry_streams/dist/*cp311* python -c 'import sentry_streams' python -c 'import sentry_streams.rust_streams' - name: Upload wheels From 8d3be9acc7dc5a860e73ca58ceaf2aa5e6aa9be3 Mon Sep 17 00:00:00 2001 From: Markus Unterwaditzer Date: Mon, 30 Jun 2025 14:40:53 +0200 Subject: [PATCH 5/7] use abi3 --- sentry_streams/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sentry_streams/Cargo.toml b/sentry_streams/Cargo.toml index ed27a32b..9aa3982b 100644 --- a/sentry_streams/Cargo.toml +++ b/sentry_streams/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" edition = "2021" [dependencies] -pyo3 = { version = "0.24.0"} +pyo3 = { version = "0.24.0", features = ["abi3"] } serde = { version = "1.0", features = ["derive"] } sentry_arroyo = "2.19.5" chrono = "0.4.40" From 8c65358d90dd97d4c42caa9c1e48d668eab1a6eb Mon Sep 17 00:00:00 2001 From: Markus Unterwaditzer Date: Tue, 1 Jul 2025 16:23:09 +0200 Subject: [PATCH 6/7] test --- .github/workflows/build-streams.yaml | 43 ++++++++++++++++++++++++---- sentry_streams/Cargo.toml | 2 +- sentry_streams/pyproject.toml | 1 + 3 files changed, 39 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-streams.yaml b/.github/workflows/build-streams.yaml index c6f85575..f3731709 100644 --- a/.github/workflows/build-streams.yaml +++ b/.github/workflows/build-streams.yaml @@ -82,13 +82,12 @@ jobs: - name: Validate wheels run: | + ls sentry_streams/dist python -m venv tmp_venv . tmp_venv/bin/activate - cd tmp_venv/ - ls ../sentry_streams/dist - pip install ../sentry_streams/dist/*cp311* - python -c 'import sentry_streams' - python -c 'import sentry_streams.rust_streams' + pip install sentry_streams/dist/*abi3*.whl + python -c 'import sentry_streams; print("✓ sentry_streams imported successfully")' + python -c 'import sentry_streams.rust_streams; print("✓ rust_streams imported successfully")' - name: Upload wheels uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 with: @@ -112,11 +111,43 @@ jobs: name: wheels-sdist path: ./sentry_streams/dist + test-wheels: + permissions: read-all + name: Test wheels on multiple Python versions + runs-on: ${{ matrix.platform.runner }} + needs: [macos] + strategy: + matrix: + platform: + - runner: macos-latest + target: x86_64 + - runner: macos-latest + target: aarch64 + python-version: ['3.11', '3.12', '3.13'] + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 + with: + python-version: ${{ matrix.python-version }} + - name: Download wheels + uses: actions/download-artifact@c0cfd0a45de93f63d5fc8bf01b9a901b6d3b79f8 + with: + name: wheels-macos-${{ matrix.platform.target }} + path: ./dist + - name: Test wheel + run: | + ls ./dist + python -m venv test_venv + . test_venv/bin/activate + pip install ./dist/*abi3*.whl + python -c 'import sentry_streams; print("✓ sentry_streams imported successfully on Python ${{ matrix.python-version }}")' + python -c 'import sentry_streams.rust_streams; print("✓ rust_streams imported successfully on Python ${{ matrix.python-version }}")' + merge: permissions: read-all name: Create Release Artifact runs-on: ubuntu-latest - needs: [linux, macos, sdist] + needs: [linux, macos, sdist, test-wheels] steps: - uses: actions/upload-artifact/merge@ea165f8d65b6e75b540449e92b4886f43607fa02 with: diff --git a/sentry_streams/Cargo.toml b/sentry_streams/Cargo.toml index 9aa3982b..63932e45 100644 --- a/sentry_streams/Cargo.toml +++ b/sentry_streams/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" edition = "2021" [dependencies] -pyo3 = { version = "0.24.0", features = ["abi3"] } +pyo3 = { version = "0.24.0", features = ["abi3", "abi3-py311"] } serde = { version = "1.0", features = ["derive"] } sentry_arroyo = "2.19.5" chrono = "0.4.40" diff --git a/sentry_streams/pyproject.toml b/sentry_streams/pyproject.toml index 4f233387..6b4aa0ac 100644 --- a/sentry_streams/pyproject.toml +++ b/sentry_streams/pyproject.toml @@ -37,6 +37,7 @@ dev = [ [tool.maturin] module-name = "sentry_streams.rust_streams" +python-versions = "3.11" [tool.setuptools.package-data] sentry_streams = ["py.typed", "config.json", "deployment_config/test_flink_config.yaml"] From 6eb9568ffd11fdf8ee319ca24b1071599d621375 Mon Sep 17 00:00:00 2001 From: Markus Unterwaditzer Date: Tue, 1 Jul 2025 19:28:32 +0200 Subject: [PATCH 7/7] test --- sentry_streams/pyproject.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/sentry_streams/pyproject.toml b/sentry_streams/pyproject.toml index 6b4aa0ac..4f233387 100644 --- a/sentry_streams/pyproject.toml +++ b/sentry_streams/pyproject.toml @@ -37,7 +37,6 @@ dev = [ [tool.maturin] module-name = "sentry_streams.rust_streams" -python-versions = "3.11" [tool.setuptools.package-data] sentry_streams = ["py.typed", "config.json", "deployment_config/test_flink_config.yaml"]