Skip to content

Commit

Permalink
Switch to local scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
vyasr committed Jul 21, 2023
1 parent 8eef032 commit f926d8b
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 21 deletions.
11 changes: 4 additions & 7 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,23 +45,20 @@ jobs:
sha: ${{ inputs.sha }}
wheel-build:
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/wheels-manylinux-build.yml@branch-23.08
uses: rapidsai/shared-action-workflows/.github/workflows/wheels-build.yaml@branch-23.08
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
sha: ${{ inputs.sha }}
date: ${{ inputs.date }}
package-name: ucx_py
package-dir: .
post-repair-amd64: "${GITHUB_WORKSPACE}/.github/build-scripts/patch-wheel.sh $(realpath ucx_py*manylinux*.whl)"
post-repair-arm64: "${GITHUB_WORKSPACE}/.github/build-scripts/patch-wheel.sh $(realpath ucx_py*manylinux*.whl)"
script: ci/build_wheel.sh
wheel-publish:
needs: wheel-build
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/wheels-manylinux-publish.yml@branch-23.08
uses: rapidsai/shared-action-workflows/.github/workflows/wheels-publish.yaml@branch-23.08
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
sha: ${{ inputs.sha }}
date: ${{ inputs.date }}
package-name: ucx_py
script: ci/test_wheel.sh
14 changes: 4 additions & 10 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,15 @@ jobs:
wheel-build:
needs: checks
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/wheels-manylinux-build.yml@branch-23.08
uses: rapidsai/shared-action-workflows/.github/workflows/wheels-build.yaml@branch-23.08
with:
build_type: pull-request
package-name: ucx_py
package-dir: .
post-repair-amd64: "${GITHUB_WORKSPACE}/.github/build-scripts/patch-wheel.sh $(realpath ucx_py*manylinux*.whl)"
post-repair-arm64: "${GITHUB_WORKSPACE}/.github/build-scripts/patch-wheel.sh $(realpath ucx_py*manylinux*.whl)"
script: ci/build_wheel.sh
wheel-tests:
needs: wheel-build
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/wheels-manylinux-test.yml@branch-23.08
uses: rapidsai/shared-action-workflows/.github/workflows/wheels-test.yaml@branch-23.08
with:
build_type: pull-request
package-name: ucx_py
script: ci/test_wheel.sh
test-docker-options: "--cap-add CAP_SYS_PTRACE --shm-size=8g"
# skipped test context: https://github.com/rapidsai/ucx-py/issues/797
test-unittest: "cd tests && python -m pytest --cache-clear -vs . && cd ../ucp && python -m pytest -k 'not test_send_recv_am' --cache-clear -vs ./_libs/tests/; cd .."
test-smoketest: "cd tests && python -m pytest --cache-clear -vs . && cd ../ucp && python -m pytest -k 'not test_send_recv_am' --cache-clear -vs ./_libs/tests/; cd .."
6 changes: 2 additions & 4 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,11 @@ jobs:
sha: ${{ inputs.sha }}
wheel-tests:
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/wheels-manylinux-test.yml@branch-23.08
uses: rapidsai/shared-action-workflows/.github/workflows/wheels-test.yaml@branch-23.08
with:
build_type: nightly
branch: ${{ inputs.branch }}
date: ${{ inputs.date }}
sha: ${{ inputs.sha }}
package-name: ucx_py
script: ci/test_wheel.sh
test-docker-options: "--cap-add CAP_SYS_PTRACE --shm-size=8g"
# skipped test context: https://github.com/rapidsai/ucx-py/issues/797
test-unittest: "cd tests && python -m pytest --cache-clear -vs . && cd ../ucp && python -m pytest -k 'not test_send_recv_am' --cache-clear -vs ./_libs/tests/; cd .."
26 changes: 26 additions & 0 deletions ci/build_wheel.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash
# Copyright (c) 2023, NVIDIA CORPORATION.

set -euo pipefail

source rapids-configure-sccache
source rapids-date-string

# Use gha-tools rapids-pip-wheel-version to generate wheel version then
# update the necessary files
version_override="$(rapids-pip-wheel-version ${RAPIDS_DATE_STRING})"

RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen ${RAPIDS_CUDA_VERSION})"

bash ci/release/apply_wheel_modifications.sh ${version_override} "-${RAPIDS_PY_CUDA_SUFFIX}"
echo "The package name and/or version was modified in the package source. The git diff is:"
git diff

python -m pip wheel . -w dist -vvv --no-deps --disable-pip-version-check

mkdir -p final_dist
python -m auditwheel repair -w final_dist dist/*

post-repair-amd64: "${GITHUB_WORKSPACE}/.github/build-scripts/patch-wheel.sh $(realpath final_dist/ucx_py*manylinux*.whl)"

RAPIDS_PY_WHEEL_NAME="cudf_${RAPIDS_PY_CUDA_SUFFIX}" rapids-upload-wheels-to-s3 final_dist
17 changes: 17 additions & 0 deletions ci/test_wheel.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash
# Copyright (c) 2023, NVIDIA CORPORATION.

set -eoxu pipefail

mkdir -p ./dist
RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen ${RAPIDS_CUDA_VERSION})"
RAPIDS_PY_WHEEL_NAME="cudf_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 ./dist

# echo to expand wildcard before adding `[extra]` requires for pip
python -m pip install $(echo ./dist/cudf*.whl)[test]

cd tests
python -m pytest --cache-clear -vs .
cd ../ucp
# skipped test context: https://github.com/rapidsai/ucx-py/issues/797
python -m pytest -k 'not test_send_recv_am' --cache-clear -vs ./_libs/tests/

0 comments on commit f926d8b

Please sign in to comment.