diff --git a/.github/workflows/tripy-l1.yml b/.github/workflows/tripy-l1.yml index c66037162..1860dd37c 100644 --- a/.github/workflows/tripy-l1.yml +++ b/.github/workflows/tripy-l1.yml @@ -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: | diff --git a/.github/workflows/tripy-release.yml b/.github/workflows/tripy-release.yml index 3936898e6..819fff3db 100644 --- a/.github/workflows/tripy-release.yml +++ b/.github/workflows/tripy-release.yml @@ -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 @@ -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/ diff --git a/tripy/.pre-commit-config.yaml b/tripy/.pre-commit-config.yaml index 1994be095..fecf7cf21 100644 --- a/tripy/.pre-commit-config.yaml +++ b/tripy/.pre-commit-config.yaml @@ -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