Skip to content

Commit 6527f43

Browse files
committed
ci: add musl support to check-python-sdk
1 parent d66ab7b commit 6527f43

7 files changed

Lines changed: 129 additions & 236 deletions

File tree

.github/workflows/check_docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Docs
22
on:
33
push:
44
branches:
5-
- main
5+
- v3-longport
66

77
jobs:
88
rust:

.github/workflows/ci.yml

Lines changed: 82 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: CI
33
on:
44
push:
55
branches:
6-
- main
6+
- v3-longport
77
pull_request: {}
88

99
jobs:
@@ -85,6 +85,53 @@ jobs:
8585
pip install longport --no-index --find-links dist --force-reinstall
8686
python -c "import longport"
8787
88+
check-python-sdk-musl:
89+
needs:
90+
- check-format
91+
strategy:
92+
fail-fast: true
93+
matrix:
94+
target: [x86_64-unknown-linux-musl, aarch64-unknown-linux-musl]
95+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
96+
runs-on: ubuntu-22.04
97+
steps:
98+
- uses: actions/checkout@v4
99+
with:
100+
submodules: true
101+
102+
- name: Install Python
103+
uses: actions/setup-python@v5
104+
with:
105+
python-version: ${{ matrix.python-version }}
106+
107+
- name: Install Rust
108+
uses: dtolnay/rust-toolchain@stable
109+
with:
110+
toolchain: stable
111+
components: rustfmt, clippy
112+
targets: ${{ matrix.target }}
113+
114+
- name: Setup QEMU
115+
if: matrix.target == 'aarch64-unknown-linux-musl'
116+
uses: docker/setup-qemu-action@v3
117+
with:
118+
platforms: arm64
119+
120+
- name: Build wheels (musl)
121+
uses: PyO3/maturin-action@v1
122+
with:
123+
target: ${{ matrix.target }}
124+
manylinux: musllinux_1_2
125+
args: -i python${{ matrix.python-version }} --out dist -m python/Cargo.toml
126+
127+
- name: Install built wheel
128+
run: |
129+
docker run --rm \
130+
--platform ${{ matrix.target == 'aarch64-unknown-linux-musl' && 'linux/arm64' || 'linux/amd64' }} \
131+
-v $(pwd)/dist:/dist \
132+
python:${{ matrix.python-version }}-alpine \
133+
sh -c "pip install --upgrade pip && pip install longport --no-index --find-links /dist --force-reinstall && python -c 'import longport'"
134+
88135
build-python:
89136
needs:
90137
- check-python-sdk
@@ -126,6 +173,40 @@ jobs:
126173
name: wheels-${{ matrix.runs-on }}-${{ matrix.python-version }}
127174
path: dist
128175

176+
build-python-musl:
177+
needs:
178+
- check-python-sdk-musl
179+
runs-on: ubuntu-24.04
180+
strategy:
181+
fail-fast: true
182+
matrix:
183+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
184+
target: [x86_64-unknown-linux-musl, aarch64-unknown-linux-musl]
185+
steps:
186+
- name: Checkout
187+
uses: actions/checkout@v4
188+
with:
189+
submodules: true
190+
- uses: actions/setup-python@v5
191+
with:
192+
python-version: ${{ matrix.python-version }}
193+
- name: Install Rust toolchain
194+
uses: dtolnay/rust-toolchain@stable
195+
with:
196+
toolchain: stable
197+
targets: ${{ matrix.target }}
198+
- name: Build wheels (musl)
199+
uses: PyO3/maturin-action@v1
200+
with:
201+
target: ${{ matrix.target }}
202+
manylinux: musllinux_1_2
203+
args: -i python${{ matrix.python-version }} --out dist -m python/Cargo.toml
204+
- name: Upload wheels
205+
uses: actions/upload-artifact@v4
206+
with:
207+
name: wheels-musl-${{ matrix.target }}-${{ matrix.python-version }}
208+
path: dist
209+
129210
check-nodejs-sdk:
130211
needs:
131212
- check-format

.github/workflows/close-slate-issues.yml

Lines changed: 0 additions & 31 deletions
This file was deleted.

.github/workflows/docs.yml

Lines changed: 0 additions & 100 deletions
This file was deleted.

.github/workflows/issue-notify.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.

.github/workflows/release-mcp.yml

Lines changed: 0 additions & 82 deletions
This file was deleted.

0 commit comments

Comments
 (0)