Skip to content

Commit 46070bb

Browse files
authored
Add scripts to manage RAPIDS versions and various small updates (#26)
A few small updates: - Update pre-commit hooks and add shellcheck - Add script to update RAPIDS version (and update to 25.04) - Remove typos - Remove versioning TODO.
1 parent 1a0851e commit 46070bb

7 files changed

Lines changed: 51 additions & 16 deletions

File tree

.github/workflows/build.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ concurrency:
2727

2828
jobs:
2929
conda-cpp-build:
30-
uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-build.yaml@branch-25.02
30+
uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-build.yaml@branch-25.04
3131
with:
3232
build_type: ${{ inputs.build_type || 'branch' }}
3333
branch: ${{ inputs.branch }}
@@ -38,14 +38,14 @@ jobs:
3838
upload-conda:
3939
needs: conda-cpp-build
4040
secrets: inherit
41-
uses: rapidsai/shared-workflows/.github/workflows/conda-upload-packages.yaml@branch-25.02
41+
uses: rapidsai/shared-workflows/.github/workflows/conda-upload-packages.yaml@branch-25.04
4242
with:
4343
build_type: ${{ inputs.build_type || 'branch' }}
4444
branch: ${{ inputs.branch }}
4545
date: ${{ inputs.date }}
4646
sha: ${{ inputs.sha }}
4747
wheel-cpp-build:
48-
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-25.02
48+
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-25.04
4949
with:
5050
build_type: ${{ inputs.build_type || 'branch' }}
5151
branch: ${{ inputs.branch }}
@@ -56,7 +56,7 @@ jobs:
5656
wheel-publish-cpp:
5757
needs: wheel-cpp-build
5858
secrets: inherit
59-
uses: rapidsai/shared-workflows/.github/workflows/wheels-publish.yaml@branch-25.02
59+
uses: rapidsai/shared-workflows/.github/workflows/wheels-publish.yaml@branch-25.04
6060
with:
6161
build_type: ${{ inputs.build_type || 'branch' }}
6262
branch: ${{ inputs.branch }}
@@ -66,7 +66,7 @@ jobs:
6666
package-type: cpp
6767
static-build:
6868
secrets: inherit
69-
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@branch-25.02
69+
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@branch-25.04
7070
with:
7171
build_type: ${{ inputs.build_type || 'branch' }}
7272
branch: ${{ inputs.branch }}

.github/workflows/pr.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,22 +27,22 @@ jobs:
2727
run: ci/check_style.sh
2828
conda-cpp-build:
2929
needs: style
30-
uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-build.yaml@branch-25.02
30+
uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-build.yaml@branch-25.04
3131
with:
3232
build_type: pull-request
3333
matrix_filter: group_by(.ARCH) | map(max_by([(.PY_VER|split(".")|map(tonumber)), (.CUDA_VER|split(".")|map(tonumber))]))
3434
script: ci/build_conda.sh
3535
wheel-cpp-build:
3636
needs: style
37-
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-25.02
37+
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-25.04
3838
with:
3939
build_type: pull-request
4040
matrix_filter: group_by(.ARCH) | map(max_by([(.PY_VER|split(".")|map(tonumber)), (.CUDA_VER|split(".")|map(tonumber))]))
4141
script: ci/build_wheel.sh
4242
static-build:
4343
needs: style
4444
secrets: inherit
45-
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@branch-25.02
45+
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@branch-25.04
4646
with:
4747
build_type: pull-request
4848
container_image: "rapidsai/ci-wheel:latest"

.pre-commit-config.yaml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ repos:
1313
types: [cmake]
1414
- id: check-yaml
1515
- repo: https://github.com/sirosen/texthooks
16-
rev: 0.6.7
16+
rev: 0.6.8
1717
hooks:
1818
- id: fix-smartquotes
1919
- repo: https://github.com/pre-commit/mirrors-clang-format
@@ -55,13 +55,19 @@ repos:
5555
^cmake/spdlog_override.cmake
5656
)
5757
- repo: https://github.com/codespell-project/codespell
58-
rev: v2.3.0
58+
rev: v2.4.1
5959
hooks:
6060
- id: codespell
6161
additional_dependencies: [tomli]
6262
args: ["--toml", "pyproject.toml"]
6363
- repo: https://github.com/rapidsai/dependency-file-generator
64-
rev: v1.16.0
64+
rev: v1.17.1
6565
hooks:
6666
- id: rapids-dependency-file-generator
6767
args: ["--clean"]
68+
- repo: https://github.com/shellcheck-py/shellcheck-py
69+
rev: v0.10.0.1
70+
hooks:
71+
- id: shellcheck
72+
args: ["--severity=warning"]
73+
files: ^ci/

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ if(RAPIDS_LOGGER_HIDE_ALL_SPDLOG_SYMBOLS)
7777
# rapids_cpm_spdlog right now because it explicitly passes in a value to the rapids_cpm_find call
7878
# that will override the same version of the argument passed here (or at least, it's
7979
# order-dependent which is selected so we're at the mercy of the rapids-cmake implementation). We
80-
# should generalize the rapids_cpm_* functions to support this natively.aasdfsd
80+
# should generalize the rapids_cpm_* functions to support this natively.
8181
include(${rapids-cmake-dir}/cpm/package_override.cmake)
8282
rapids_cpm_package_override(${CMAKE_CURRENT_LIST_DIR}/cmake/spdlog_override.cmake)
8383
rapids_cpm_spdlog(

ci/check_style.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,10 @@ rapids-dependency-file-generator \
1616
rapids-mamba-retry env create --yes -f "${ENV_YAML_DIR}/env.yaml" -n checks
1717
conda activate checks
1818

19-
# TODO: Figure out the best way to set this version value long-term
20-
RAPIDS_VERSION_MAJOR_MINOR="25.02"
19+
RAPIDS_VERSION_MAJOR_MINOR="25.04"
2120
FORMAT_FILE_URL="https://raw.githubusercontent.com/rapidsai/rapids-cmake/branch-${RAPIDS_VERSION_MAJOR_MINOR}/cmake-format-rapids-cmake.json"
2221
export RAPIDS_CMAKE_FORMAT_FILE=/tmp/rapids_cmake_ci/cmake-formats-rapids-cmake.json
23-
mkdir -p $(dirname ${RAPIDS_CMAKE_FORMAT_FILE})
22+
mkdir -p "$(dirname ${RAPIDS_CMAKE_FORMAT_FILE})"
2423
wget -O ${RAPIDS_CMAKE_FORMAT_FILE} ${FORMAT_FILE_URL}
2524

2625
# Run pre-commit checks

ci/release/update-version.sh

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/bin/bash
2+
# Copyright (c) 2025, NVIDIA CORPORATION.
3+
########################################
4+
# rapids-logger RAPIDS Version Updater #
5+
########################################
6+
7+
## Usage
8+
# bash update-version.sh <new_version>
9+
10+
# Format is YY.MM.PP - no leading 'v' or trailing 'a'
11+
NEXT_FULL_TAG=$1
12+
13+
# Get <major>.<minor> for next version
14+
NEXT_MAJOR=$(echo "$NEXT_FULL_TAG" | awk '{split($0, a, "."); print a[1]}')
15+
NEXT_MINOR=$(echo "$NEXT_FULL_TAG" | awk '{split($0, a, "."); print a[2]}')
16+
NEXT_SHORT_TAG=${NEXT_MAJOR}.${NEXT_MINOR}
17+
18+
echo "Updating RAPIDS versions to $NEXT_FULL_TAG"
19+
20+
# Inplace sed replace; workaround for Linux and Mac
21+
function sed_runner() {
22+
sed -i.bak ''"$1"'' "$2" && rm -f "${2}".bak
23+
}
24+
25+
# CI files
26+
for FILE in .github/workflows/*.yaml; do
27+
sed_runner "/shared-workflows/ s/@.*/@branch-${NEXT_SHORT_TAG}/g" "${FILE}"
28+
done
29+
sed_runner "/^RAPIDS_VERSION_MAJOR_MINOR=/ s/=.*/=\"${NEXT_SHORT_TAG}\"/" ci/check_style.sh
30+
sed_runner "s/set(_rapids_version [0-9\.]*)/set\(_rapids_version ${NEXT_FULL_TAG}\)/" rapids_config.cmake

rapids_config.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# packages of it since we only ever need it cloned by CPM during the builds of other packages. On
1717
# the other hand we still need a way to get a suitable rapids-cmake version. Either that, or we need
1818
# to avoid using rapids-cmake.
19-
set(_rapids_version 25.02.00)
19+
set(_rapids_version 25.04.00)
2020
if(_rapids_version MATCHES [[^([0-9][0-9])\.([0-9][0-9])\.([0-9][0-9])]])
2121
set(RAPIDS_VERSION_MAJOR "${CMAKE_MATCH_1}")
2222
set(RAPIDS_VERSION_MINOR "${CMAKE_MATCH_2}")

0 commit comments

Comments
 (0)