Skip to content
51 changes: 51 additions & 0 deletions .github/workflows/conda-cpp-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,35 @@ on:
When this is non-empty, that secret's value is used in place of the default repo-level token
anywhere that environment variable GH_TOKEN is set. This is especially useful for downloading
artifacts from other private repos, which repo tokens do not have access to.
cache-paths:
type: string
required: false
default: ""
description: |
Newline-separated workspace-relative files or directories to persist with actions/cache.
Workspace-relative paths are required for cache saves from job containers. Must be provided
together with cache-key-prefix.
cache-key-prefix:
type: string
required: false
default: ""
description: |
Prefix for the actions/cache key for cache-paths. The workflow appends its matrix identity
so caches are not shared across incompatible runners or environments.
cache-key-files:
type: string
required: false
default: ""
description: |
Newline-separated files or glob patterns to hash into the cache key. Use this for caches
that must be saved again when relevant source or dependency files change.
cache-environment:
type: string
required: false
default: ""
description: |
Newline-separated literal NAME=VALUE pairs exported before the caller script runs.
Use workspace-relative paths for directories managed by cache-paths.

defaults:
run:
Expand Down Expand Up @@ -122,6 +151,28 @@ jobs:
ref: ${{ inputs.sha }}
fetch-depth: 0
persist-credentials: true
- name: Validate caller cache configuration
if: inputs.cache-paths != '' || inputs.cache-key-prefix != '' || inputs.cache-key-files != '' || inputs.cache-environment != ''
run: |
if test -z "${INPUTS_CACHE_PATHS}" || test -z "${INPUTS_CACHE_KEY_PREFIX}"; then
echo "ERROR: cache-paths and cache-key-prefix must be provided together."
exit 1
fi
env:
INPUTS_CACHE_PATHS: ${{ inputs.cache-paths }}
INPUTS_CACHE_KEY_PREFIX: ${{ inputs.cache-key-prefix }}
- name: Cache caller paths
if: inputs.cache-paths != ''
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ${{ inputs.cache-paths }}
key: ${{ inputs.cache-key-prefix }}-${{ matrix.CUDA_VER }}-${{ matrix.PY_VER }}-${{ matrix.ARCH }}-${{ matrix.LINUX_VER }}-${{ hashFiles(inputs.cache-key-files) }}
restore-keys: ${{ inputs.cache-key-prefix }}-${{ matrix.CUDA_VER }}-${{ matrix.PY_VER }}-${{ matrix.ARCH }}-${{ matrix.LINUX_VER }}-
- name: Configure caller cache environment
if: inputs.cache-environment != ''
run: printf '%s\n' "$INPUTS_CACHE_ENVIRONMENT" >> "$GITHUB_ENV"
env:
INPUTS_CACHE_ENVIRONMENT: ${{ inputs.cache-environment }}
- name: Standardize repository information
env:
RAPIDS_REPOSITORY: ${{ inputs.repo || github.repository }}
Expand Down
52 changes: 52 additions & 0 deletions .github/workflows/conda-cpp-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,35 @@ on:
When this is non-empty, that secret's value is used in place of the default repo-level token
anywhere that environment variable GH_TOKEN is set. This is especially useful for downloading
artifacts from other private repos, which repo tokens do not have access to.
cache-paths:
type: string
required: false
default: ""
description: |
Newline-separated workspace-relative files or directories to persist with actions/cache.
Workspace-relative paths are required for cache saves from job containers. Must be provided
together with cache-key-prefix.
cache-key-prefix:
type: string
required: false
default: ""
description: |
Prefix for the actions/cache key for cache-paths. The workflow appends its matrix
identity so caches are not shared across incompatible runners or environments.
cache-key-files:
type: string
required: false
default: ""
description: |
Newline-separated files or glob patterns to hash into the cache key. Use this for caches
that must be saved again when relevant source or dependency files change.
cache-environment:
type: string
required: false
default: ""
description: |
Newline-separated literal NAME=VALUE pairs exported before the caller script runs.
Use workspace-relative paths for directories managed by cache-paths.
secrets:
script-env-secret-1-key:
description: |
Expand Down Expand Up @@ -164,6 +193,29 @@ jobs:
ref: ${{ inputs.sha }}
fetch-depth: 0
persist-credentials: true
- name: Validate caller cache configuration
if: inputs.cache-paths != '' || inputs.cache-key-prefix != '' || inputs.cache-key-files != '' || inputs.cache-environment != ''
run: |
if test -z "${INPUTS_CACHE_PATHS}" || test -z "${INPUTS_CACHE_KEY_PREFIX}"; then
echo "ERROR: cache-paths and cache-key-prefix must be provided together."
exit 1
fi
env:
INPUTS_CACHE_PATHS: ${{ inputs.cache-paths }}
INPUTS_CACHE_KEY_PREFIX: ${{ inputs.cache-key-prefix }}
- name: Cache caller paths
if: inputs.cache-paths != ''
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ${{ inputs.cache-paths }}
key: ${{ inputs.cache-key-prefix }}-${{ matrix.CUDA_VER }}-${{ matrix.PY_VER }}-${{ matrix.ARCH }}-${{ matrix.LINUX_VER }}-${{ matrix.GPU }}-${{ matrix.DRIVER }}-${{ matrix.DEPENDENCIES }}-${{ hashFiles(inputs.cache-key-files) }}
restore-keys: |
${{ inputs.cache-key-prefix }}-${{ matrix.CUDA_VER }}-${{ matrix.PY_VER }}-${{ matrix.ARCH }}-${{ matrix.LINUX_VER }}-${{ matrix.GPU }}-${{ matrix.DRIVER }}-${{ matrix.DEPENDENCIES }}-
- name: Configure caller cache environment
if: inputs.cache-environment != ''
run: printf '%s\n' "$INPUTS_CACHE_ENVIRONMENT" >> "$GITHUB_ENV"
env:
INPUTS_CACHE_ENVIRONMENT: ${{ inputs.cache-environment }}
# This has to be AFTER the checkout step. It creates a telemetry-artifacts directory,
# and the checkout step would destroy it.
- name: Telemetry setup
Expand Down
51 changes: 51 additions & 0 deletions .github/workflows/conda-python-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,35 @@ on:
or CUDA version. 'cuda_major' if the package is not dependent on
operating system, Python minor version, or CPU architecture, but is
dependent on CUDA major version."
cache-paths:
type: string
required: false
default: ""
description: |
Newline-separated workspace-relative files or directories to persist with actions/cache.
Workspace-relative paths are required for cache saves from job containers. Must be provided
together with cache-key-prefix.
cache-key-prefix:
type: string
required: false
default: ""
description: |
Prefix for the actions/cache key for cache-paths. The workflow appends its matrix identity
so caches are not shared across incompatible runners or environments.
cache-key-files:
type: string
required: false
default: ""
description: |
Newline-separated files or glob patterns to hash into the cache key. Use this for caches
that must be saved again when relevant source or dependency files change.
cache-environment:
type: string
required: false
default: ""
description: |
Newline-separated literal NAME=VALUE pairs exported before the caller script runs.
Use workspace-relative paths for directories managed by cache-paths.

defaults:
run:
Expand Down Expand Up @@ -132,6 +161,28 @@ jobs:
ref: ${{ inputs.sha }}
fetch-depth: 0
persist-credentials: true
- name: Validate caller cache configuration
if: inputs.cache-paths != '' || inputs.cache-key-prefix != '' || inputs.cache-key-files != '' || inputs.cache-environment != ''
run: |
if test -z "${INPUTS_CACHE_PATHS}" || test -z "${INPUTS_CACHE_KEY_PREFIX}"; then
echo "ERROR: cache-paths and cache-key-prefix must be provided together."
exit 1
fi
env:
INPUTS_CACHE_PATHS: ${{ inputs.cache-paths }}
INPUTS_CACHE_KEY_PREFIX: ${{ inputs.cache-key-prefix }}
- name: Cache caller paths
if: inputs.cache-paths != ''
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ${{ inputs.cache-paths }}
key: ${{ inputs.cache-key-prefix }}-${{ matrix.CUDA_VER }}-${{ matrix.PY_VER }}-${{ matrix.ARCH }}-${{ matrix.LINUX_VER }}-${{ hashFiles(inputs.cache-key-files) }}
restore-keys: ${{ inputs.cache-key-prefix }}-${{ matrix.CUDA_VER }}-${{ matrix.PY_VER }}-${{ matrix.ARCH }}-${{ matrix.LINUX_VER }}-
- name: Configure caller cache environment
if: inputs.cache-environment != ''
run: printf '%s\n' "$INPUTS_CACHE_ENVIRONMENT" >> "$GITHUB_ENV"
env:
INPUTS_CACHE_ENVIRONMENT: ${{ inputs.cache-environment }}
- name: Standardize repository information
env:
RAPIDS_REPOSITORY: ${{ inputs.repo || github.repository }}
Expand Down
53 changes: 53 additions & 0 deletions .github/workflows/conda-python-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,35 @@ on:
When this is non-empty, that secret's value is used in place of the default repo-level token
anywhere that environment variable GH_TOKEN is set. This is especially useful for downloading
artifacts from other private repos, which repo tokens do not have access to.
cache-paths:
type: string
required: false
default: ""
description: |
Newline-separated workspace-relative files or directories to persist with actions/cache.
Workspace-relative paths are required for cache saves from job containers. Must be provided
together with cache-key-prefix.
cache-key-prefix:
type: string
required: false
default: ""
description: |
Prefix for the actions/cache key for cache-paths. The workflow appends its matrix identity
so caches are not shared across incompatible runners or environments.
cache-key-files:
type: string
required: false
default: ""
description: |
Newline-separated files or glob patterns to hash into the cache key. Use this for caches
that must be saved again when relevant source or dependency files change.
cache-environment:
type: string
required: false
default: ""
description: |
Newline-separated literal NAME=VALUE pairs exported before the caller script runs. Use
workspace-relative paths for directories managed by cache-paths.
secrets:
script-env-secret-1-key:
description: |
Expand Down Expand Up @@ -179,6 +208,30 @@ jobs:
fetch-depth: 0
persist-credentials: true

- name: Validate caller cache configuration
if: inputs.cache-paths != '' || inputs.cache-key-prefix != '' || inputs.cache-key-files != '' || inputs.cache-environment != ''
run: |
if test -z "${INPUTS_CACHE_PATHS}" || test -z "${INPUTS_CACHE_KEY_PREFIX}"; then
echo "ERROR: cache-paths and cache-key-prefix must be provided together."
exit 1
fi
env:
INPUTS_CACHE_PATHS: ${{ inputs.cache-paths }}
INPUTS_CACHE_KEY_PREFIX: ${{ inputs.cache-key-prefix }}
- name: Cache caller paths
if: inputs.cache-paths != ''
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ${{ inputs.cache-paths }}
key: ${{ inputs.cache-key-prefix }}-${{ matrix.CUDA_VER }}-${{ matrix.PY_VER }}-${{ matrix.ARCH }}-${{ matrix.LINUX_VER }}-${{ matrix.GPU }}-${{ matrix.DRIVER }}-${{ matrix.DEPENDENCIES }}-${{ hashFiles(inputs.cache-key-files) }}
restore-keys: |
${{ inputs.cache-key-prefix }}-${{ matrix.CUDA_VER }}-${{ matrix.PY_VER }}-${{ matrix.ARCH }}-${{ matrix.LINUX_VER }}-${{ matrix.GPU }}-${{ matrix.DRIVER }}-${{ matrix.DEPENDENCIES }}-
- name: Configure caller cache environment
if: inputs.cache-environment != ''
run: printf '%s\n' "$INPUTS_CACHE_ENVIRONMENT" >> "$GITHUB_ENV"
env:
INPUTS_CACHE_ENVIRONMENT: ${{ inputs.cache-environment }}

- name: Standardize repository information
uses: rapidsai/shared-actions/rapids-github-info@main
with:
Expand Down
52 changes: 52 additions & 0 deletions .github/workflows/wheels-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,35 @@ on:
When this is non-empty, that secret's value is used in place of the default repo-level token
anywhere that environment variable GH_TOKEN is set. This is especially useful for downloading
artifacts from other private repos, which repo tokens do not have access to.
cache-paths:
type: string
required: false
default: ""
description: |
Newline-separated workspace-relative files or directories to persist with actions/cache.
Workspace-relative paths are required for cache saves from job containers. Must be provided
together with cache-key-prefix.
cache-key-prefix:
type: string
required: false
default: ""
description: |
Prefix for the actions/cache key for cache-paths. The workflow appends its matrix identity
so caches are not shared across incompatible runners or environments.
cache-key-files:
type: string
required: false
default: ""
description: |
Newline-separated files or glob patterns to hash into the cache key. Use this for caches
that must be saved again when relevant source or dependency files change.
cache-environment:
type: string
required: false
default: ""
description: |
Newline-separated literal NAME=VALUE pairs exported before the caller script runs.
Use workspace-relative paths for directories managed by cache-paths.

defaults:
run:
Expand Down Expand Up @@ -165,6 +194,29 @@ jobs:
fetch-depth: 0
persist-credentials: false

- name: Validate caller cache configuration
if: inputs.cache-paths != '' || inputs.cache-key-prefix != '' || inputs.cache-key-files != '' || inputs.cache-environment != ''
run: |
if test -z "${INPUTS_CACHE_PATHS}" || test -z "${INPUTS_CACHE_KEY_PREFIX}"; then
echo "ERROR: cache-paths and cache-key-prefix must be provided together."
exit 1
fi
env:
INPUTS_CACHE_PATHS: ${{ inputs.cache-paths }}
INPUTS_CACHE_KEY_PREFIX: ${{ inputs.cache-key-prefix }}
- name: Cache caller paths
if: inputs.cache-paths != ''
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ${{ inputs.cache-paths }}
key: ${{ inputs.cache-key-prefix }}-${{ matrix.CUDA_VER }}-${{ matrix.PY_VER }}-${{ matrix.ARCH }}-${{ matrix.LINUX_VER }}-${{ hashFiles(inputs.cache-key-files) }}
restore-keys: ${{ inputs.cache-key-prefix }}-${{ matrix.CUDA_VER }}-${{ matrix.PY_VER }}-${{ matrix.ARCH }}-${{ matrix.LINUX_VER }}-
- name: Configure caller cache environment
if: inputs.cache-environment != ''
run: printf '%s\n' "$INPUTS_CACHE_ENVIRONMENT" >> "$GITHUB_ENV"
env:
INPUTS_CACHE_ENVIRONMENT: ${{ inputs.cache-environment }}

- name: Standardize repository information
uses: rapidsai/shared-actions/rapids-github-info@main
with:
Expand Down
53 changes: 53 additions & 0 deletions .github/workflows/wheels-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,35 @@ on:
type: boolean
required: false
default: false
cache-paths:
type: string
required: false
default: ""
description: |
Newline-separated workspace-relative files or directories to persist with actions/cache.
Workspace-relative paths are required for cache saves from job containers. Must be provided
together with cache-key-prefix.
cache-key-prefix:
type: string
required: false
default: ""
description: |
Prefix for the actions/cache key for cache-paths. The workflow appends its matrix identity
so caches are not shared across incompatible runners or environments.
cache-key-files:
type: string
required: false
default: ""
description: |
Newline-separated files or glob patterns to hash into the cache key. Use this for caches
that must be saved again when relevant source or dependency files change.
cache-environment:
type: string
required: false
default: ""
description: |
Newline-separated literal NAME=VALUE pairs exported before the caller script runs. Use
workspace-relative paths for directories managed by cache-paths.
secrets:
script-env-secret-1-key:
description: |
Expand Down Expand Up @@ -187,6 +216,30 @@ jobs:
fetch-depth: 0
persist-credentials: false

- name: Validate caller cache configuration
if: inputs.cache-paths != '' || inputs.cache-key-prefix != '' || inputs.cache-key-files != '' || inputs.cache-environment != ''
run: |
if test -z "${INPUTS_CACHE_PATHS}" || test -z "${INPUTS_CACHE_KEY_PREFIX}"; then
echo "ERROR: cache-paths and cache-key-prefix must be provided together."
exit 1
fi
env:
INPUTS_CACHE_PATHS: ${{ inputs.cache-paths }}
INPUTS_CACHE_KEY_PREFIX: ${{ inputs.cache-key-prefix }}
- name: Cache caller paths
if: inputs.cache-paths != ''
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ${{ inputs.cache-paths }}
key: ${{ inputs.cache-key-prefix }}-${{ matrix.CUDA_VER }}-${{ matrix.PY_VER }}-${{ matrix.ARCH }}-${{ matrix.LINUX_VER }}-${{ matrix.GPU }}-${{ matrix.DRIVER }}-${{ matrix.DEPENDENCIES }}-${{ hashFiles(inputs.cache-key-files) }}
restore-keys: |
${{ inputs.cache-key-prefix }}-${{ matrix.CUDA_VER }}-${{ matrix.PY_VER }}-${{ matrix.ARCH }}-${{ matrix.LINUX_VER }}-${{ matrix.GPU }}-${{ matrix.DRIVER }}-${{ matrix.DEPENDENCIES }}-
- name: Configure caller cache environment
if: inputs.cache-environment != ''
run: printf '%s\n' "$INPUTS_CACHE_ENVIRONMENT" >> "$GITHUB_ENV"
env:
INPUTS_CACHE_ENVIRONMENT: ${{ inputs.cache-environment }}

- name: Telemetry setup
uses: rapidsai/shared-actions/telemetry-dispatch-setup@main
continue-on-error: true
Expand Down