-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cc1621c
commit dc127ad
Showing
2 changed files
with
63 additions
and
26 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,22 +18,63 @@ jobs: | |
- uses: actions/checkout@v4 | ||
|
||
# cibuildwheel is configured via pyproject.toml | ||
- name: cibuildwheel | ||
- name: Build wheels with cibuildwheel | ||
uses: pypa/[email protected] | ||
env: | ||
# Otherwise PyTorch builds may fail on MacOS: https://cibuildwheel.readthedocs.io/en/stable/cpp_standards/#macos-and-deployment-target-versions | ||
CIBW_ENVIRONMENT: CI_COMMIT_TAG="${{ github.ref_name }}" MACOSX_DEPLOYMENT_TARGET="10.14" | ||
# Force UTF-8 mode (especially for Windows) | ||
PYTHONUTF8: 1 | ||
|
||
- name: upload_artifacts | ||
- 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 | ||
needs: [build_wheels, build_sdist] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/download-artifact@v4 | ||
|
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