Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DO NOT MERGE] debug pypi workflow #241

Closed
wants to merge 8 commits into from
Closed
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
64 changes: 53 additions & 11 deletions .github/workflows/do-release.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
name: "PyPI release"
on:
push:
branches:
- sroet-patch-1
release:
types:
- published

# Following: https://docs.pypi.org/trusted-publishers/using-a-publisher/
# and https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/
jobs:
publish_release:
build-release:
runs-on: [self-hosted, linux, x64, gpu]
container:
image: continuumio/miniconda3
options: --runtime=nvidia --gpus all
environment: release
permissions:
id-token: write
steps:
- name: Pull code
uses: actions/checkout@v4
Expand All @@ -26,11 +27,38 @@ jobs:
- name: twine check distributions
run: |
python -m twine check dist/*
- name: Publish package distributions to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1.11 # temporary workaround for issue #236
- name: Store the distribution packages
uses: actions/upload-artifact@v4
with:
name: match-pick-distributions
path: dist/

publish-to-testpypi:
name: publish to test-pypi
needs: build-release
runs-on: ubuntu-latest
#environment: release
permissions:
id-token: write
steps:
- name: Download all the dists
uses: actions/download-artifact@v4
with:
name: match-pick-distributions
path: dist/
- name: Publish package distributions to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
attestations: false

test-testpypi:
name: test testpypi deployment
needs: publish-to-testpypi
runs-on: [self-hosted, linux, x64, gpu]
container:
image: continuumio/miniconda3
options: --runtime=nvidia --gpus all
steps:
- name: Download conda dependencies
run: |
conda install -y -c conda-forge python=3 cupy cuda-version=11.8
Expand All @@ -40,7 +68,21 @@ jobs:
- name: Run tests on the installed package
run: |
python -m unittest discover tests/
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1.11 # temporary workaround for issue #236
with:
attestations: false

publish-to-pypi:
name: publish to pypi
needs: [build-release, test-testpypi]
runs-on: ubuntu-latest
#environment: release
permissions:
id-token: write
steps:
- name: Download all the dists
uses: actions/download-artifact@v4
with:
name: match-pick-distributions
path: dist/
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1


Loading