Skip to content

Commit 8f371f9

Browse files
funcppclaude
andcommitted
ci: add multi-platform release workflow
Build wheels for 5 targets (linux x86_64/aarch64, macos x86_64/aarch64, windows x86_64) on tag push, with smoke tests before PyPI publish via trusted publisher. Includes dependabot for action version updates. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 63a3775 commit 8f371f9

2 files changed

Lines changed: 109 additions & 0 deletions

File tree

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: github-actions
4+
directory: /
5+
schedule:
6+
interval: weekly

.github/workflows/release.yml

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v[0-9]+.[0-9]+.[0-9]+"
7+
- "v[0-9]+.[0-9]+.[0-9]+-*"
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
build:
14+
name: Build / ${{ matrix.target }}
15+
runs-on: ${{ matrix.os }}
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
include:
20+
- os: ubuntu-latest
21+
target: x86_64-unknown-linux-gnu
22+
- os: ubuntu-latest
23+
target: aarch64-unknown-linux-gnu
24+
qemu: true
25+
- os: macos-15-intel
26+
target: x86_64-apple-darwin
27+
- os: macos-14
28+
target: aarch64-apple-darwin
29+
- os: windows-latest
30+
target: x86_64-pc-windows-msvc
31+
steps:
32+
- uses: actions/checkout@v4
33+
34+
- uses: actions/setup-python@v5
35+
with:
36+
python-version: "3.12"
37+
38+
- name: Set up QEMU
39+
if: matrix.qemu
40+
uses: docker/setup-qemu-action@v3
41+
with:
42+
platforms: arm64
43+
44+
- uses: PyO3/maturin-action@v1
45+
with:
46+
target: ${{ matrix.target }}
47+
maturin-version: "v1.9.4"
48+
args: >-
49+
--release
50+
--out dist
51+
--manifest-path sqllineage-python/Cargo.toml
52+
manylinux: auto
53+
54+
- uses: actions/upload-artifact@v4
55+
with:
56+
name: wheel-${{ matrix.target }}
57+
path: dist/*.whl
58+
59+
test:
60+
name: Test / Python ${{ matrix.python-version }}
61+
needs: [build]
62+
runs-on: ubuntu-latest
63+
strategy:
64+
matrix:
65+
python-version: ["3.9", "3.12"]
66+
steps:
67+
- uses: actions/download-artifact@v4
68+
with:
69+
name: wheel-x86_64-unknown-linux-gnu
70+
path: dist
71+
72+
- uses: actions/setup-python@v5
73+
with:
74+
python-version: ${{ matrix.python-version }}
75+
76+
- name: Smoke test
77+
run: |
78+
pip install dist/*.whl
79+
python -c "
80+
import sqllineage
81+
result = sqllineage.analyze('SELECT a FROM t')
82+
assert len(result.source_tables()) > 0
83+
print('OK:', result)
84+
"
85+
86+
publish:
87+
name: Publish to PyPI
88+
needs: [build, test]
89+
runs-on: ubuntu-latest
90+
environment: pypi
91+
permissions:
92+
id-token: write
93+
contents: read
94+
steps:
95+
- uses: actions/download-artifact@v4
96+
with:
97+
path: dist
98+
pattern: wheel-*
99+
merge-multiple: true
100+
101+
- uses: pypa/gh-action-pypi-publish@release/v1
102+
with:
103+
verbose: true

0 commit comments

Comments
 (0)