-
Notifications
You must be signed in to change notification settings - Fork 8
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
add workflow to upload conda packages to legate channel #173
Changes from all commits
9f3ec4b
ea15675
2392376
0b4aaf8
d2fafbc
b63549b
f394171
1cce078
046e95a
010bf51
e593ae6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# adopted from https://github.com/rapidsai/shared-workflows/blob/branch-24.12/.github/workflows/conda-upload-packages.yaml | ||
# with some notable differences: | ||
# | ||
# * assumes packages were uploaded to GitHub artifact store, not Amazon S3 | ||
# * always publishes to the same channel, but uses different label for non-release packages | ||
# | ||
|
||
on: | ||
# run only when called by other workflows | ||
workflow_call: | ||
|
||
env: | ||
# where jobs that download conda packages store the local channel | ||
RAPIDS_LOCAL_CONDA_CHANNEL: /tmp/local-conda-packages | ||
|
||
jobs: | ||
upload: | ||
runs-on: linux-amd64-cpu4 | ||
container: | ||
image: rapidsai/ci-conda:latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
# the notebooks and PNG files stored in git LFS aren't necessary for package uploads | ||
lfs: false | ||
- name: download conda packages | ||
uses: actions/download-artifact@v4 | ||
with: | ||
# omitting 'name' here means "download all artifacts from this run"... useful to | ||
# avoid having to list the matrix of CUDA / Python versions here | ||
path: ${{ env.RAPIDS_LOCAL_CONDA_CHANNEL }} | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
repository: ${{ github.repository }} | ||
run-id: ${{ github.run_id }} | ||
- name: Upload packages | ||
run: "ci/upload-to-anaconda.sh" | ||
env: | ||
CONDA_LEGATE_TOKEN: ${{ secrets.CONDA_LEGATE_TOKEN }} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,8 +23,6 @@ jobs: | |
# group together all jobs that must pass for a PR to be merged | ||
# (for use by branch protections) | ||
pr-builder: | ||
# skip on builds from merges to main | ||
if: github.ref != 'refs/heads/main' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Now that this workflow file is only triggered on pull requests, this condition is unnecessary. |
||
needs: | ||
- pre-commit | ||
- conda-python-build | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/bin/bash | ||
|
||
# adopted from https://github.com/rapidsai/gha-tools/blob/main/tools/rapids-upload-to-anaconda, | ||
# with some notable differences: | ||
# | ||
# * assumes artifacts are on GitHub Actions artifact store, not Amazon S3 | ||
# * assumes packages have been unpacked to env variable RAPIDS_LOCAL_CONDA_CHANNEL | ||
# * does not differentiate between pull request and nightly branches | ||
# (relies on workflow triggers to just not run this script when it isn't needed) | ||
|
||
set -e -E -u -o pipefail | ||
|
||
# publish to the 'experimental' label on the 'legate' channel, for all cases except | ||
# releases (builds triggered by pushing a tag matching this regex exactly, e.g. 'v24.09.00') | ||
if [[ "${GITHUB_REF}" =~ ^refs/tags/v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then | ||
declare -r conda_label="main" | ||
else | ||
declare -r conda_label="experimental" | ||
fi | ||
|
||
PKGS_TO_UPLOAD=$(rapids-find-anaconda-uploads.py "${RAPIDS_LOCAL_CONDA_CHANNEL}") | ||
|
||
if [ -z "${PKGS_TO_UPLOAD}" ]; then | ||
rapids-echo-stderr "Couldn't find any packages to upload in: ${RAPIDS_LOCAL_CONDA_CHANNEL}" | ||
ls -l "${RAPIDS_LOCAL_CONDA_CHANNEL}/"* | ||
fi | ||
|
||
rapids-echo-stderr "Uploading packages to Anaconda.org (channel='legate', label='${conda_label}'):" | ||
rapids-echo-stderr "${PKGS_TO_UPLOAD}" | ||
|
||
# shellcheck disable=SC2086 | ||
RAPIDS_RETRY_SLEEP=180 \ | ||
rapids-retry anaconda \ | ||
-t "${CONDA_LEGATE_TOKEN}" \ | ||
upload \ | ||
--label "${conda_label}" \ | ||
--skip-existing \ | ||
--no-progress \ | ||
${PKGS_TO_UPLOAD} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,5 +25,11 @@ gpu_enabled: | |
- true | ||
- false | ||
|
||
cunumeric_version: | ||
# .dev116: https://github.com/nv-legate/legate.core.internal/issues/1409 | ||
- "=24.09.*,>=0.0.0.dev0,!=24.09.00.dev116" | ||
|
||
legate_version: | ||
- "=24.09.*,>=0.0.0.dev0" | ||
# .dev319: https://github.com/nv-legate/legate.core.internal/pull/1401 | ||
# .dev329: https://github.com/nv-legate/legate.core.internal/issues/1409 | ||
- "=24.09.*,>=0.0.0.dev0,!=24.09.00.dev319,!=24.09.00.dev329" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we should try this approach of And if they aren't, then we'll get feedback from CI of the form "the bug we reported has still not been fixed". There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree with the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Yes definitely, agreed! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding this here, with these triggers:
legate-boost/.github/workflows/build.yaml
Lines 7 to 17 in 166c98d
Means that new
legate-boost
packages will automatically be published to thelegate
channel in the following situations.Scenario 1: New packages pushed to the
experimental
label, with version like{YY}.{MM}.{patch}.dev{n}
main
release/v{YY}.{MM}.{patch}
v[0-9][0-9].[0-9][0-9].[0-9][0-9]
Scenario 2: New packages pushed to the
main
label, with version like{YY}.{MM}.{patch}
(i.e. a stable release)v[0-9][0-9].[0-9][0-9].[0-9][0-9]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sounds reasonable to me. The only downside would be that release branch nightlies are probably not used much and use disk-space/build time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
release/
branches should only be used for hotfixes, in the way I've proposed setting this up:legate-boost/contributing.md
Line 233 in 166c98d
I'm thinking of the case where @danielfrg or someone reports a bug, and we merge a fix and want to say "ok we have a release candidate of like
24.09.01.dev3
, can you test it?"It'd be useful to have a nightly package for that testing, I think, so we can build confidence in that fix before officially releasing a new version and so the tester doesn't have to build from source or download a GitHub Actions artifact.
Here, I'm thinking about the specific case where, say, we just cut stable release
24.09.00
and are ready to begin work on24.12.00.dev{n}
. Was thinking that in that case, we want a first build to run when development starts, so you immediately have nightlies with that version (and the corresponding versions ofcunumeric
/legate
) to use.See #171 (comment)