Add support for uploading arbitrary artifacts to wheel workflows #1
Workflow file for this run
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
name: Test RAPIDS pure-python wheels | ||
on: | ||
workflow_call: | ||
inputs: | ||
# repo and branch | ||
repo: | ||
type: string | ||
branch: | ||
type: string | ||
date: | ||
type: string | ||
sha: | ||
type: string | ||
build_type: | ||
required: true | ||
type: string | ||
package-name: | ||
required: true | ||
type: string | ||
test-unittest: | ||
required: false | ||
type: string | ||
default: '' | ||
test-before: | ||
required: false | ||
type: string | ||
default: 'true' | ||
matrix_filter: | ||
type: string | ||
default: "." | ||
defaults: | ||
run: | ||
shell: bash | ||
permissions: | ||
actions: read | ||
checks: none | ||
contents: read | ||
deployments: none | ||
discussions: none | ||
id-token: write | ||
issues: none | ||
packages: read | ||
pages: none | ||
pull-requests: read | ||
repository-projects: none | ||
security-events: none | ||
statuses: none | ||
jobs: | ||
compute-matrix: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
MATRIX: ${{ steps.compute-matrix.outputs.MATRIX }} | ||
steps: | ||
- name: Compute Matrix | ||
id: compute-matrix | ||
run: | | ||
set -eo pipefail | ||
export MATRIX=" | ||
- { CUDA_VER: '11.8.0'} | ||
- { CUDA_VER: '12.0.1'} | ||
" | ||
echo "MATRIX=$( | ||
yq -n -o json 'env(MATRIX)' | \ | ||
jq -c '${{ inputs.matrix_filter }} | {include: .}' \ | ||
)" | tee --append "${GITHUB_OUTPUT}" | ||
wheel-test: | ||
name: wheel test pure | ||
needs: compute-matrix | ||
env: | ||
RAPIDS_ARTIFACTS_DIR: ${{ github.workspace }}/artifacts | ||
runs-on: linux-amd64-gpu-v100-latest-1 | ||
strategy: | ||
matrix: ${{ fromJSON(needs.compute-matrix.outputs.MATRIX) }} | ||
container: | ||
image: "rapidsai/citestwheel:cuda${{ matrix.CUDA_VER }}-ubuntu18.04-py3.10" | ||
env: | ||
NVIDIA_VISIBLE_DEVICES: ${{ env.NVIDIA_VISIBLE_DEVICES }} # GPU jobs must set this container env variable | ||
RAPIDS_PY_VERSION: "3.10" | ||
RAPIDS_BUILD_TYPE: ${{ inputs.build_type }} | ||
CIBW_TEST_EXTRAS: "test" | ||
CIBW_TEST_COMMAND: ${{ inputs.test-unittest }} | ||
PIP_EXTRA_INDEX_URL: "https://pypi.k8s.rapids.ai/simple" | ||
steps: | ||
- uses: aws-actions/configure-aws-credentials@v2 | ||
with: | ||
role-to-assume: ${{ vars.AWS_ROLE_ARN }} | ||
aws-region: ${{ vars.AWS_REGION }} | ||
role-duration-seconds: 43200 # 12h | ||
- name: Run nvidia-smi to make sure GPU is working | ||
run: nvidia-smi | ||
- name: Install private index credentials in cibuildwheel container | ||
run: printf 'machine pypi.k8s.rapids.ai\n\tlogin cibuildwheel\n\tpassword ${{ secrets.RAPIDSAI_PYPI_CI_PASSWORD }}\n' > ~/.netrc | ||
- name: checkout code repo | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: ${{ inputs.repo }} | ||
ref: ${{ inputs.sha }} | ||
fetch-depth: 0 # unshallow fetch for setuptools-scm | ||
persist-credentials: false | ||
- name: Standardize repository information | ||
uses: rapidsai/shared-action-workflows/rapids-github-info@branch-23.08 | ||
with: | ||
repo: ${{ inputs.repo }} | ||
branch: ${{ inputs.branch }} | ||
date: ${{ inputs.date }} | ||
sha: ${{ inputs.sha }} | ||
- name: Run citestwheel | ||
run: | | ||
PIP_CU_VERSION="$(rapids-wheel-ctk-name-gen ${{ matrix.CUDA_VER }})" | ||
# The variable PIP_CU_VERSION needs to be used as an unevaluated string by downstream libraries | ||
# to support pulling wheels built from a previous workflow for different | ||
# CUDA versions | ||
export RAPIDS_BEFORE_TEST_COMMANDS_AMD64="${{ inputs.test-before }}" | ||
# citestwheel.sh implicitly uses this to download previously built wheels | ||
export RAPIDS_PY_WHEEL_NAME="${{ inputs.package-name }}_${PIP_CU_VERSION}" | ||
/citestwheel.sh | ||
- name: Upload additional artifacts | ||
if: "!cancelled()" | ||
run: rapids-upload-artifacts-dir cuda${RAPIDS_CUDA_VERSION%%.*}_$(arch)_py${RAPIDS_PY_VERSION//.} |