Skip to content

Wheel-Windows-Nightly #469

Wheel-Windows-Nightly

Wheel-Windows-Nightly #469

# 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