Skip to content

Wheel-Manylinux

Wheel-Manylinux #64

# GH actions.
name: Wheel-Manylinux
on:
push:
tags:
- '*' # Push events to every tag not containing /
jobs:
Build:
strategy:
matrix:
config:
- image: 'mlcaidev/package-cpu:254d630'
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/xgrammar
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
steps:
- name: Reclaim disk space
run: |
df -h
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/hostedtoolcache/CodeQL
sudo rm -rf /usr/local/.ghcup
df -h
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: Checkout source
run: |
git clone https://github.com/mlc-ai/package package --recursive
- name: Sync XGrammar Package
run: |
python scripts/sync_package.py --package . --package-name xgrammar --version ${{ github.ref_name }}
- name: Build XGrammar
env:
IMAGE: ${{ matrix.config.image }}
run: |
scripts/docker/bash.sh --no-gpu $IMAGE ./scripts/build_xgrammar_wheel_manylinux.sh
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages_dir: python/repaired_wheels
skip_existing: true
verbose: true