Skip to content

Commit 00702d8

Browse files
committed
hf_transfer: add build workflow
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
1 parent 1887a91 commit 00702d8

1 file changed

Lines changed: 131 additions & 0 deletions

File tree

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
# This file is autogenerated by maturin v1.7.8
2+
# To update, run
3+
#
4+
# maturin generate-ci github
5+
#
6+
name: CI
7+
8+
on:
9+
push:
10+
branches:
11+
- main
12+
- master
13+
tags:
14+
- '*'
15+
pull_request:
16+
workflow_dispatch:
17+
18+
permissions:
19+
contents: read
20+
21+
jobs:
22+
linux:
23+
runs-on: ${{ matrix.platform.runner }}
24+
strategy:
25+
matrix:
26+
platform:
27+
- runner: ubuntu-24.04-riscv
28+
target: riscv64gc-unknown-linux-gnu
29+
arch: riscv64
30+
steps:
31+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
32+
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
33+
with:
34+
python-version: 3.x
35+
- name: Build wheels
36+
uses: PyO3/maturin-action@04ac600d27cdf7a9a280dadf7147097c42b757ad # v1
37+
with:
38+
target: ${{ matrix.platform.target }}
39+
args: --release --out dist
40+
sccache: 'true'
41+
manylinux: auto
42+
before-script-linux: |
43+
if command -v apt-get &> /dev/null; then
44+
apt-get update && apt-get install libssl-dev libatomic-ops-dev -y
45+
elif command -v yum &> /dev/null; then
46+
yum install openssl-devel devtoolset-10-libatomic-devel perl-IPC-Cmd -y
47+
else
48+
echo "Neither apt-get nor yum is installed. Please install a package manager."
49+
exit 1
50+
fi
51+
- name: Build free-threaded wheels
52+
uses: PyO3/maturin-action@04ac600d27cdf7a9a280dadf7147097c42b757ad # v1
53+
with:
54+
target: ${{ matrix.platform.target }}
55+
args: --release --out dist -i python3.13t
56+
sccache: 'true'
57+
manylinux: auto
58+
before-script-linux: |
59+
if command -v apt-get &> /dev/null; then
60+
apt-get update && apt-get install libssl-dev libatomic-ops-dev -y
61+
elif command -v yum &> /dev/null; then
62+
yum install openssl-devel devtoolset-10-libatomic-devel perl-IPC-Cmd -y
63+
else
64+
echo "Neither apt-get nor yum is installed. Please install a package manager."
65+
exit 1
66+
fi
67+
- name: Upload wheels
68+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
69+
with:
70+
name: wheels-linux-${{ matrix.platform.arch }}
71+
path: dist
72+
73+
musllinux:
74+
runs-on: ${{ matrix.platform.runner }}
75+
strategy:
76+
matrix:
77+
platform:
78+
- runner: ubuntu-24.04-riscv
79+
target: riscv64gc-unknown-linux-musl
80+
arch: riscv64
81+
steps:
82+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
83+
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
84+
with:
85+
python-version: 3.x
86+
- name: Build wheels
87+
uses: PyO3/maturin-action@04ac600d27cdf7a9a280dadf7147097c42b757ad # v1
88+
with:
89+
target: ${{ matrix.platform.target }}
90+
args: --release --out dist
91+
sccache: 'true'
92+
manylinux: musllinux_1_2
93+
- name: Build free-threaded wheels
94+
uses: PyO3/maturin-action@04ac600d27cdf7a9a280dadf7147097c42b757ad # v1
95+
with:
96+
target: ${{ matrix.platform.target }}
97+
args: --release --out dist -i python3.13t
98+
sccache: 'true'
99+
manylinux: musllinux_1_2
100+
- name: Upload wheels
101+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
102+
with:
103+
name: wheels-musllinux-${{ matrix.platform.target }}
104+
path: dist
105+
106+
# release:
107+
# name: Release
108+
# runs-on: ubuntu-latest
109+
# if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
110+
# needs: [linux, musllinux, windows, macos, sdist]
111+
# permissions:
112+
# # Use to sign the release artifacts
113+
# id-token: write
114+
# # Used to upload release artifacts
115+
# contents: write
116+
# # Used to generate artifact attestation
117+
# attestations: write
118+
# steps:
119+
# - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
120+
# - name: Generate artifact attestation
121+
# uses: actions/attest-build-provenance@ef244123eb79f2f7a7e75d99086184180e6d0018 # v1
122+
# with:
123+
# subject-path: 'wheels-*/*'
124+
# - name: Publish to PyPI
125+
# if: ${{ startsWith(github.ref, 'refs/tags/') }}
126+
# uses: PyO3/maturin-action@04ac600d27cdf7a9a280dadf7147097c42b757ad # v1
127+
# env:
128+
# MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
129+
# with:
130+
# command: upload
131+
# args: --non-interactive --skip-existing wheels-*/*

0 commit comments

Comments
 (0)