diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 86eeb1e17..8679cd61b 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -58,22 +58,23 @@ jobs: date: ${{ inputs.date }} sha: ${{ inputs.sha }} wheel-build: - runs-on: ubuntu-latest - container: - image: rapidsai/ci-conda:latest - defaults: - run: - shell: bash - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - name: Build wheel - run: ci/build_python_pypi.sh - env: - GH_TOKEN: ${{ github.token }} - - name: Publish distribution 📦 to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 - with: - password: ${{ secrets.RAPIDSAI_PYPI_TOKEN }} - skip-existing: true + secrets: inherit + uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-24.02 + with: + build_type: ${{ inputs.build_type || 'branch' }} + branch: ${{ inputs.branch }} + sha: ${{ inputs.sha }} + date: ${{ inputs.date }} + script: ci/build_wheel.sh + # Package is pure Python and only ever requires one build. + matrix_filter: map(select(.ARCH == "amd64" and .PY_VER == "3.10" and .CUDA_VER == "12.0.1")) + wheel-publish: + needs: wheel-build + secrets: inherit + uses: rapidsai/shared-workflows/.github/workflows/wheels-publish.yaml@branch-24.02 + with: + build_type: ${{ inputs.build_type || 'branch' }} + branch: ${{ inputs.branch }} + sha: ${{ inputs.sha }} + date: ${{ inputs.date }} + package-name: dask-cuda diff --git a/ci/build_python_pypi.sh b/ci/build_python_pypi.sh deleted file mode 100755 index e177acf87..000000000 --- a/ci/build_python_pypi.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash - - -python -m pip install build --user - - -version=$(rapids-generate-version) -commit=$(git rev-parse HEAD) -# While conda provides these during conda-build, they are also necessary during -# the setup.py build for PyPI -export GIT_DESCRIBE_TAG=$(git describe --abbrev=0 --tags) -export GIT_DESCRIBE_NUMBER=$(git rev-list ${GIT_DESCRIBE_TAG}..HEAD --count) - -# Build date for PyPI pre-releases using version from `pyproject.toml` as source. -TOML_VERSION=$(grep "version = .*" pyproject.toml | grep -o '".*"' | sed 's/"//g') -if ! rapids-is-release-build; then - export PACKAGE_VERSION_NUMBER="${version}" -fi - -# For nightlies we want to ensure that we're pulling in alphas as well. The -# easiest way to do so is to augment the spec with a constraint containing a -# min alpha version that doesn't affect the version bounds but does allow usage -# of alpha versions for that dependency without --pre -alpha_spec='' -if ! rapids-is-release-build; then - alpha_spec=',>=0.0.0a0' -fi - -sed -r -i "s/rapids-dask-dependency==(.*)\"/rapids-dask-dependency==\1${alpha_spec}\"/g" pyproject.toml - -echo "${version}" | tr -d '"' > VERSION -sed -i "/^__git_commit__/ s/= .*/= \"${commit}\"/g" "dask_cuda/_version.py" - -# Compute/export RAPIDS_DATE_STRING -source rapids-env-update - - -python -m build \ - --sdist \ - --wheel \ - --outdir dist/ \ - . diff --git a/ci/build_wheel.sh b/ci/build_wheel.sh new file mode 100755 index 000000000..d57ea5bc2 --- /dev/null +++ b/ci/build_wheel.sh @@ -0,0 +1,18 @@ +#!/bin/bash +# Copyright (c) 2023, NVIDIA CORPORATION. + +set -euo pipefail + +source rapids-configure-sccache +source rapids-date-string + +package_name=dask-cuda +package_dir="pip/${package_name}" +version=$(rapids-generate-version) + +sed -i "s/^version = .*/version = \"${version}\"/g" "${package_dir}/pyproject.toml" + +cd "${package_dir}" +python -m pip wheel . -w dist -vvv --no-deps --disable-pip-version-check + +RAPIDS_PY_WHEEL_NAME="${package_name}" rapids-upload-wheels-to-s3 dist