Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GitHub Actions Workflows. #1076

Merged
merged 52 commits into from
Dec 21, 2022
Merged
Show file tree
Hide file tree
Changes from 24 commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
1224ffd
Add GitHub Actions Workflows.
bdice Dec 7, 2022
7e2924a
More GitHub Actions.
bdice Dec 7, 2022
e1c7f38
Update conda recipes, .coveragerc.
bdice Dec 7, 2022
df2702b
Disable separate workflow for checks.
bdice Dec 7, 2022
804d294
Add UCX_PY_VERSION.
bdice Dec 8, 2022
af7e4ef
Add VERSION_SUFFIX.
bdice Dec 8, 2022
e2f2ca6
Add VERSION_SUFFIX.
bdice Dec 8, 2022
841c6cb
Require ninja for all packages.
bdice Dec 8, 2022
3ba607c
Update CTK package info.
bdice Dec 8, 2022
4d124d6
Add libcublas-dev to libraft-distance.
bdice Dec 8, 2022
9ac1b2a
Change dependencies.
bdice Dec 8, 2022
f7c8365
Adopt a radically minimal set of dependencies.
bdice Dec 8, 2022
96c583b
More radically minimal dependencies.
bdice Dec 8, 2022
8d9dee6
Add curand.
bdice Dec 8, 2022
aa7c583
Merge remote-tracking branch 'upstream/branch-23.02' into gha
bdice Dec 9, 2022
f4004f7
Add cuda-profiler-api.
bdice Dec 9, 2022
43342e5
Merge remote-tracking branch 'upstream/branch-23.02' into gha
bdice Dec 9, 2022
9fc0b26
add `test_cpp` and `test_python` file entries to `dependencies.yaml`
ajschmidt8 Dec 12, 2022
e8393b7
Use ucx_py_version in conda_build_config.yaml.
bdice Dec 12, 2022
e45a133
Remove VERSION_SUFFIX from script_env.
bdice Dec 12, 2022
bb0e341
Update all_cuda-115_arch-x86_64.yaml
bdice Dec 13, 2022
6899d56
Add scipy, scikit-learn to Python test dependencies.
bdice Dec 13, 2022
8032473
Add cupy to Python test dependencies.
bdice Dec 13, 2022
fe21aa4
Pin runtime libraries and not just the "-dev" package. This is needed…
bdice Dec 13, 2022
6597c8a
Remove "set +e".
bdice Dec 13, 2022
9ae9fe4
Add libcurand-dev.
bdice Dec 13, 2022
44d2119
Disable rapids-cmake format file fetching.
bdice Dec 13, 2022
b2fe582
Update recipes.
bdice Dec 13, 2022
d11d983
Merge branch 'branch-23.02' into gha
bdice Dec 13, 2022
f6d69b2
Use .* pinnings on minor versions.
bdice Dec 13, 2022
33e788b
Set lower bound of libcusparse-dev to oldest available version.
bdice Dec 13, 2022
870d046
Use cpu16 nodes for raft C++ builds.
bdice Dec 14, 2022
efd5556
Update ci/build_python.sh
ajschmidt8 Dec 14, 2022
b2369ca
Merge branch 'branch-23.02' into gha
ajschmidt8 Dec 17, 2022
406212d
Add cuda-profiler-api to dependencies.
bdice Dec 18, 2022
43f2271
rm `rapids-*-env` packages
ajschmidt8 Dec 19, 2022
c747915
rm empty `notebook` dependency list
ajschmidt8 Dec 19, 2022
9524b2a
update `cuda-profiler-api` version spec
ajschmidt8 Dec 19, 2022
d263d78
update CODEOWNERS
ajschmidt8 Dec 19, 2022
6e14104
rm fallback value for `CONDA_PY`
ajschmidt8 Dec 19, 2022
92c3b6b
disable Jenkins uploads
ajschmidt8 Dec 19, 2022
bb560e6
replace `-c` w/ `--channel`
ajschmidt8 Dec 19, 2022
1826f61
explicitly include `raft` C++ pkgs in `test_python.sh`
ajschmidt8 Dec 19, 2022
cc3d796
split existing `libcu*` dependencies into `host`/`run` versions
ajschmidt8 Dec 19, 2022
0d72fb1
add `libcu*` packages as `host` dependencies for other `libraft` pack…
ajschmidt8 Dec 19, 2022
1bd8965
update `dependencies.yaml`
ajschmidt8 Dec 19, 2022
db58ca3
reorder `cudatoolkit` list items in `dependencies.yaml`
ajschmidt8 Dec 19, 2022
338636a
regenerate dependency files
ajschmidt8 Dec 19, 2022
f0d9e8d
change `.*` to `=` for consistency
ajschmidt8 Dec 20, 2022
435a6c3
add space between pkg & version specifiers
ajschmidt8 Dec 20, 2022
d102c81
alphabetize `meta.yaml` lists
ajschmidt8 Dec 20, 2022
47ce3a8
Minor updates.
bdice Dec 20, 2022
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
2 changes: 1 addition & 1 deletion .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ CMake:
- '**/CMakeLists.txt'
- '**/cmake/**'

gpuCI:
ci:
- 'ci/**'
57 changes: 57 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: build

on:
push:
branches:
- "branch-*"
tags:
- v[0-9][0-9].[0-9][0-9].[0-9][0-9]
workflow_call:
inputs:
branch:
required: true
type: string
date:
required: true
type: string
sha:
required: true
type: string
build_type:
type: string
default: nightly

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

jobs:
cpp-build:
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/conda-cpp-matrix-build.yaml@main
with:
build_type: ${{ inputs.build_type || 'branch' }}
repo: rapidsai/raft
branch: ${{ inputs.branch }}
date: ${{ inputs.date }}
sha: ${{ inputs.sha }}
python-build:
needs: [cpp-build]
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/conda-python-matrix-build.yaml@main
with:
build_type: ${{ inputs.build_type || 'branch' }}
repo: rapidsai/raft
branch: ${{ inputs.branch }}
date: ${{ inputs.date }}
sha: ${{ inputs.sha }}
upload-conda:
needs: [cpp-build, python-build]
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/conda-upload-packages.yaml@main
with:
build_type: ${{ inputs.build_type || 'branch' }}
repo: rapidsai/raft
branch: ${{ inputs.branch }}
date: ${{ inputs.date }}
sha: ${{ inputs.sha }}
12 changes: 0 additions & 12 deletions .github/workflows/dependency-files.yml

This file was deleted.

48 changes: 48 additions & 0 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: pr

on:
push:
branches:
- "pull-request/[0-9]+"

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

jobs:
pr-builder:
needs:
- checks
- conda-cpp-build
- conda-cpp-tests
- conda-python-build
- conda-python-tests
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/pr-builder.yaml@main
checks:
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/checks.yaml@main
conda-cpp-build:
needs: checks
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/conda-cpp-matrix-build.yaml@main
with:
build_type: pull-request
conda-cpp-tests:
needs: conda-cpp-build
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/conda-cpp-tests.yaml@main
with:
build_type: pull-request
conda-python-build:
needs: conda-cpp-build
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/conda-python-matrix-build.yaml@main
with:
build_type: pull-request
conda-python-tests:
needs: conda-python-build
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/conda-python-tests.yaml@main
with:
build_type: pull-request
34 changes: 34 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: test

on:
workflow_call:
inputs:
branch:
required: true
type: string
date:
required: true
type: string
sha:
required: true
type: string

jobs:
conda-cpp-tests:
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/conda-cpp-tests.yaml@main
with:
build_type: nightly
repo: rapidsai/raft
branch: ${{ inputs.branch }}
date: ${{ inputs.date }}
sha: ${{ inputs.sha }}
conda-python-tests:
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/conda-python-tests.yaml@main
with:
build_type: nightly
repo: rapidsai/raft
branch: ${{ inputs.branch }}
date: ${{ inputs.date }}
sha: ${{ inputs.sha }}
16 changes: 16 additions & 0 deletions ci/build_cpp.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash
# Copyright (c) 2022, NVIDIA CORPORATION.

set -euo pipefail

source rapids-env-update

export CMAKE_GENERATOR=Ninja

rapids-print-env

rapids-logger "Begin cpp build"

rapids-mamba-retry mambabuild conda/recipes/libraft

rapids-upload-conda-to-s3 cpp
30 changes: 30 additions & 0 deletions ci/build_python.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash
# Copyright (c) 2022, NVIDIA CORPORATION.

set -euo pipefail

source rapids-env-update

export CMAKE_GENERATOR=Ninja

rapids-print-env

rapids-logger "Begin py build"

CPP_CHANNEL=$(rapids-download-conda-from-s3 cpp)

# TODO: Remove `--no-test` flag once importing on a CPU
# node works correctly
rapids-mamba-retry mambabuild \
--no-test \
--channel "${CPP_CHANNEL}" \
conda/recipes/pylibraft

# TODO: Remove `--no-test` flag once importing on a CPU
# node works correctly
rapids-mamba-retry mambabuild \
--no-test \
--channel "${CPP_CHANNEL}" \
bdice marked this conversation as resolved.
Show resolved Hide resolved
conda/recipes/raft-dask

rapids-upload-conda-to-s3 python
25 changes: 25 additions & 0 deletions ci/check_style.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash
# Copyright (c) 2020-2022, NVIDIA CORPORATION.

set -euo pipefail

rapids-logger "Create checks conda environment"
. /opt/conda/etc/profile.d/conda.sh

rapids-dependency-file-generator \
--output conda \
--file_key checks \
--matrix "cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch);py=${RAPIDS_PY_VERSION}" | tee env.yaml

rapids-mamba-retry env create --force -f env.yaml -n checks
conda activate checks

set +e

bdice marked this conversation as resolved.
Show resolved Hide resolved
FORMAT_FILE_URL=https://raw.githubusercontent.com/rapidsai/rapids-cmake/branch-23.02/cmake-format-rapids-cmake.json
export RAPIDS_CMAKE_FORMAT_FILE=/tmp/rapids_cmake_ci/cmake-formats-rapids-cmake.json
mkdir -p $(dirname ${RAPIDS_CMAKE_FORMAT_FILE})
wget -O ${RAPIDS_CMAKE_FORMAT_FILE} ${FORMAT_FILE_URL}

# Run pre-commit checks
pre-commit run --hook-stage manual --all-files --show-diff-on-failure
7 changes: 7 additions & 0 deletions ci/cpu/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ fi
export GPUCI_CONDA_RETRY_MAX=1
export GPUCI_CONDA_RETRY_SLEEP=30

# Workaround to keep Jenkins builds working
# until we migrate fully to GitHub Actions
export RAPIDS_CUDA_VERSION="${CUDA}"
export SCCACHE_BUCKET=rapids-sccache
export SCCACHE_REGION=us-west-2
export SCCACHE_IDLE_TIMEOUT=32768

# Use Ninja to build
export CMAKE_GENERATOR="Ninja"
export CONDA_BLD_DIR="${WORKSPACE}/.conda-bld"
Expand Down
7 changes: 7 additions & 0 deletions ci/gpu/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ export PARALLEL_LEVEL=${PARALLEL_LEVEL:-8}
export CUDA_REL=${CUDA_VERSION%.*}
CONDA_ARTIFACT_PATH=${WORKSPACE}/ci/artifacts/raft/cpu/.conda-bld/ # notice there is no `linux-64` here

# Workaround to keep Jenkins builds working
# until we migrate fully to GitHub Actions
export RAPIDS_CUDA_VERSION="${CUDA}"
export SCCACHE_BUCKET=rapids-sccache
export SCCACHE_REGION=us-west-2
export SCCACHE_IDLE_TIMEOUT=32768

# Set home to the job's workspace
export HOME=$WORKSPACE

Expand Down
1 change: 1 addition & 0 deletions ci/release/update-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,4 @@ done

sed_runner "s/export UCX_PY_VERSION=.*/export UCX_PY_VERSION='${NEXT_UCX_PY_VERSION}'/g" ci/gpu/build.sh
sed_runner "s/export UCX_PY_VERSION=.*/export UCX_PY_VERSION='${NEXT_UCX_PY_VERSION}'/g" ci/cpu/build.sh
sed_runner "/^ucx_py_version:$/ {n;s/.*/ - \"${NEXT_UCX_PY_VERSION}\"/}" conda/recipes/raft-dask/conda_build_config.yaml
54 changes: 54 additions & 0 deletions ci/test_cpp.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#!/bin/bash
# Copyright (c) 2022, NVIDIA CORPORATION.

set -euo pipefail

. /opt/conda/etc/profile.d/conda.sh

rapids-logger "Generate C++ testing dependencies"
rapids-dependency-file-generator \
--output conda \
--file_key test_cpp \
--matrix "cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch)" | tee env.yaml

rapids-mamba-retry env create --force -f env.yaml -n test

# Temporarily allow unbound variables for conda activation.
set +u
conda activate test
set -u

CPP_CHANNEL=$(rapids-download-conda-from-s3 cpp)
RAPIDS_TESTS_DIR=${RAPIDS_TESTS_DIR:-"${PWD}/test-results"}/
mkdir -p "${RAPIDS_TESTS_DIR}"
SUITEERROR=0

rapids-print-env

rapids-mamba-retry install \
-c "${CPP_CHANNEL}" \
libraft-headers libraft-distance libraft-nn libraft-tests

rapids-logger "Check GPU usage"
nvidia-smi

set +e

# Run libraft gtests from libraft-tests package
rapids-logger "Run gtests"

# TODO: exit code handling is too verbose. Find a cleaner solution.

for gt in "$CONDA_PREFIX"/bin/gtests/libraft/* ; do
test_name=$(basename ${gt})
echo "Running gtest $test_name"
${gt} --gtest_output=xml:${RAPIDS_TESTS_DIR}

exitcode=$?
if (( ${exitcode} != 0 )); then
SUITEERROR=${exitcode}
echo "FAILED: GTest ${gt}"
fi
done

exit ${SUITEERROR}
Loading