Skip to content

Wheel-WinMac-Nightly #1319

Wheel-WinMac-Nightly

Wheel-WinMac-Nightly #1319

# GH actions.
name: Wheel-WinMac-Nightly
on:
push:
branches:
- main
pull_request:
branches:
- main
schedule:
- cron: '0 6 * * *' # 6 AM UTC
jobs:
Build:
strategy:
matrix:
os: [macOS-latest, windows-2019]
pkg: ['tlcpack', 'tlcpack-nightly']
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v1
env:
CACHE_NUMBER: 0
with:
path: ~/conda_pkgs_dir
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles('conda/build-environment.yaml') }}
# 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
use-only-tar-bz2: true
- name: Conda info
run: |
conda info
conda list
- name: TVM checkout
uses: actions/checkout@v3
with:
submodules: 'recursive'
repository: apache/tvm
path: tvm
- name: Sync Package
run: python3 common/sync_package.py ${{ matrix.pkg }} --skip-checkout
- name: Build@MacOS
if: startsWith(matrix.os, 'macOS')
shell: bash -l {0}
run: >-
wheel/build_lib_osx.sh
env:
MACOSX_DEPLOYMENT_TARGET: 10.15
- name: Build@Win
if: startsWith(matrix.os, 'windows')
shell: cmd /C call {0}
run: >-
wheel/build_lib_win.bat
# Build wheel for three python versions
- uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Wheel-Build@Py37
env:
MACOSX_DEPLOYMENT_TARGET: 10.15
run: |
python -m pip install setuptools Cython wheel
cd tvm/python
python setup.py bdist_wheel
- uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Wheel-Build@Py38
env:
MACOSX_DEPLOYMENT_TARGET: 10.15
run: |
python -m pip install setuptools Cython wheel
cd tvm/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.TLCPACK_GITHUB_TOKEN }}
with:
files: tvm/python/dist/*.whl
tag_name: v0.12.dev
prerelease: true