-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add rapids-get-pr-wheel-artifact for quickly downloading cpp wheels (#…
…101)
- Loading branch information
Showing
4 changed files
with
59 additions
and
3 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,36 @@ | ||
#!/bin/bash | ||
# Echo path to an artifact for a specific PR. Finds and uses the latest commit on the PR. | ||
# | ||
# Positional Arguments: | ||
# 1) repo name | ||
# 2) PR number | ||
# 3) "cpp" or "python", to get the artifact for the C++ or Python build, respectively | ||
# 4) [optional] commit hash, to get the artifact for a specific commit | ||
# | ||
# Example Usage: | ||
# rapids-get-pr-conda-artifact rmm 1095 cpp | ||
set -euo pipefail | ||
|
||
repo="$1" | ||
pr="$2" | ||
|
||
pkg_type="$3" | ||
case "${pkg_type}" in | ||
cpp) | ||
artifact_name=$(RAPIDS_REPOSITORY=$repo rapids-package-name wheel_cpp) | ||
;; | ||
python) | ||
artifact_name=$(RAPIDS_REPOSITORY=$repo rapids-package-name wheel_python) | ||
;; | ||
*) | ||
echo "Error: 3rd argument must be 'cpp' or 'python'" | ||
exit 1 | ||
;; | ||
esac | ||
|
||
commit="${4:-}" | ||
if [[ -z "${commit}" ]]; then | ||
commit=$(git ls-remote https://github.com/rapidsai/"${repo}".git refs/heads/pull-request/"${pr}" | cut -c1-7) | ||
fi | ||
|
||
rapids-get-artifact "ci/${repo}/pull-request/${pr}/${commit}/${artifact_name}" |
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