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