Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/tripy-l1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,24 @@ jobs:
steps:
- uses: actions/checkout@v6

# Install test dependencies without reinstalling nvtripy (to keep the public release build).
- name: install-test-deps
run: |
cd /tripy/
python3 -c "
import tomllib
with open('pyproject.toml', 'rb') as f:
data = tomllib.load(f)
deps = []
for group in ['test', 'doc_test_common']:
deps.extend(d for d in data['project']['optional-dependencies'][group] if not d.startswith('nvtripy'))
with open('/tmp/test-requirements.txt', 'w') as f:
f.write('\n'.join(deps))
"
pip install -r /tmp/test-requirements.txt \
--extra-index-url https://download.pytorch.org/whl \
--extra-index-url https://pypi.nvidia.com

# For some tests, we want to use the public build instead of the latest commit.
- name: l1-test-release-package
run: |
Expand Down
48 changes: 24 additions & 24 deletions .github/workflows/tripy-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,34 @@ jobs:
id: deployment
uses: actions/deploy-pages@v4

build-and-push-release-container:
pypi-publish:
runs-on: ubuntu-latest
needs:
- build-and-release

# Dedicated environments with protections for publishing are strongly recommended.
# For more information, see: https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment#deployment-protection-rules
environment:
name: pypi
url: https://pypi.org/p/nvtripy

steps:
- name: Retrieve release distributions
uses: actions/download-artifact@v7
with:
name: release-dists
path: dist/

- name: Publish release distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: dist/

build-and-push-release-container:
runs-on: ubuntu-latest
needs:
- pypi-publish

steps:
- name: Checkout repository
uses: actions/checkout@v6
Expand All @@ -103,26 +126,3 @@ jobs:
tags: |
${{ env.RELEASE_IMAGE }}:latest
${{ env.RELEASE_IMAGE }}:${{ github.ref_name }}

pypi-publish:
runs-on: ubuntu-latest
needs:
- build-and-push-release-container

# Dedicated environments with protections for publishing are strongly recommended.
# For more information, see: https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment#deployment-protection-rules
environment:
name: pypi
url: https://pypi.org/p/nvtripy

steps:
- name: Retrieve release distributions
uses: actions/download-artifact@v7
with:
name: release-dists
path: dist/

- name: Publish release distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: dist/
2 changes: 1 addition & 1 deletion tripy/.pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v6.0.0
hooks:
- id: end-of-file-fixer
# only include python files
Expand Down
Loading