diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index e6b6058..eea760f 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -3,7 +3,7 @@ name: pr on: push: branches: - - "main" + - "pull-request/[0-9]+" concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -12,9 +12,16 @@ concurrency: jobs: pr-builder: needs: + - checks + - conda-python-build - wheel-build secrets: inherit uses: rapidsai/shared-workflows/.github/workflows/pr-builder.yaml@branch-24.04 + checks: + secrets: inherit + uses: rapidsai/shared-workflows/.github/workflows/checks.yaml@branch-24.04 + with: + enable_check_generated_files: false conda-python-build: secrets: inherit uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@branch-24.04 diff --git a/ci/check_style.sh b/ci/check_style.sh new file mode 100755 index 0000000..a9f4b49 --- /dev/null +++ b/ci/check_style.sh @@ -0,0 +1,20 @@ +#!/bin/bash +# Copyright (c) 2024, NVIDIA CORPORATION. + +set -euo pipefail + +rapids-logger "Create checks conda environment" +. /opt/conda/etc/profile.d/conda.sh + +ENV_YAML_DIR="$(mktemp -d)" + +rapids-dependency-file-generator \ + --output conda \ + --file_key checks \ + --matrix "cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch);py=${RAPIDS_PY_VERSION}" | tee "${ENV_YAML_DIR}/env.yaml" + +rapids-mamba-retry env create --force -f "${ENV_YAML_DIR}/env.yaml" -n checks +conda activate checks + +# Run pre-commit checks +pre-commit run --all-files --show-diff-on-failure diff --git a/dependencies.yaml b/dependencies.yaml new file mode 100644 index 0000000..ffddfbb --- /dev/null +++ b/dependencies.yaml @@ -0,0 +1,40 @@ +# Dependency list for https://github.com/rapidsai/dependency-file-generator +files: + all: + output: none + includes: + - checks + checks: + output: none + includes: + - checks + - py_version +channels: + - rapidsai + - rapidsai-nightly + - conda-forge +dependencies: + checks: + common: + - output_types: [conda, requirements] + packages: + - pre-commit + py_version: + specific: + - output_types: conda + matrices: + - matrix: + py: "3.9" + packages: + - python=3.9 + - matrix: + py: "3.10" + packages: + - python=3.10 + - matrix: + py: "3.11" + packages: + - python=3.11 + - matrix: + packages: + - python>=3.9,<3.12