-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add workflow to upload conda packages to legate channel
- Loading branch information
Showing
4 changed files
with
173 additions
and
89 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
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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# adopted from https://github.com/rapidsai/shared-workflows/blob/branch-24.12/.github/workflows/conda-upload-packages.yaml | ||
# with notable exceptions: | ||
# | ||
# * 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 }} |
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
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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/bin/bash | ||
|
||
# adopted from https://github.com/rapidsai/gha-tools/blob/main/tools/rapids-upload-to-anaconda, with some exceptions: | ||
# | ||
# * 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) | ||
|
||
# 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]+$ ]]; | ||
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}/"* | ||
continue | ||
fi | ||
|
||
rapids-echo-stderr "Uploading packages to Anaconda.org (channel='legate', label='${conda_label}'): ${PKGS_TO_UPLOAD}" | ||
|
||
# export RAPIDS_RETRY_SLEEP=180 | ||
# # shellcheck disable=SC2086 | ||
# rapids-retry anaconda \ | ||
# -t "${CONDA_LEGATE_TOKEN}" \ | ||
# upload \ | ||
# --label "${RAPIDS_CONDA_UPLOAD_LABEL:-main}" \ | ||
# --skip-existing \ | ||
# --no-progress \ | ||
# ${PKGS_TO_UPLOAD} |