-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remove more cugraph-only details, other miscellaneous build/packaging…
… changes (#14) Proposes another batch of changes to get this repo ready to become the primary home of `nx-cugraph` development. * removes some unnecessary configuration leftover from the `cugraph` repo * updates CI configs * adds a `ci/update-release.sh` script (which RAPIDS ops will use when cutting new releases) * updates all pre-commit hooks to their latest versions ## Notes for Reviewers I'll leave more comments inline. Authors: - James Lamb (https://github.com/jameslamb) Approvers: - Kyle Edwards (https://github.com/KyleFromNVIDIA) - Ralph Liu (https://github.com/nv-rliu) URL: #14
- Loading branch information
Showing
9 changed files
with
91 additions
and
45 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,9 +9,6 @@ python: | |
benchmarks: | ||
- 'benchmarks/**' | ||
|
||
datasets: | ||
- 'datasets/**' | ||
|
||
ci: | ||
- 'ci/**' | ||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
name: build | ||
|
||
on: | ||
push: | ||
branches: | ||
- "branch-*" | ||
tags: | ||
- v[0-9][0-9].[0-9][0-9].[0-9][0-9] | ||
# TODO: uncomment this condition when ready to start publishing | ||
# packages from this repo | ||
# push: | ||
# branches: | ||
# - "branch-*" | ||
# tags: | ||
# - v[0-9][0-9].[0-9][0-9].[0-9][0-9] | ||
workflow_dispatch: | ||
inputs: | ||
branch: | ||
|
@@ -26,34 +28,22 @@ concurrency: | |
cancel-in-progress: true | ||
|
||
jobs: | ||
docs-build: | ||
if: github.ref_type == 'branch' | ||
needs: python-build | ||
secrets: inherit | ||
uses: rapidsai/shared-workflows/.github/workflows/[email protected] | ||
with: | ||
arch: "amd64" | ||
branch: ${{ inputs.branch }} | ||
build_type: ${{ inputs.build_type || 'branch' }} | ||
container_image: "rapidsai/ci-conda:cuda11.8.0-ubuntu22.04-py3.10" | ||
date: ${{ inputs.date }} | ||
node_type: "gpu-v100-latest-1" | ||
run_script: "ci/build_docs.sh" | ||
sha: ${{ inputs.sha }} | ||
wheel-build-nx-cugraph: | ||
needs: wheel-publish-pylibcugraph | ||
needs: wheel-publish-nx-cugraph | ||
secrets: inherit | ||
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@python-3.12 | ||
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-24.12 | ||
with: | ||
build_type: ${{ inputs.build_type || 'branch' }} | ||
branch: ${{ inputs.branch }} | ||
sha: ${{ inputs.sha }} | ||
date: ${{ inputs.date }} | ||
script: ci/build_wheel_nx-cugraph.sh | ||
# This selects "ARCH=amd64 + the latest supported Python + CUDA". | ||
matrix_filter: map(select(.ARCH == "amd64")) | group_by(.CUDA_VER|split(".")|map(tonumber)|.[0]) | map(max_by([(.PY_VER|split(".")|map(tonumber)), (.CUDA_VER|split(".")|map(tonumber))])) | ||
wheel-publish-nx-cugraph: | ||
needs: wheel-build-nx-cugraph | ||
secrets: inherit | ||
uses: rapidsai/shared-workflows/.github/workflows/wheels-publish.yaml@python-3.12 | ||
uses: rapidsai/shared-workflows/.github/workflows/wheels-publish.yaml@branch-24.12 | ||
with: | ||
build_type: ${{ inputs.build_type || 'branch' }} | ||
branch: ${{ inputs.branch }} | ||
|
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
#!/bin/bash | ||
# Copyright (c) 2018-2024, NVIDIA CORPORATION. | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
## Usage | ||
# bash update-version.sh <new_version> | ||
|
||
# Format is YY.MM.PP - no leading 'v' or trailing 'a' | ||
NEXT_FULL_TAG=$1 | ||
|
||
# Get current version | ||
CURRENT_TAG=$(git tag --merged HEAD | grep -xE '^v.*' | sort --version-sort | tail -n 1 | tr -d 'v') | ||
CURRENT_MAJOR=$(echo $CURRENT_TAG | awk '{split($0, a, "."); print a[1]}') | ||
CURRENT_MINOR=$(echo $CURRENT_TAG | awk '{split($0, a, "."); print a[2]}') | ||
CURRENT_SHORT_TAG=${CURRENT_MAJOR}.${CURRENT_MINOR} | ||
|
||
# Get <major>.<minor> for next version | ||
NEXT_MAJOR=$(echo $NEXT_FULL_TAG | awk '{split($0, a, "."); print a[1]}') | ||
NEXT_MINOR=$(echo $NEXT_FULL_TAG | awk '{split($0, a, "."); print a[2]}') | ||
NEXT_SHORT_TAG=${NEXT_MAJOR}.${NEXT_MINOR} | ||
|
||
echo "Preparing release $CURRENT_TAG => $NEXT_FULL_TAG" | ||
|
||
# Inplace sed replace; workaround for Linux and Mac | ||
function sed_runner() { | ||
sed -i.bak ''"$1"'' $2 && rm -f ${2}.bak | ||
} | ||
|
||
# Centralized version file update | ||
echo "${NEXT_FULL_TAG}" > ./VERSION | ||
|
||
# Need to distutils-normalize the original version | ||
NEXT_SHORT_TAG_PEP440=$(python -c "from packaging.version import Version; print(Version('${NEXT_SHORT_TAG}'))") | ||
|
||
DEPENDENCIES=( | ||
cudf | ||
cugraph | ||
pylibcugraph | ||
) | ||
for FILE in dependencies.yaml conda/environments/*.yaml conda/recipes/**/meta.yaml; do | ||
for DEP in "${DEPENDENCIES[@]}"; do | ||
sed_runner "/-.* ${DEP}\(-cu[[:digit:]]\{2\}\)\{0,1\}==/ s/==.*/==${NEXT_SHORT_TAG_PEP440}.*,>=0.0.0a0/g" "${FILE}" | ||
done | ||
done | ||
|
||
for DEP in "${DEPENDENCIES[@]}"; do | ||
sed_runner "/\"${DEP}\(-cu[[:digit:]]\{2\}\)\{0,1\}==/ s/==.*\"/==${NEXT_SHORT_TAG_PEP440}.*,>=0.0.0a0\"/g" ./pyproject.toml | ||
done | ||
|
||
# CI files | ||
for FILE in .github/workflows/*.yaml; do | ||
sed_runner "/shared-workflows/ s/@.*/@branch-${NEXT_SHORT_TAG}/g" "${FILE}" | ||
done | ||
|
||
sed_runner "s/branch-[0-9][0-9].[0-9][0-9]/branch-${NEXT_SHORT_TAG}/" ./docs/nx-cugraph/source/nx_cugraph/nx_cugraph.md | ||
|
||
# issue templates | ||
for FILE in ./.github/ISSUE_TEMPLATE/*.yaml; do | ||
sed_runner "s/example\: ${CURRENT_SHORT_TAG}/example: ${NEXT_SHORT_TAG}/" "${FILE}" | ||
done |
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
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