Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: build

on:
push:
# run on every new commit pushed to 'main'
branches:
- main
# run whenever a new tag is created following one of the following patterns
tags:
- v[0-9][0-9].[0-9][0-9].[0-9][0-9]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
cancel-in-progress: true

jobs:
wheel-build:
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-25.06
with:
build_type: branch
script: ci/build_wheel.sh
# only need 1 build: amd64, oldest-supported Python, latest-supported CUDA
matrix_filter: '[map(select(.ARCH == "amd64")) | min_by((.PY_VER | split(".") | map(tonumber)), (.CUDA_VER | split(".") | map(-tonumber)))]'
package-name: rapids-cli
package-type: python
pure-wheel: true
append-cuda-suffix: false
wheel-publish:
needs: wheel-build
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/wheels-publish.yaml@branch-25.06
with:
build_type: branch
package-name: rapids-cli
package-type: python
32 changes: 22 additions & 10 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,25 @@ jobs:
- uses: actions/checkout@v4
- name: Run pre-commit
uses: pre-commit/action@v3.0.1
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install dependencies
run: |
pip install -e .[test]
- name: Run tests
run: pytest
build-wheel:
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-25.06
needs: [checks]
with:
build_type: pull-request
script: ci/build_wheel.sh
# only need 1 build (pure Python): amd64, oldest-supported Python, latest-supported CUDA is fine
matrix_filter: '[map(select(.ARCH == "amd64")) | min_by((.PY_VER | split(".") | map(tonumber)), (.CUDA_VER | split(".") | map(-tonumber)))]'
package-name: rapids-cli
package-type: python
pure-wheel: true
append-cuda-suffix: false
wheel-tests:
needs: [build-wheel]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@branch-25.06
with:
build_type: pull-request
node_type: "gpu-l4-latest-1"
arch: "amd64"
container_image: "rapidsai/citestwheel:latest"
run_script: ci/test_wheel.sh
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
*.bz2
*.conda
.mypy_cache/
.ruff_cache/
*.tar.gz
*.whl
*.zip

# Byte-compiled / optimized / DLL files
__pycache__/
Expand Down
11 changes: 11 additions & 0 deletions ci/build_wheel.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash
# Copyright (c) 2024-2025, NVIDIA CORPORATION.

set -euo pipefail

python -m pip wheel \
-v \
--no-deps \
--disable-pip-version-check \
-w "${RAPIDS_WHEEL_BLD_OUTPUT_DIR}" \
.
10 changes: 10 additions & 0 deletions ci/test_wheel.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

# nx-cugraph is a pure wheel, which is part of generating the download path
WHEELHOUSE=$(RAPIDS_PY_WHEEL_NAME="rapids-cli" RAPIDS_PY_WHEEL_PURE="1" rapids-download-wheels-from-github python)

# echo to expand wildcard before adding `[extra]` requires for pip
rapids-pip-retry install \
"$(echo "${WHEELHOUSE}"/rapids_cli*.whl)[test]"

python -m pytest
7 changes: 5 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
[build-system]
requires = ["setuptools", "wheel"]
requires = [
"setuptools>=64.0.0",
"wheel",
]
build-backend = "setuptools.build_meta"

[project]
name = "rapids_cli"
name = "rapids-cli"
version = "0.1"
description = "A CLI for RAPIDS"
requires-python = ">=3.10"
Expand Down