updates from internal repository #37
Workflow file for this run
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
name: Wheels | |
on: | |
push: | |
tags: | |
- v* | |
jobs: | |
build_wheels: | |
name: Build wheels on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
steps: | |
- uses: actions/checkout@v4 | |
# cibuildwheel is configured via pyproject.toml | |
- name: Build wheels with cibuildwheel | |
uses: pypa/[email protected] | |
env: | |
CIBW_ENVIRONMENT: CI_COMMIT_TAG="${{ github.ref_name }}" | |
# Force UTF-8 mode (especially for Windows) | |
PYTHONUTF8: 1 | |
- name: Upload wheels | |
uses: actions/upload-artifact@v4 | |
with: | |
name: wheels-${{ matrix.os }} | |
path: ./wheelhouse/*.whl | |
build_sdist: | |
name: Build source distribution (sdist) | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
python-version: ["3.13"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: "pip" | |
cache-dependency-path: "dependencies/requirements*.txt" | |
- name: Install build dependencies | |
run: pip install build | |
- name: Build sdist | |
run: python -m build . --sdist | |
- name: Upload sdist package | |
uses: actions/upload-artifact@v4 | |
with: | |
name: wheels-source | |
path: dist/*.tar.gz | |
- name: Build building extension from sdist package | |
env: | |
HTC_ADD_NETWORK_ALTERNATIVES: false | |
run: | | |
pip install -r dependencies/requirements-tests.txt | |
pip install torch | |
pip install dist/*.tar.gz | |
- name: Basic test for the sdist package | |
run: py.test --doctest-modules --import-mode=importlib --collect-only --pyargs "htc" "htc_projects" | |
upload_pypi: | |
needs: [build_wheels, build_sdist] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
path: dist | |
pattern: wheels-* | |
merge-multiple: true | |
- name: upload_pypi | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_API_TOKEN }} |