From be37361b1ddcdef3b0727fbc3e7ae8acd7c39833 Mon Sep 17 00:00:00 2001 From: Lawrence Mitchell Date: Wed, 24 May 2023 18:57:43 +0100 Subject: [PATCH 01/12] Add unified testing workflow for manylinux and "pure python" wheels --- .github/workflows/wheels-test.yml | 185 ++++++++++++++++++++++++++++++ 1 file changed, 185 insertions(+) create mode 100644 .github/workflows/wheels-test.yml diff --git a/.github/workflows/wheels-test.yml b/.github/workflows/wheels-test.yml new file mode 100644 index 00000000..f8a5c947 --- /dev/null +++ b/.github/workflows/wheels-test.yml @@ -0,0 +1,185 @@ +name: Test RAPIDS 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 + + # general settings + package-name: + required: true + type: string + matrix_filter: + # jq expression to filter matrix entries. + type: string + default: "." + pure_wheel: + # If true, filters out the matrix to a smaller set. + required: false + type: string + default: "false" + + # test settings + test-docker-options: + required: false + type: string + default: '-e _NOOP' + test-unittest: # tests are allowed to be blank because the wheel is installed and pip checked + required: false + type: string + default: '' + test-smoketest: + required: false + type: string + default: '' + test-before-amd64: + required: false + type: string + default: 'true' + test-before-arm64: + required: false + type: string + default: 'true' + +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: + wheel-test-compute-matrix: + runs-on: ubuntu-latest + env: + BUILD_TYPE: ${{ inputs.build_type }} + outputs: + MATRIX: ${{ steps.compute-matrix.outputs.MATRIX }} + steps: + - name: Validate test type + run: | + if [[ "$BUILD_TYPE" != "pull-request" ]] && [[ "$BUILD_TYPE" != "nightly" ]]; then + echo "Invalid build type! Must be 'nightly' or 'pull-request'." + exit 1 + fi + - name: Compute test matrix + id: compute-matrix + env: + SMOKE_TEST_CMD: ${{ inputs.test-smoketest }} + UNIT_TEST_CMD: ${{ inputs.test-unittest }} + run: | + set -eo pipefail + + export MATRICES=" + pull-request: + - { arch: 'amd64', python: '3.9', ctk: '11.8.0', image: 'ubuntu18.04', test-type: 'unit', test-command: ${UNIT_TEST_CMD}, gpu: 'v100', driver: 'latest' } + - { arch: 'amd64', python: '3.9', ctk: '12.0.1', image: 'ubuntu18.04', test-type: 'unit', test-command: ${UNIT_TEST_CMD}, gpu: 'v100', driver: 'latest' } + - { arch: 'arm64', python: '3.9', ctk: '12.0.1', image: 'ubuntu20.04', test-type: 'smoke', test-command: ${SMOKE_TEST_CMD}, gpu: 'a100', driver: 'latest' } + nightly: + - { arch: 'amd64', python: '3.9', ctk: '11.8.0', image: 'ubuntu18.04', test-type: 'unit', test-command: ${UNIT_TEST_CMD}, gpu: 'v100', driver: 'latest' } + - { arch: 'amd64', python: '3.10', ctk: '11.8.0', image: 'ubuntu18.04', test-type: 'unit', test-command: ${UNIT_TEST_CMD}, gpu: 'v100', driver: 'latest' } + - { arch: 'arm64', python: '3.9', ctk: '11.8.0', image: 'ubuntu20.04', test-type: 'unit', test-command: ${UNIT_TEST_CMD}, gpu: 'a100', driver: 'latest' } + - { arch: 'arm64', python: '3.10', ctk: '11.8.0', image: 'ubuntu20.04', test-type: 'unit', test-command: ${UNIT_TEST_CMD}, gpu: 'a100', driver: 'latest' } + - { arch: 'amd64', python: '3.9', ctk: '12.0.1', image: 'ubuntu18.04', test-type: 'unit', test-command: ${UNIT_TEST_CMD}, gpu: 'v100', driver: 'latest' } + - { arch: 'amd64', python: '3.10', ctk: '12.0.1', image: 'ubuntu18.04', test-type: 'unit', test-command: ${UNIT_TEST_CMD}, gpu: 'v100', driver: 'latest' } + - { arch: 'arm64', python: '3.9', ctk: '12.0.1', image: 'ubuntu20.04', test-type: 'unit', test-command: ${UNIT_TEST_CMD}, gpu: 'a100', driver: 'latest' } + - { arch: 'arm64', python: '3.10', ctk: '12.0.1', image: 'ubuntu20.04', test-type: 'unit', test-command: ${UNIT_TEST_CMD}, gpu: 'a100', driver: 'latest' } + " + + TEST_MATRIX=$(yq -n 'env(MATRICES) | .[strenv(BUILD_TYPE)]') + export TEST_MATRIX + + echo ${{ inputs.pure_wheel }} + if [[ ${{ inputs.pure_wheel }} == "true" ]]; then + pure_wheel_filter='[.[] | select(.arch == "amd64" and .image == "ubuntu18.04" and ."test-type" == "unit")]' + else + pure_wheel_filter='.' + fi + echo ${pure_wheel_filter} + echo "MATRIX=$( + yq -n -o json 'env(TEST_MATRIX)' | \ + jq -c "${{ inputs.matrix_filter }} | ${pure_wheel_filter} | {include: .}" \ + )" | tee --append "${GITHUB_OUTPUT}" + + wheel-test: + name: wheel ${{ matrix.test-type }} test ${{ matrix.arch }} ${{ matrix.python }} ${{ matrix.ctk }} + needs: wheel-test-compute-matrix + strategy: + matrix: ${{ fromJSON(needs.wheel-test-compute-matrix.outputs.MATRIX) }} + runs-on: "linux-${{ matrix.arch }}-gpu-${{ matrix.gpu }}-${{ matrix.driver }}-1" + container: + image: "rapidsai/citestwheel:cuda-devel-${{ matrix.ctk }}-${{ matrix.image }}" + options: ${{ inputs.test-docker-options }} + env: + NVIDIA_VISIBLE_DEVICES: ${{ env.NVIDIA_VISIBLE_DEVICES }} # GPU jobs must set this container env variable + RAPIDS_PY_VERSION: ${{ matrix.python }} + RAPIDS_BUILD_TYPE: ${{ inputs.build_type }} + PIP_EXTRA_INDEX_URL: "https://pypi.k8s.rapids.ai/simple" + CIBW_TEST_EXTRAS: "test" + CIBW_TEST_COMMAND: ${{ matrix.test-command }} + 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.ctk }})" + + # 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-amd64 }}" + export RAPIDS_BEFORE_TEST_COMMANDS_ARM64="${{ inputs.test-before-arm64 }}" + + # citestwheel.sh implicitly uses this to download previously built wheels + export RAPIDS_PY_WHEEL_NAME="${{ inputs.package-name }}_${PIP_CU_VERSION}" + + /citestwheel.sh From 705e99229879d2b0af5e3fd6330c111b64d6245e Mon Sep 17 00:00:00 2001 From: Lawrence Mitchell Date: Wed, 24 May 2023 18:58:00 +0100 Subject: [PATCH 02/12] Add unified publish workflow for manylinux and "pure python" wheels --- .github/workflows/wheels-publish.yml | 75 ++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 .github/workflows/wheels-publish.yml diff --git a/.github/workflows/wheels-publish.yml b/.github/workflows/wheels-publish.yml new file mode 100644 index 00000000..39dcef9a --- /dev/null +++ b/.github/workflows/wheels-publish.yml @@ -0,0 +1,75 @@ +name: Publish RAPIDS 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 + + # general settings + package-name: + required: true + type: string + +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: + wheel-publish: + name: wheels publish + runs-on: ubuntu-latest + container: + # ctk version of the container is irrelevant in the publish step + # it's simply a launcher for twine + image: "rapidsai/manylinux_v2_2014:cuda-devel-11.8.0-centos7" + env: + RAPIDS_BUILD_TYPE: ${{ inputs.build_type }} + TWINE_USERNAME: cibuildwheel + TWINE_PASSWORD: ${{ secrets.RAPIDSAI_PYPI_CI_PASSWORD }} + TWINE_REPOSITORY_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: 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: Download wheels from downloads.rapids.ai and publish to internal PyPI + run: rapids-twine-new "${{ inputs.package-name }}" From 6f3a86bac3a36adef637803d19f3940a786375ec Mon Sep 17 00:00:00 2001 From: Lawrence Mitchell Date: Thu, 25 May 2023 15:54:32 +0100 Subject: [PATCH 03/12] Minor fixes in review Co-authored-by: AJ Schmidt --- .github/workflows/wheels-test.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/wheels-test.yml b/.github/workflows/wheels-test.yml index f8a5c947..070d382d 100644 --- a/.github/workflows/wheels-test.yml +++ b/.github/workflows/wheels-test.yml @@ -112,13 +112,11 @@ jobs: TEST_MATRIX=$(yq -n 'env(MATRICES) | .[strenv(BUILD_TYPE)]') export TEST_MATRIX - echo ${{ inputs.pure_wheel }} + pure_wheel_filter='.' if [[ ${{ inputs.pure_wheel }} == "true" ]]; then pure_wheel_filter='[.[] | select(.arch == "amd64" and .image == "ubuntu18.04" and ."test-type" == "unit")]' - else - pure_wheel_filter='.' fi - echo ${pure_wheel_filter} + echo "MATRIX=$( yq -n -o json 'env(TEST_MATRIX)' | \ jq -c "${{ inputs.matrix_filter }} | ${pure_wheel_filter} | {include: .}" \ From 805c64b39f750e9d298b8a5160446b55bb8a7ca4 Mon Sep 17 00:00:00 2001 From: Lawrence Mitchell Date: Tue, 30 May 2023 11:39:55 +0100 Subject: [PATCH 04/12] WIP: Perhaps canonicalise pure-python wheel names correctly We just need to encode the major version in the filename string. --- .github/workflows/wheels-pure-build.yml | 3 ++- .github/workflows/wheels-test.yml | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/wheels-pure-build.yml b/.github/workflows/wheels-pure-build.yml index e929e7b7..86ba328d 100644 --- a/.github/workflows/wheels-pure-build.yml +++ b/.github/workflows/wheels-pure-build.yml @@ -117,4 +117,5 @@ jobs: # rapids-upload-wheels-to-s3 uses rapids-package-name which implicitly relies # on this variable being set export RAPIDS_PY_WHEEL_NAME="${{ inputs.package-name }}_${PIP_CU_VERSION}" - rapids-upload-wheels-to-s3 dist + # hack hack + RAPIDS_PY_VERSION=3 rapids-upload-wheels-to-s3 dist diff --git a/.github/workflows/wheels-test.yml b/.github/workflows/wheels-test.yml index 070d382d..f732ebde 100644 --- a/.github/workflows/wheels-test.yml +++ b/.github/workflows/wheels-test.yml @@ -180,4 +180,8 @@ jobs: # citestwheel.sh implicitly uses this to download previously built wheels export RAPIDS_PY_WHEEL_NAME="${{ inputs.package-name }}_${PIP_CU_VERSION}" + if [[ ${{ inputs.pure_wheel }} == "true" ]]; then + export RAPIDS_PY_VERSION=3 + fi + /citestwheel.sh From e603a00f50d241652623481897217307b70f415e Mon Sep 17 00:00:00 2001 From: Rick Ratzel Date: Fri, 30 Jun 2023 14:23:45 -0500 Subject: [PATCH 05/12] Enables pure wheel builds for both py 3.9 and py 3.10, removes pure wheel test filter so all python build combinations are tested. --- .github/workflows/wheels-pure-build.yml | 35 ++++++++++++++++++++----- .github/workflows/wheels-test.yml | 16 +---------- 2 files changed, 30 insertions(+), 21 deletions(-) diff --git a/.github/workflows/wheels-pure-build.yml b/.github/workflows/wheels-pure-build.yml index 86ba328d..eead6c5a 100644 --- a/.github/workflows/wheels-pure-build.yml +++ b/.github/workflows/wheels-pure-build.yml @@ -60,19 +60,40 @@ jobs: id: get_epoch_time run: echo "RAPIDS_EPOCH_TIMESTAMP=$(date +%s)" >> "${GITHUB_OUTPUT}" + compute-matrix: + runs-on: ubuntu-latest + outputs: + MATRIX: ${{ steps.compute-matrix.outputs.MATRIX }} + steps: + - name: Compute Build Matrix + id: compute-matrix + run: | + set -eo pipefail + + export MATRIX=" + - { ctk: '11.8.0', python: '3.9', image: 'rapidsai/manylinux_v2_2014:cuda-devel-11.8.0-centos7'} + - { ctk: '11.8.0', python: '3.10', image: 'rapidsai/manylinux_v2_2014:cuda-devel-11.8.0-centos7' } + - { ctk: '12.0.1', python: '3.9', image: 'rapidsai/manylinux_v2_2014:cuda-devel-12.0.1-centos7'} + - { ctk: '12.0.1', python: '3.10', image: 'rapidsai/manylinux_v2_2014:cuda-devel-12.0.1-centos7' } + " + + echo "MATRIX=$( + yq -n -o json 'env(MATRIX)' | \ + jq -c '${{ inputs.matrix_filter }} | {include: .}' \ + )" | tee --append "${GITHUB_OUTPUT}" + wheel-build: - name: wheel build pure ${{ matrix.ctk }} - needs: wheel-epoch-timestamp + name: wheel build pure ${{ matrix.ctk }} ${{ matrix.python }} + needs: [wheel-epoch-timestamp, compute-matrix] strategy: - matrix: - ctk: ["11.8.0", "12.0.1"] + matrix: ${{ fromJSON(needs.compute-matrix.outputs.MATRIX) }} runs-on: ubuntu-latest container: # Always use the manylinux container built on x86 to match the runner arch image: "rapidsai/manylinux_v2_2014:cuda-devel-11.8.0-centos7" env: RAPIDS_BUILD_TYPE: ${{ inputs.build_type }} - RAPIDS_PY_VERSION: "3.10" + RAPIDS_PY_VERSION: ${{ matrix.python }} steps: - uses: aws-actions/configure-aws-credentials@v2 @@ -117,5 +138,7 @@ jobs: # rapids-upload-wheels-to-s3 uses rapids-package-name which implicitly relies # on this variable being set export RAPIDS_PY_WHEEL_NAME="${{ inputs.package-name }}_${PIP_CU_VERSION}" + + # DO WE STILL NEED THE HACK BELOW? # hack hack - RAPIDS_PY_VERSION=3 rapids-upload-wheels-to-s3 dist + #RAPIDS_PY_VERSION=3 rapids-upload-wheels-to-s3 dist diff --git a/.github/workflows/wheels-test.yml b/.github/workflows/wheels-test.yml index f732ebde..8fe1f64a 100644 --- a/.github/workflows/wheels-test.yml +++ b/.github/workflows/wheels-test.yml @@ -24,11 +24,6 @@ on: # jq expression to filter matrix entries. type: string default: "." - pure_wheel: - # If true, filters out the matrix to a smaller set. - required: false - type: string - default: "false" # test settings test-docker-options: @@ -112,14 +107,9 @@ jobs: TEST_MATRIX=$(yq -n 'env(MATRICES) | .[strenv(BUILD_TYPE)]') export TEST_MATRIX - pure_wheel_filter='.' - if [[ ${{ inputs.pure_wheel }} == "true" ]]; then - pure_wheel_filter='[.[] | select(.arch == "amd64" and .image == "ubuntu18.04" and ."test-type" == "unit")]' - fi - echo "MATRIX=$( yq -n -o json 'env(TEST_MATRIX)' | \ - jq -c "${{ inputs.matrix_filter }} | ${pure_wheel_filter} | {include: .}" \ + jq -c "${{ inputs.matrix_filter }} | {include: .}" \ )" | tee --append "${GITHUB_OUTPUT}" wheel-test: @@ -180,8 +170,4 @@ jobs: # citestwheel.sh implicitly uses this to download previously built wheels export RAPIDS_PY_WHEEL_NAME="${{ inputs.package-name }}_${PIP_CU_VERSION}" - if [[ ${{ inputs.pure_wheel }} == "true" ]]; then - export RAPIDS_PY_VERSION=3 - fi - /citestwheel.sh From c05f731ca637049836669b4bc230051ef33639e1 Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Wed, 12 Jul 2023 14:01:43 -0700 Subject: [PATCH 06/12] Put back upload --- .github/workflows/wheels-pure-build.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/wheels-pure-build.yml b/.github/workflows/wheels-pure-build.yml index eead6c5a..ee837abe 100644 --- a/.github/workflows/wheels-pure-build.yml +++ b/.github/workflows/wheels-pure-build.yml @@ -139,6 +139,4 @@ jobs: # on this variable being set export RAPIDS_PY_WHEEL_NAME="${{ inputs.package-name }}_${PIP_CU_VERSION}" - # DO WE STILL NEED THE HACK BELOW? - # hack hack - #RAPIDS_PY_VERSION=3 rapids-upload-wheels-to-s3 dist + rapids-upload-wheels-to-s3 dist From 97670820c28ea881265d574a97910445f663097e Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Wed, 12 Jul 2023 14:25:36 -0700 Subject: [PATCH 07/12] Typo --- .github/workflows/wheels-pure-build.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/wheels-pure-build.yml b/.github/workflows/wheels-pure-build.yml index ee837abe..42eeda29 100644 --- a/.github/workflows/wheels-pure-build.yml +++ b/.github/workflows/wheels-pure-build.yml @@ -138,5 +138,4 @@ jobs: # rapids-upload-wheels-to-s3 uses rapids-package-name which implicitly relies # on this variable being set export RAPIDS_PY_WHEEL_NAME="${{ inputs.package-name }}_${PIP_CU_VERSION}" - rapids-upload-wheels-to-s3 dist From df0068d727dfdadf87b5b48d5dc3acc3119430b9 Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Wed, 12 Jul 2023 15:37:39 -0700 Subject: [PATCH 08/12] Add matrix filter to workflow --- .github/workflows/wheels-pure-build.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/wheels-pure-build.yml b/.github/workflows/wheels-pure-build.yml index 42eeda29..6e315876 100644 --- a/.github/workflows/wheels-pure-build.yml +++ b/.github/workflows/wheels-pure-build.yml @@ -22,6 +22,9 @@ on: package-dir: required: true type: string + matrix_filter: + type: string + default: "." # run command before pure wheel build before-wheel: From facd5f73479426ebf4e8207a91d488e197a8b2df Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Wed, 19 Jul 2023 15:39:05 -0700 Subject: [PATCH 09/12] Revert unnecessary changes --- .github/workflows/wheels-pure-build.yml | 39 ++---- .github/workflows/wheels-test.yml | 173 ------------------------ 2 files changed, 10 insertions(+), 202 deletions(-) delete mode 100644 .github/workflows/wheels-test.yml diff --git a/.github/workflows/wheels-pure-build.yml b/.github/workflows/wheels-pure-build.yml index 4911ebd7..91736ac1 100644 --- a/.github/workflows/wheels-pure-build.yml +++ b/.github/workflows/wheels-pure-build.yml @@ -22,9 +22,6 @@ on: package-dir: required: true type: string - matrix_filter: - type: string - default: "." # run command before pure wheel build before-wheel: @@ -63,40 +60,21 @@ jobs: id: get_epoch_time run: echo "RAPIDS_EPOCH_TIMESTAMP=$(date +%s)" >> "${GITHUB_OUTPUT}" - compute-matrix: - runs-on: ubuntu-latest - outputs: - MATRIX: ${{ steps.compute-matrix.outputs.MATRIX }} - steps: - - name: Compute Build Matrix - id: compute-matrix - run: | - set -eo pipefail - - export MATRIX=" - - { ctk: '11.8.0', python: '3.9', image: 'rapidsai/manylinux_v2_2014:cuda-devel-11.8.0-centos7'} - - { ctk: '11.8.0', python: '3.10', image: 'rapidsai/manylinux_v2_2014:cuda-devel-11.8.0-centos7' } - - { ctk: '12.0.1', python: '3.9', image: 'rapidsai/manylinux_v2_2014:cuda-devel-12.0.1-centos7'} - - { ctk: '12.0.1', python: '3.10', image: 'rapidsai/manylinux_v2_2014:cuda-devel-12.0.1-centos7' } - " - - echo "MATRIX=$( - yq -n -o json 'env(MATRIX)' | \ - jq -c '${{ inputs.matrix_filter }} | {include: .}' \ - )" | tee --append "${GITHUB_OUTPUT}" - wheel-build: - name: wheel build pure ${{ matrix.ctk }} ${{ matrix.python }} - needs: [wheel-epoch-timestamp, compute-matrix] + name: wheel build pure ${{ matrix.ctk }} + needs: wheel-epoch-timestamp + env: + RAPIDS_ARTIFACTS_DIR: ${{ github.workspace }}/artifacts strategy: - matrix: ${{ fromJSON(needs.compute-matrix.outputs.MATRIX) }} + matrix: + ctk: ["11.8.0", "12.0.1"] runs-on: ubuntu-latest container: # Always use the manylinux container built on x86 to match the runner arch image: "rapidsai/ci-wheel:cuda${{ matrix.ctk }}-centos7-py3.10" env: RAPIDS_BUILD_TYPE: ${{ inputs.build_type }} - RAPIDS_PY_VERSION: ${{ matrix.python }} + RAPIDS_PY_VERSION: "3.10" steps: - uses: aws-actions/configure-aws-credentials@v2 @@ -142,3 +120,6 @@ jobs: # on this variable being set export RAPIDS_PY_WHEEL_NAME="${{ inputs.package-name }}_${PIP_CU_VERSION}" rapids-upload-wheels-to-s3 dist + - name: Upload additional artifacts + if: "!cancelled()" + run: rapids-upload-artifacts-dir cuda${RAPIDS_CUDA_VERSION%%.*}_$(arch)_py${RAPIDS_PY_VERSION//.} diff --git a/.github/workflows/wheels-test.yml b/.github/workflows/wheels-test.yml deleted file mode 100644 index 8fe1f64a..00000000 --- a/.github/workflows/wheels-test.yml +++ /dev/null @@ -1,173 +0,0 @@ -name: Test RAPIDS 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 - - # general settings - package-name: - required: true - type: string - matrix_filter: - # jq expression to filter matrix entries. - type: string - default: "." - - # test settings - test-docker-options: - required: false - type: string - default: '-e _NOOP' - test-unittest: # tests are allowed to be blank because the wheel is installed and pip checked - required: false - type: string - default: '' - test-smoketest: - required: false - type: string - default: '' - test-before-amd64: - required: false - type: string - default: 'true' - test-before-arm64: - required: false - type: string - default: 'true' - -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: - wheel-test-compute-matrix: - runs-on: ubuntu-latest - env: - BUILD_TYPE: ${{ inputs.build_type }} - outputs: - MATRIX: ${{ steps.compute-matrix.outputs.MATRIX }} - steps: - - name: Validate test type - run: | - if [[ "$BUILD_TYPE" != "pull-request" ]] && [[ "$BUILD_TYPE" != "nightly" ]]; then - echo "Invalid build type! Must be 'nightly' or 'pull-request'." - exit 1 - fi - - name: Compute test matrix - id: compute-matrix - env: - SMOKE_TEST_CMD: ${{ inputs.test-smoketest }} - UNIT_TEST_CMD: ${{ inputs.test-unittest }} - run: | - set -eo pipefail - - export MATRICES=" - pull-request: - - { arch: 'amd64', python: '3.9', ctk: '11.8.0', image: 'ubuntu18.04', test-type: 'unit', test-command: ${UNIT_TEST_CMD}, gpu: 'v100', driver: 'latest' } - - { arch: 'amd64', python: '3.9', ctk: '12.0.1', image: 'ubuntu18.04', test-type: 'unit', test-command: ${UNIT_TEST_CMD}, gpu: 'v100', driver: 'latest' } - - { arch: 'arm64', python: '3.9', ctk: '12.0.1', image: 'ubuntu20.04', test-type: 'smoke', test-command: ${SMOKE_TEST_CMD}, gpu: 'a100', driver: 'latest' } - nightly: - - { arch: 'amd64', python: '3.9', ctk: '11.8.0', image: 'ubuntu18.04', test-type: 'unit', test-command: ${UNIT_TEST_CMD}, gpu: 'v100', driver: 'latest' } - - { arch: 'amd64', python: '3.10', ctk: '11.8.0', image: 'ubuntu18.04', test-type: 'unit', test-command: ${UNIT_TEST_CMD}, gpu: 'v100', driver: 'latest' } - - { arch: 'arm64', python: '3.9', ctk: '11.8.0', image: 'ubuntu20.04', test-type: 'unit', test-command: ${UNIT_TEST_CMD}, gpu: 'a100', driver: 'latest' } - - { arch: 'arm64', python: '3.10', ctk: '11.8.0', image: 'ubuntu20.04', test-type: 'unit', test-command: ${UNIT_TEST_CMD}, gpu: 'a100', driver: 'latest' } - - { arch: 'amd64', python: '3.9', ctk: '12.0.1', image: 'ubuntu18.04', test-type: 'unit', test-command: ${UNIT_TEST_CMD}, gpu: 'v100', driver: 'latest' } - - { arch: 'amd64', python: '3.10', ctk: '12.0.1', image: 'ubuntu18.04', test-type: 'unit', test-command: ${UNIT_TEST_CMD}, gpu: 'v100', driver: 'latest' } - - { arch: 'arm64', python: '3.9', ctk: '12.0.1', image: 'ubuntu20.04', test-type: 'unit', test-command: ${UNIT_TEST_CMD}, gpu: 'a100', driver: 'latest' } - - { arch: 'arm64', python: '3.10', ctk: '12.0.1', image: 'ubuntu20.04', test-type: 'unit', test-command: ${UNIT_TEST_CMD}, gpu: 'a100', driver: 'latest' } - " - - TEST_MATRIX=$(yq -n 'env(MATRICES) | .[strenv(BUILD_TYPE)]') - export TEST_MATRIX - - echo "MATRIX=$( - yq -n -o json 'env(TEST_MATRIX)' | \ - jq -c "${{ inputs.matrix_filter }} | {include: .}" \ - )" | tee --append "${GITHUB_OUTPUT}" - - wheel-test: - name: wheel ${{ matrix.test-type }} test ${{ matrix.arch }} ${{ matrix.python }} ${{ matrix.ctk }} - needs: wheel-test-compute-matrix - strategy: - matrix: ${{ fromJSON(needs.wheel-test-compute-matrix.outputs.MATRIX) }} - runs-on: "linux-${{ matrix.arch }}-gpu-${{ matrix.gpu }}-${{ matrix.driver }}-1" - container: - image: "rapidsai/citestwheel:cuda-devel-${{ matrix.ctk }}-${{ matrix.image }}" - options: ${{ inputs.test-docker-options }} - env: - NVIDIA_VISIBLE_DEVICES: ${{ env.NVIDIA_VISIBLE_DEVICES }} # GPU jobs must set this container env variable - RAPIDS_PY_VERSION: ${{ matrix.python }} - RAPIDS_BUILD_TYPE: ${{ inputs.build_type }} - PIP_EXTRA_INDEX_URL: "https://pypi.k8s.rapids.ai/simple" - CIBW_TEST_EXTRAS: "test" - CIBW_TEST_COMMAND: ${{ matrix.test-command }} - 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.ctk }})" - - # 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-amd64 }}" - export RAPIDS_BEFORE_TEST_COMMANDS_ARM64="${{ inputs.test-before-arm64 }}" - - # citestwheel.sh implicitly uses this to download previously built wheels - export RAPIDS_PY_WHEEL_NAME="${{ inputs.package-name }}_${PIP_CU_VERSION}" - - /citestwheel.sh From 6543304d43be0c40d3e619b9169e3329d1c92b10 Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Wed, 19 Jul 2023 15:39:36 -0700 Subject: [PATCH 10/12] Revert more unnecessary changes --- .github/workflows/wheels-pure-build.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/wheels-pure-build.yml b/.github/workflows/wheels-pure-build.yml index 91736ac1..2ea1b50e 100644 --- a/.github/workflows/wheels-pure-build.yml +++ b/.github/workflows/wheels-pure-build.yml @@ -74,7 +74,6 @@ jobs: image: "rapidsai/ci-wheel:cuda${{ matrix.ctk }}-centos7-py3.10" env: RAPIDS_BUILD_TYPE: ${{ inputs.build_type }} - RAPIDS_PY_VERSION: "3.10" steps: - uses: aws-actions/configure-aws-credentials@v2 From 5895094b993f3085777f90e397f84a6abd2963e8 Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Wed, 19 Jul 2023 15:46:16 -0700 Subject: [PATCH 11/12] Rename --- .github/workflows/{wheels-publish.yml => wheels-publish.yaml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{wheels-publish.yml => wheels-publish.yaml} (100%) diff --git a/.github/workflows/wheels-publish.yml b/.github/workflows/wheels-publish.yaml similarity index 100% rename from .github/workflows/wheels-publish.yml rename to .github/workflows/wheels-publish.yaml From d8621f5bd0811d846231ac8f9214cf03e41b7813 Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Wed, 19 Jul 2023 15:46:31 -0700 Subject: [PATCH 12/12] Switch to rapids-twine --- .github/workflows/wheels-publish.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/wheels-publish.yaml b/.github/workflows/wheels-publish.yaml index 39dcef9a..665654cb 100644 --- a/.github/workflows/wheels-publish.yaml +++ b/.github/workflows/wheels-publish.yaml @@ -72,4 +72,4 @@ jobs: sha: ${{ inputs.sha }} - name: Download wheels from downloads.rapids.ai and publish to internal PyPI - run: rapids-twine-new "${{ inputs.package-name }}" + run: rapids-twine "${{ inputs.package-name }}"