Skip to content

Commit

Permalink
Use CI matrix from shared-workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleFromNVIDIA committed May 3, 2024
1 parent 0c7e6d1 commit 8a33c74
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 40 deletions.
43 changes: 14 additions & 29 deletions .github/workflows/checks-and-builds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,34 +20,19 @@ jobs:
fetch-depth: 0
- name: Check style
run: "./ci/check_style.sh"
conda-build:
build-conda:
needs: check-style
runs-on: ubuntu-latest
container:
image: rapidsai/ci-conda:cuda12.2.2-ubuntu22.04-py3.9
env:
PUBLISH: "${{ inputs.publish }}"
steps:
- uses: actions/checkout@v4
- name: Set Proper Conda Upload Token
run: |
RAPIDS_CONDA_TOKEN=${{ secrets.CONDA_RAPIDSAI_NIGHTLY_TOKEN }}
if rapids-is-release-build; then
RAPIDS_CONDA_TOKEN=${{ secrets.CONDA_RAPIDSAI_TOKEN }}
fi
echo "RAPIDS_CONDA_TOKEN=${RAPIDS_CONDA_TOKEN}" >> "${GITHUB_ENV}"
- name: Python build
run: "./ci/build_python.sh ${PUBLISH}"
wheel-build:
uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@branch-24.06
with:
build_type: branch
script: "ci/build_python.sh"
# Select only the build with the minimum Python version and the maximum CUDA version
matrix_filter: map(select(.ARCH == "amd64")) | group_by(.CUDA_VER|split(".")|map(tonumber)|.[0]) | map(min_by([(.PY_VER|split(".")|map(tonumber)), (.CUDA_VER|split(".")|map(tonumber))])) | [max_by(.PY_VER|split(".")|map(tonumber))]
build-wheel:
needs: check-style
runs-on: ubuntu-latest
container:
image: rapidsai/ci-wheel:cuda12.2.2-ubuntu20.04-py3.9
env:
PUBLISH: "${{ inputs.publish }}"
RAPIDS_CONDA_TOKEN: ${{ secrets.CONDA_RAPIDSAI_WHEELS_NIGHTLY_TOKEN }}
steps:
- name: checkout code repo
uses: actions/checkout@v4
- name: Build and repair the wheel
run: "./ci/build_wheel.sh ${PUBLISH}"
uses: rapidsai/shared-workflows/.github/workflows/whels-build.yaml@branch-24.06
with:
build_type: branch
script: "ci/build_wheel.sh"
# Select only the build with the minimum Python version and the maximum CUDA version
matrix_filter: map(select(.ARCH == "amd64")) | group_by(.CUDA_VER|split(".")|map(tonumber)|.[0]) | map(min_by([(.PY_VER|split(".")|map(tonumber)), (.CUDA_VER|split(".")|map(tonumber))])) | [max_by(.PY_VER|split(".")|map(tonumber))]
5 changes: 0 additions & 5 deletions ci/build_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,3 @@ UPLOAD_PACKAGES="${1:-false}"

PKG_DIR="${PWD}/conda_package"
rapids-conda-retry mambabuild --output-folder "${PKG_DIR}" conda/recipes/rapids-build-backend

if [ "$UPLOAD_PACKAGES" = "true" ]; then
# TODO: Figure out the best way to get CONDA_PKG_FILE
rapids-retry anaconda -t "${RAPIDS_CONDA_TOKEN}" upload --label main --skip-existing --no-progress "${PKG_DIR}/noarch/"*.tar.bz2
fi
6 changes: 0 additions & 6 deletions ci/build_wheel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,9 @@

set -euo pipefail

UPLOAD_PACKAGES="${1:-false}"

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

# Run tests
WHL_FILE=$(ls dist/*.whl)
python -m pip install "${WHL_FILE}[test]"
python -m pytest -v tests/

if [ "$UPLOAD_PACKAGES" = "true" ]; then
anaconda -t "${RAPIDS_CONDA_TOKEN}" upload --skip-existing --no-progress ${WHL_FILE}
fi

0 comments on commit 8a33c74

Please sign in to comment.