-
Notifications
You must be signed in to change notification settings - Fork 16
196 lines (174 loc) · 5.43 KB
/
release_packages.yml
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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
name: Release Packages
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
workflow_dispatch:
# Needed to create release and upload assets
permissions:
contents: write
jobs:
build-tgz:
strategy:
matrix:
arch: [X64, ARM64]
image: ["dev-centos7-x86:v2", "dev-centos7-cu124:v1", "dev-centos8-arm:v2"]
exclude:
- arch: X64
image: "dev-centos8-arm:v2"
- arch: ARM64
image: "dev-centos7-x86:v2"
- arch: ARM64
image: "dev-centos7-cu124:v1"
runs-on: [self-hosted, Linux, "${{ matrix.arch }}"]
container:
image: registry-1.docker.io/dashinfer/${{ matrix.image }}
env:
# force use node16 instead of node20
# otherwise it may cause GLIBCXX_2.27 not found
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
defaults:
run:
shell: bash -l {0}
steps:
- name: Check out code
uses: actions/checkout@v3
with:
lfs: true
- name: Pull LFS
run: |
git lfs install --force
git lfs pull
- name: Init submodule
run: |
git submodule init
git submodule update
- name: Build tgz package
run: |
git fetch --tags
TAG_NAME=$(git describe --tags $(git rev-list --tags --max-count=1))
VERSION_NUMBER=$(echo "$TAG_NAME" | sed 's/^v//')
source /root/.bashrc
export AS_RELEASE_VERSION=$VERSION_NUMBER
export AS_BUILD_PACKAGE=ON
if command -v nvcc &> /dev/null
then
export AS_PLATFORM="cuda"
export AS_CUDA_SM="'70;75;80;86;89;90a'"
bash scripts/release/cpp_build_cuda.sh
else
# export ENABLE_MULTINUMA="ON"
if [[ "${{ matrix.arch }}" == "ARM64" ]]; then
export AS_PLATFORM="armclang"
else
export AS_PLATFORM="x86"
fi
bash build.sh
fi
- name: Upload tgz package
uses: actions/upload-artifact@v3
with:
name: dashinfer-tgz-${{ matrix.arch }}
path: build/*.tar.gz
build-wheels:
strategy:
matrix:
arch: [X64, ARM64]
image: ["dev-centos7-x86:v2", "dev-centos7-cu124:v1", "dev-centos8-arm:v2"]
exclude:
- arch: X64
image: "dev-centos8-arm:v2"
- arch: ARM64
image: "dev-centos7-x86:v2"
- arch: ARM64
image: "dev-centos7-cu124:v1"
runs-on: [self-hosted, Linux, "${{ matrix.arch }}"]
container:
image: registry-1.docker.io/dashinfer/${{ matrix.image }}
env:
# force use node16 instead of node20
# otherwise it may cause GLIBCXX_2.27 not found
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
steps:
- name: Check out code
uses: actions/checkout@v3
with:
lfs: true
- name: Pull LFS
run: |
git lfs install --force
git lfs pull
- name: Init submodule
run: |
git submodule init
git submodule update
- name: Build manylinux wheels
run: |
git fetch --tags
TAG_NAME=$(git describe --tags $(git rev-list --tags --max-count=1))
source /root/.bashrc
VERSION_NUMBER=$(echo "$TAG_NAME" | sed 's/^v//')
export AS_RELEASE_VERSION=$VERSION_NUMBER
if command -v nvcc &> /dev/null
then
export AS_CUDA_SM="'70;75;80;86;89;90a'"
bash scripts/release/python_manylinux_build_cuda.sh
else
bash scripts/release/python_manylinux_build.sh
fi
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
name: python-manylinux-wheels-${{ matrix.arch }}
path: python/wheelhouse/*-manylinux*.whl
# test:
# strategy:
# matrix:
# arch: [X64, ARM64]
# image: ["test-ubuntu-x86:v1", "test-centos-arm:v1"]
# exclude:
# - arch: X64
# image: "test-centos-arm:v1"
# - arch: ARM64
# image: "test-ubuntu-x86:v1"
# runs-on: [self-hosted, Linux, "${{ matrix.arch }}"]
# container:
# image: registry-1.docker.io/dashinfer/${{ matrix.image }}
# volumes:
# - /mnt/data0/models/modelscope:/github/home/.cache/modelscope
# options: "--ipc=host --cap-add SYS_NICE --cap-add SYS_PTRACE"
# needs: build-wheels
# steps:
# - name: Check out code
# uses: actions/checkout@v3
# - name: Download wheels
# uses: actions/download-artifact@v3
# with:
# name: python-manylinux-wheels-${{ matrix.arch }}
# path: python/wheelhouse
# - name: Test manylinux wheels
# run: |
# TAG_NAME=$(git describe --tags $(git rev-list --tags --max-count=1))
# VERSION_NUMBER=$(echo "$TAG_NAME" | sed 's/^v//')
# AS_RELEASE_VERSION=$VERSION_NUMBER bash scripts/release/python_manylinux_test.sh
publish:
runs-on: [self-hosted, Linux]
needs: [build-tgz, build-wheels]
strategy:
matrix:
arch: [X64, ARM64]
steps:
- name: Download tgz packages
uses: actions/download-artifact@v3
with:
name: dashinfer-tgz-${{ matrix.arch }}
path: release/
- name: Download python wheels
uses: actions/download-artifact@v3
with:
name: python-manylinux-wheels-${{ matrix.arch }}
path: release/
- name: Release all packages
uses: softprops/action-gh-release@v1
with:
files: release/*