-
Notifications
You must be signed in to change notification settings - Fork 14
168 lines (164 loc) · 5.14 KB
/
wheel_win_nightly.yaml
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
# GH actions.
name: Wheel-Windows-Nightly
on:
push:
branches:
- main
pull_request:
branches:
- main
schedule:
- cron: '0 6 * * *' # 6 AM UTC
jobs:
Build:
strategy:
matrix:
pkg_kind: ['nightly', 'stable']
exclude:
- pkg_kind: ${{ github.event_name == 'schedule' && 'stable' || '' }}
runs-on: windows-latest
defaults:
run:
shell: 'cmd /C call {0}'
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: Setup script env
run: |
mv conda/tvm-unity/build-environment.yaml 3rdparty/tlcpack/conda/build-environment.yaml
rm -rf conda
ln -s 3rdparty/tlcpack/conda conda
- name: Checkout source
run: |
git clone https://github.com/mlc-ai/relax tvm --recursive
git clone https://github.com/mlc-ai/mlc-llm mlc-llm --recursive
- name: Sync MLC AI Package
run: |
python3 scripts/sync_package.py --package tvm --package-name ${{ matrix.pkg_kind == 'nightly' && 'mlc-ai-nightly' || 'mlc-ai' }} --revision origin/mlc ${{ matrix.pkg_kind == 'nightly' && '--skip-checkout' || '' }} --skip-conda
- name: Sync MLC LLM Package
if: matrix.pkg_kind == 'nightly'
run: |
python3 scripts/sync_package.py --package mlc-llm --package-name ${{ matrix.pkg_kind == 'nightly' && 'mlc-llm-nightly' || 'mlc-llm' }} --revision origin/main ${{ matrix.pkg_kind == 'nightly' && '--skip-checkout' || '' }} --skip-conda
# Use conda for LLVM dep
- uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: tlcpack-build
channel-priority: strict
environment-file: conda/build-environment.yaml
auto-activate-base: false
- name: Conda info
run: |
conda info
conda list
python --version
- name: Build@Win
run: >-
scripts/build_mlc_ai_lib_win.bat
- name: Build MLC-LLM@Win
if: matrix.pkg_kind == 'nightly'
run: >-
scripts/build_mlc_llm_lib_win.bat
# Build wheel for three python versions
- name: Setup@Py38
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: build-Py38
python-version: 3.8
auto-activate-base: false
- name: Wheel-Build@Py38
run: |
python --version
python -m pip install setuptools Cython wheel
cd tvm/python
python setup.py bdist_wheel
- name: Wheel-Build-MLC-LLM@Py38
if: matrix.pkg_kind == 'nightly'
run: |
python --version
cd mlc-llm/python
python setup.py bdist_wheel
- name: Setup@Py39
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: build-Py39
python-version: 3.9
auto-activate-base: false
- name: Wheel-Build@Py39
run: |
python --version
python -m pip install setuptools Cython wheel
cd tvm/python
python setup.py bdist_wheel
- name: Wheel-Build-MLC-LLM@Py39
if: matrix.pkg_kind == 'nightly'
run: |
python --version
cd mlc-llm/python
python setup.py bdist_wheel
- name: Setup@Py310
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: build-Py310
python-version: '3.10'
auto-activate-base: false
- name: Wheel-Build@Py310
run: |
python --version
python -m pip install setuptools Cython wheel
cd tvm/python
python setup.py bdist_wheel
- name: Wheel-Build-MLC-LLM@Py310
if: matrix.pkg_kind == 'nightly'
run: |
python --version
cd mlc-llm/python
python setup.py bdist_wheel
- name: Setup@Py311
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: build-Py311
python-version: '3.11'
auto-activate-base: false
- name: Wheel-Build@Py311
run: |
python --version
python -m pip install setuptools Cython wheel
cd tvm/python
python setup.py bdist_wheel
- name: Wheel-Build-MLC-LLM@Py311
if: matrix.pkg_kind == 'nightly'
run: |
python --version
cd mlc-llm/python
python setup.py bdist_wheel
- name: Setup@Py312
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: build-Py312
python-version: '3.12'
auto-activate-base: false
- name: Wheel-Build@Py312
run: |
python --version
python -m pip install setuptools Cython wheel
cd tvm/python
python setup.py bdist_wheel
- name: Wheel-Build-MLC-LLM@Py312
if: matrix.pkg_kind == 'nightly'
run: |
python --version
cd mlc-llm/python
python setup.py bdist_wheel
# Use system python instead of conda for upload
- name: Wheel-Deploy
if: github.ref == 'refs/heads/main'
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.MLC_GITHUB_TOKEN }}
with:
files: |
tvm/python/dist/*.whl
${{ matrix.pkg_kind == 'nightly' && 'mlc-llm/python/dist/*.whl' || '' }}
tag_name: v0.9.dev0
prerelease: true