Skip to content

Wheel-Windows-Nightly #220

Wheel-Windows-Nightly

Wheel-Windows-Nightly #220

# 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: ['mlc-ai-nightly']
mlc-chat-pkg: ['mlc-chat-nightly']
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 Package
run: |
python3 scripts/sync_package.py --package tvm --package-name ${{ matrix.pkg }} --revision origin/mlc --skip-checkout --skip-conda
python3 scripts/sync_package.py --package mlc-llm --package-name ${{ matrix.mlc-chat-pkg }} --revision origin/main --skip-checkout --skip-conda
# Use conda for LLVM dep
- uses: conda-incubator/setup-miniconda@v2
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-Check@Win
run: |
IF EXIST "tvm\build\Release\tvm_runtime.dll" (
echo tvm_runtime.dll exists.
) ELSE (
echo tvm_runtime.dll does not exist.
exit /b 1
)
IF EXIST "tvm\build\Release\tvm.dll" (
echo tvm.dll exists.
) ELSE (
echo tvm.dll does not exist.
exit /b 1
)
- name: Build MLC-Chat@Win
run: >-
scripts/build_mlc_chat_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-Chat@Py38
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-Chat@Py39
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-Chat@Py310
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-Chat@Py311
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-Chat@Py312
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
mlc-llm/python/dist/*.whl
tag_name: v0.9.dev0
prerelease: true