Skip to content

Commit b169209

Browse files
authored
use 'rapids-init-pip' in wheel CI, other CI changes (#5089)
Proposes a batch of small, mostly-unrelated changes to building and packaging. These are all part of RAPIDS-wide efforts to make it easier to reproduce CI locally and to use artifacts from one project's CI in another project's CI. Contributes to rapidsai/build-planning#178 * prevents triggering expensive CI jobs based on PRs modifying `ci/release/update-version.sh` Contributes to rapidsai/shared-workflows#356 * explicitly provides an input for `script` to workflows using it, instead of relying on a default value coming from the workflow file Contributes to rapidsai/shared-workflows#337 * switches from input `run_script` to `script` in uses of the `custom-job` workflow Contributes to rapidsai/build-planning#179 * adds a call to `rapids-init-pip` near the beginning of all CI scripts that use `pip` * removes redefinitions of `PIP_CONSTRAINT` in scripts, in favor of using the one set up by `rapids-pip-init` Contributes to rapidsai/gha-tools#145 * confirmed that `rapids-configure-conda-channels` is not used in any builds scripts using `rattler-build` Authors: - James Lamb (https://github.com/jameslamb) Approvers: - Bradley Dice (https://github.com/bdice) URL: #5089
1 parent d660a6d commit b169209

File tree

9 files changed

+33
-14
lines changed

9 files changed

+33
-14
lines changed

.github/workflows/build.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ jobs:
3333
build_type: ${{ inputs.build_type || 'branch' }}
3434
branch: ${{ inputs.branch }}
3535
date: ${{ inputs.date }}
36+
script: ci/build_cpp.sh
3637
sha: ${{ inputs.sha }}
3738
node_type: cpu32
3839
python-build:
@@ -43,6 +44,7 @@ jobs:
4344
build_type: ${{ inputs.build_type || 'branch' }}
4445
branch: ${{ inputs.branch }}
4546
date: ${{ inputs.date }}
47+
script: ci/build_python.sh
4648
sha: ${{ inputs.sha }}
4749
upload-conda:
4850
needs: [cpp-build, python-build]
@@ -65,7 +67,7 @@ jobs:
6567
container_image: "rapidsai/ci-conda:cuda11.8.0-ubuntu22.04-py3.10"
6668
date: ${{ inputs.date }}
6769
node_type: "gpu-l4-latest-1"
68-
run_script: "ci/build_docs.sh"
70+
script: "ci/build_docs.sh"
6971
sha: ${{ inputs.sha }}
7072
wheel-build-libcugraph:
7173
secrets: inherit

.github/workflows/pr.yaml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ jobs:
6767
- '!.devcontainer/**'
6868
- '!CONTRIBUTING.md'
6969
- '!README.md'
70+
- '!ci/release/update-version.sh'
7071
- '!docs/**'
7172
- '!img/**'
7273
- '!mg_utils/**'
@@ -78,12 +79,14 @@ jobs:
7879
- '!.devcontainer/**'
7980
- '!CONTRIBUTING.md'
8081
- '!README.md'
82+
- '!ci/release/update-version.sh'
8183
- '!docs/**'
8284
test_python:
8385
- '**'
8486
- '!.devcontainer/**'
8587
- '!CONTRIBUTING.md'
8688
- '!README.md'
89+
- '!ci/release/update-version.sh'
8790
- '!docs/**'
8891
- '!img/**'
8992
- '!notebooks/**'
@@ -101,13 +104,15 @@ jobs:
101104
with:
102105
build_type: pull-request
103106
node_type: cpu32
107+
script: ci/build_cpp.sh
104108
conda-cpp-tests:
105109
needs: [conda-cpp-build, changed-files]
106110
secrets: inherit
107111
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
108112
if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_cpp
109113
with:
110114
build_type: pull-request
115+
script: ci/test_cpp.sh
111116
conda-cpp-checks:
112117
needs: conda-cpp-build
113118
secrets: inherit
@@ -122,13 +127,15 @@ jobs:
122127
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
123128
with:
124129
build_type: pull-request
130+
script: ci/build_python.sh
125131
conda-python-tests:
126132
needs: [conda-python-build, changed-files]
127133
secrets: inherit
128134
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
129135
if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_python
130136
with:
131137
build_type: pull-request
138+
script: ci/test_python.sh
132139
conda-notebook-tests:
133140
needs: [conda-python-build, changed-files]
134141
secrets: inherit
@@ -139,7 +146,7 @@ jobs:
139146
node_type: "gpu-l4-latest-1"
140147
arch: "amd64"
141148
container_image: "rapidsai/ci-conda:cuda11.8.0-ubuntu22.04-py3.10"
142-
run_script: "ci/test_notebooks.sh"
149+
script: "ci/test_notebooks.sh"
143150
docs-build:
144151
needs: conda-python-build
145152
secrets: inherit
@@ -149,7 +156,7 @@ jobs:
149156
node_type: "gpu-l4-latest-1"
150157
arch: "amd64"
151158
container_image: "rapidsai/ci-conda:cuda11.8.0-ubuntu22.04-py3.10"
152-
run_script: "ci/build_docs.sh"
159+
script: "ci/build_docs.sh"
153160
wheel-build-libcugraph:
154161
needs: checks
155162
secrets: inherit

.github/workflows/test.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ jobs:
3434
build_type: ${{ inputs.build_type }}
3535
branch: ${{ inputs.branch }}
3636
date: ${{ inputs.date }}
37+
script: ci/test_cpp.sh
3738
sha: ${{ inputs.sha }}
3839
conda-python-tests:
3940
secrets: inherit
@@ -42,6 +43,7 @@ jobs:
4243
build_type: ${{ inputs.build_type }}
4344
branch: ${{ inputs.branch }}
4445
date: ${{ inputs.date }}
46+
script: ci/test_python.sh
4547
sha: ${{ inputs.sha }}
4648
wheel-tests-pylibcugraph:
4749
secrets: inherit

ci/build_wheel.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ package_type=$3
99

1010
source rapids-configure-sccache
1111
source rapids-date-string
12+
source rapids-init-pip
1213

1314
RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen "${RAPIDS_CUDA_VERSION}")"
1415

ci/build_wheel_cugraph.sh

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,24 @@
33

44
set -euo pipefail
55

6+
source rapids-init-pip
7+
68
package_dir="python/cugraph"
79

810
RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen "${RAPIDS_CUDA_VERSION}")"
911

1012
# Download the libcugraph and pylibcugraph wheels built in the previous step and make them
1113
# available for pip to find.
14+
#
15+
# Using env variable PIP_CONSTRAINT (initialized by 'rapids-init-pip') is necessary to ensure the constraints
16+
# are used when creating the isolated build environment.
1217
LIBCUGRAPH_WHEELHOUSE=$(RAPIDS_PY_WHEEL_NAME="libcugraph_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-github cpp)
1318
PYLIBCUGRAPH_WHEELHOUSE=$(RAPIDS_PY_WHEEL_NAME="pylibcugraph_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-github python)
1419

15-
cat >> ./constraints.txt <<EOF
20+
cat >> "${PIP_CONSTRAINT}" <<EOF
1621
libcugraph-${RAPIDS_PY_CUDA_SUFFIX} @ file://$(echo "${LIBCUGRAPH_WHEELHOUSE}"/libcugraph_*.whl)
1722
pylibcugraph-${RAPIDS_PY_CUDA_SUFFIX} @ file://$(echo "${PYLIBCUGRAPH_WHEELHOUSE}"/pylibcugraph_*.whl)
1823
EOF
1924

20-
# Using env variable PIP_CONSTRAINT is necessary to ensure the constraints
21-
# are used when creating the isolated build environment.
22-
export PIP_CONSTRAINT="${PWD}/constraints.txt"
23-
2425
./ci/build_wheel.sh cugraph ${package_dir} python
2526
./ci/validate_wheel.sh ${package_dir} "${RAPIDS_WHEEL_BLD_OUTPUT_DIR}"

ci/build_wheel_libcugraph.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
set -euo pipefail
55

6+
source rapids-init-pip
7+
68
package_name="libcugraph"
79
package_dir="python/libcugraph"
810

ci/build_wheel_pylibcugraph.sh

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,22 @@
33

44
set -euo pipefail
55

6+
source rapids-init-pip
7+
68
package_dir="python/pylibcugraph"
79

810
RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen "${RAPIDS_CUDA_VERSION}")"
911

1012
# Download the libcugraph wheel built in the previous step and make it
1113
# available for pip to find.
14+
#
15+
# Using env variable PIP_CONSTRAINT (initialized by 'rapids-init-pip') is necessary to ensure the constraints
16+
# are used when creating the isolated build environment.
1217
LIBCUGRAPH_WHEELHOUSE=$(RAPIDS_PY_WHEEL_NAME="libcugraph_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-github cpp)
1318

14-
cat >> ./constraints.txt <<EOF
19+
cat >> "${PIP_CONSTRAINT}" <<EOF
1520
libcugraph-${RAPIDS_PY_CUDA_SUFFIX} @ file://$(echo "${LIBCUGRAPH_WHEELHOUSE}"/libcugraph_*.whl)
1621
EOF
1722

18-
# Using env variable PIP_CONSTRAINT is necessary to ensure the constraints
19-
# are used when creating the isolated build environment.
20-
export PIP_CONSTRAINT="${PWD}/constraints.txt"
21-
2223
./ci/build_wheel.sh pylibcugraph ${package_dir} python
2324
./ci/validate_wheel.sh ${package_dir} "${RAPIDS_WHEEL_BLD_OUTPUT_DIR}"

ci/test_wheel_cugraph.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33

44
set -eoxu pipefail
55

6+
source rapids-init-pip
7+
68
# Download the packages built in the previous step
7-
mkdir -p ./dist
89
RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen "${RAPIDS_CUDA_VERSION}")"
910
CUGRAPH_WHEELHOUSE=$(RAPIDS_PY_WHEEL_NAME="cugraph_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-github python)
1011
LIBCUGRAPH_WHEELHOUSE=$(RAPIDS_PY_WHEEL_NAME="libcugraph_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-github cpp)

ci/test_wheel_pylibcugraph.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
set -eoxu pipefail
55

6+
source rapids-init-pip
7+
68
# Download the packages built in the previous step
79
RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen "${RAPIDS_CUDA_VERSION}")"
810
LIBCUGRAPH_WHEELHOUSE=$(RAPIDS_PY_WHEEL_NAME="libcugraph_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-github cpp)

0 commit comments

Comments
 (0)