-
Notifications
You must be signed in to change notification settings - Fork 26
181 lines (157 loc) · 4.8 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
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-ubuntu22.04-cu124:v1", "dev-centos8-arm:v2"]
enable_cuda: [0, 1]
exclude:
- arch: X64
image: "dev-centos8-arm:v2"
- arch: ARM64
image: "dev-ubuntu22.04-cu124:v1"
- arch: ARM64
enable_cuda: 1
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
ENABLE_CUDA: ${{ matrix.enable_cuda }}
defaults:
run:
shell: bash -l {0}
steps:
- name: Check out code
uses: actions/checkout@v3
with:
lfs: false
- 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: |
source /root/.bashrc
source /miniconda/etc/profile.d/conda.sh
source activate py310
git fetch --tags
TAG_NAME=$(git describe --tags $(git rev-list --tags --max-count=1))
VERSION_NUMBER=$(echo "$TAG_NAME" | sed 's/^v//')
export AS_RELEASE_VERSION=$VERSION_NUMBER
export AS_BUILD_PACKAGE=ON
echo "ENABLE_CUDA value: $ENABLE_CUDA"
# export ENABLE_MULTINUMA="ON"
if [[ "${{ matrix.arch }}" == "ARM64" ]]; then
export AS_PLATFORM="armclang"
bash build.sh
else
if [ "$ENABLE_CUDA" -eq "1" ];
then
export AS_PLATFORM="cuda"
export AS_CUDA_SM="'70;75;80;86;89;90a'"
bash scripts/release/cpp_build_cuda.sh
else
export AS_PLATFORM="x86"
bash build.sh
fi
fi
# - name: Upload tgz package
# uses: actions/upload-artifact@v4
# with:
# name: dashinfer-tgz-${{ matrix.arch }}
# path: build/*.tar.gz
build-wheels:
strategy:
matrix:
arch: [X64, ARM64]
image: ["dev-ubuntu22.04-cu124:v1", "dev-centos8-arm:v2"]
enable_cuda: [0, 1]
exclude:
- arch: X64
image: "dev-centos8-arm:v2"
- arch: ARM64
image: "dev-ubuntu22.04-cu124:v1"
- arch: ARM64
enable_cuda: 1
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
ENABLE_CUDA: ${{ matrix.enable_cuda }}
steps:
- name: Check out code
uses: actions/checkout@v3
with:
lfs: false
- 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: |
source /root/.bashrc
git fetch --tags
TAG_NAME=$(git describe --tags $(git rev-list --tags --max-count=1))
VERSION_NUMBER=$(echo "$TAG_NAME" | sed 's/^v//')
export AS_RELEASE_VERSION=$VERSION_NUMBER
echo "ENABLE_CUDA value: $ENABLE_CUDA"
if [[ "${{ matrix.arch }}" == "ARM64" ]]; then
bash scripts/release/python_manylinux_build.sh
else
if [ "$ENABLE_CUDA" -eq "1" ];
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
fi
# - name: Upload wheels
# uses: actions/upload-artifact@v4
# with:
# name: python-manylinux-wheels-${{ matrix.arch }}
# path: python/wheelhouse/*-manylinux*.whl
# 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/*