Wheel-Mac-X86/64-Nightly #684
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# GH actions. | |
name: Wheel-Mac-X86/64-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' || '' }} | |
# do not use `macos-latest` to avoid running on arm | |
# details at https://github.com/actions/runner-images/ | |
runs-on: macos-13 | |
defaults: | |
run: | |
shell: 'bash -l {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 | |
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@MacOS | |
run: >- | |
scripts/build_mlc_ai_lib_osx.sh | |
- name: Build MLC-LLM@MacOS | |
run: >- | |
scripts/build_mlc_llm_lib_osx.sh | |
# 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 | |
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 | |
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 | |
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 | |
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 | |
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 |