Skip to content

Commit 4b57232

Browse files
committed
ci: add share runner.
1 parent 1ddf623 commit 4b57232

File tree

1 file changed

+138
-0
lines changed

1 file changed

+138
-0
lines changed
Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
name: Build Check
2+
# docker download mirror should setup in self host machine.
3+
# the mirror status can be found at : https://status.daocloud.io/status/docker
4+
on:
5+
pull_request:
6+
merge_group:
7+
workflow_dispatch:
8+
9+
10+
jobs:
11+
build-tgz:
12+
strategy:
13+
matrix:
14+
arch: [X64]
15+
image: ["dev-centos7-cu124:v1"]
16+
enable_cuda: [0, 1]
17+
exclude:
18+
- arch: X64
19+
image: "dev-centos8-arm:v2"
20+
on-runs: ubuntu-22.04
21+
container:
22+
image: dashinfer/${{ matrix.image }}
23+
env:
24+
# force use node16 instead of node20
25+
# otherwise it may cause GLIBCXX_2.27 not found
26+
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
27+
ENABLE_CUDA: ${{ matrix.enable_cuda }}
28+
defaults:
29+
run:
30+
shell: bash -l {0}
31+
steps:
32+
- name: Check out code
33+
uses: actions/checkout@v3
34+
with:
35+
lfs: false
36+
37+
- name: Pull LFS
38+
run: |
39+
git lfs install --force
40+
git lfs pull
41+
42+
- name: Init submodule
43+
run: |
44+
git submodule init
45+
git submodule update
46+
47+
- name: Build tgz package
48+
shell: bash
49+
run: |
50+
source /root/.bashrc
51+
if [ -f "/miniconda/etc/profile.d/conda.sh" ]; then
52+
source /miniconda/etc/profile.d/conda.sh
53+
fi
54+
source activate ds_py
55+
56+
git fetch --tags
57+
TAG_NAME=$(git describe --tags $(git rev-list --tags --max-count=1))
58+
VERSION_NUMBER=$(echo "$TAG_NAME" | sed 's/^v//')
59+
60+
export AS_RELEASE_VERSION=$VERSION_NUMBER
61+
62+
echo "ENABLE_CUDA value: $ENABLE_CUDA"
63+
64+
# export ENABLE_MULTINUMA="ON"
65+
if [[ "${{ matrix.arch }}" == "ARM64" ]]; then
66+
export AS_PLATFORM="armclang"
67+
bash build.sh
68+
else
69+
if [ "$ENABLE_CUDA" -eq "1" ];
70+
then
71+
export AS_PLATFORM="cuda"
72+
export AS_CUDA_SM="'70;75;80;86;89;90a'"
73+
bash scripts/release/cpp_build_cuda.sh
74+
else
75+
export AS_PLATFORM="x86"
76+
bash build.sh
77+
fi
78+
fi
79+
80+
81+
build-wheels:
82+
strategy:
83+
matrix:
84+
arch: [X64]
85+
image: ["dev-centos7-cu124:v1"]
86+
enable_cuda: [0, 1]
87+
runs-on: ubuntu-22.04
88+
container:
89+
image: dashinfer/${{ matrix.image }}
90+
env:
91+
# force use node16 instead of node20
92+
# otherwise it may cause GLIBCXX_2.27 not found
93+
# ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
94+
ENABLE_CUDA: ${{ matrix.enable_cuda }}
95+
steps:
96+
- name: Check out code
97+
uses: actions/checkout@v3
98+
with:
99+
lfs: false
100+
101+
- name: Pull LFS
102+
run: |
103+
git lfs install --force
104+
git lfs pull
105+
106+
- name: Init submodule
107+
run: |
108+
git submodule init
109+
git submodule update
110+
111+
- name: Build manylinux wheels
112+
shell: bash
113+
run: |
114+
source /root/.bashrc
115+
if [ -f "/miniconda/etc/profile.d/conda.sh" ]; then
116+
source /miniconda/etc/profile.d/conda.sh
117+
fi
118+
119+
git fetch --tags
120+
TAG_NAME=$(git describe --tags $(git rev-list --tags --max-count=1))
121+
VERSION_NUMBER=$(echo "$TAG_NAME" | sed 's/^v//')
122+
123+
export AS_RELEASE_VERSION=$VERSION_NUMBER
124+
125+
echo "ENABLE_CUDA value: $ENABLE_CUDA"
126+
127+
if [[ "${{ matrix.arch }}" == "ARM64" ]]; then
128+
bash scripts/release/python_manylinux_build.sh
129+
else
130+
if [ "$ENABLE_CUDA" -eq "1" ];
131+
then
132+
export AS_PLATFORM="cuda"
133+
export AS_CUDA_SM="'70;75;80;86;89;90a'"
134+
bash scripts/release/python_manylinux_build_cuda.sh
135+
else
136+
bash scripts/release/python_manylinux_build.sh
137+
fi
138+
fi

0 commit comments

Comments
 (0)