Skip to content

Commit f381d4d

Browse files
committed
add: ampere ci
1 parent 60170e9 commit f381d4d

File tree

1 file changed

+88
-0
lines changed

1 file changed

+88
-0
lines changed
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
name: Build Release for Ampere
2+
3+
#TODO: add lib to build
4+
on: workflow_dispatch
5+
6+
permissions:
7+
contents: write
8+
9+
jobs:
10+
build_wheels_arm64:
11+
name: Build arm64 wheels
12+
runs-on: [self-hosted]
13+
container:
14+
image: ubuntu:25.0
15+
steps:
16+
- uses: actions/checkout@v4
17+
with:
18+
token: ${{ secrets.ACCESS_TOKEN }}
19+
submodules: recursive
20+
21+
- name: Build wheels
22+
uses: pypa/cibuildwheel@v2.22.0
23+
env:
24+
CIBW_SKIP: "*musllinux* pp*"
25+
CIBW_REPAIR_WHEEL_COMMAND: ""
26+
CIBW_ARCHS: "aarch64"
27+
CIBW_ENVIRONMENT: CMAKE_ARGS="-DCMAKE_OSX_ARCHITECTURES=arm64 -DCMAKE_APPLE_SILICON_PROCESSOR=arm64 -DCMAKE_CROSSCOMPILING=ON"
28+
CIBW_BUILD: "cp38-* cp39-* cp310-* cp311-* cp312-*"
29+
with:
30+
output-dir: wheelhouse
31+
32+
- name: Upload wheels as artifacts
33+
uses: actions/upload-artifact@v4
34+
with:
35+
name: wheels_arm64
36+
path: ./wheelhouse/*.whl
37+
38+
build_sdist:
39+
name: Build source distribution
40+
runs-on: [self-hosted]
41+
container:
42+
image: ubuntu:25.0
43+
44+
steps:
45+
- uses: actions/checkout@v4
46+
with:
47+
token: ${{ secrets.ACCESS_TOKEN }}
48+
submodules: recursive
49+
50+
- uses: actions/setup-python@v5
51+
with:
52+
python-version: "3.9"
53+
54+
- name: Install dependencies (Linux/MacOS)
55+
run: |
56+
python -m pip install --upgrade pip
57+
python -m pip install uv
58+
RUST_LOG=trace python -m uv pip install -e .[all] --verbose
59+
python -m uv pip install build
60+
shell: bash
61+
62+
- name: Build source distribution
63+
run: |
64+
python -m build --sdist
65+
66+
- uses: actions/upload-artifact@v4
67+
with:
68+
name: sdist
69+
path: ./dist/*.tar.gz
70+
71+
release:
72+
name: Release
73+
needs: [build_wheels_arm64, build_sdist]
74+
runs-on: [self-hosted]
75+
container:
76+
image: ubuntu:25.04
77+
78+
steps:
79+
- uses: actions/download-artifact@v4
80+
with:
81+
merge-multiple: true
82+
path: dist
83+
84+
- uses: softprops/action-gh-release@v2
85+
with:
86+
files: dist/*
87+
env:
88+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)