Skip to content

Commit 463bd2c

Browse files
committed
ci: plan builds and artifact reuse per bindings root
Signed-off-by: Ralf W. Grosse-Kunstleve <rgrossekunst@nvidia.com>
1 parent 6600f4c commit 463bd2c

17 files changed

Lines changed: 1616 additions & 949 deletions

‎.github/workflows/build-wheel.yml‎

Lines changed: 259 additions & 163 deletions
Large diffs are not rendered by default.

‎.github/workflows/ci-pixi-source-test.yml‎

Lines changed: 225 additions & 102 deletions
Large diffs are not rendered by default.

‎.github/workflows/ci.yml‎

Lines changed: 130 additions & 137 deletions
Large diffs are not rendered by default.

‎.github/workflows/test-sdist-linux.yml‎

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,15 @@ permissions:
2929
jobs:
3030
test-sdist:
3131
name: Test sdist builds
32-
if: ${{ inputs.workplan == '' || fromJSON(inputs.workplan).jobs.sdist_tests }}
32+
if: ${{ inputs.workplan == '' || fromJSON(inputs.workplan).jobs.sdist_package_roots[fromJSON(inputs.bindings-package).package_root] }}
3333
env:
3434
BINDINGS_ROOT: ${{ fromJSON(inputs.bindings-package).package_root }}
3535
CUDA_PYTHON_BUILD_MAJOR: ${{ fromJSON(inputs.bindings-package).cuda_major }}
3636
BUILD_PATHFINDER: ${{ fromJSON(inputs.bindings-package).release_status == 'current' && (inputs.workplan == '' || fromJSON(inputs.workplan).modules.pathfinder.needs_build) }}
37-
BUILD_BINDINGS: ${{ inputs.workplan == '' || fromJSON(inputs.workplan).modules.bindings.needs_build }}
38-
BUILD_CORE: ${{ inputs.workplan == '' || fromJSON(inputs.workplan).modules.core.needs_build }}
39-
BUILD_PYTHON: ${{ inputs.workplan == '' || fromJSON(inputs.workplan).modules.python.needs_build }}
37+
BUILD_BINDINGS: ${{ inputs.workplan == '' || fromJSON(inputs.workplan).modules.bindings.package_roots[fromJSON(inputs.bindings-package).package_root].needs_build }}
38+
BUILD_CORE: ${{ inputs.workplan == '' || fromJSON(inputs.workplan).modules.core.cuda_majors[fromJSON(inputs.bindings-package).cuda_variant].needs_build }}
39+
BUILD_PYTHON: ${{ inputs.workplan == '' || fromJSON(inputs.workplan).modules.python.package_roots[fromJSON(inputs.bindings-package).package_root].needs_build }}
40+
PATHFINDER_SOURCE: ${{ inputs.workplan == '' && 'artifact' || fromJSON(inputs.workplan).sources.pathfinder }}
4041
timeout-minutes: 60
4142
runs-on: linux-amd64-cpu8
4243
steps:
@@ -77,7 +78,8 @@ jobs:
7778
pip wheel --no-deps --wheel-dir cuda_python/dist cuda_python/dist/*.tar.gz
7879
7980
- name: Download cuda.pathfinder wheel
80-
if: ${{ env.BUILD_PATHFINDER != 'true' && (env.BUILD_BINDINGS == 'true' || env.BUILD_CORE == 'true') }}
81+
if: ${{ env.BUILD_PATHFINDER != 'true' && (env.BUILD_BINDINGS == 'true' || env.BUILD_CORE == 'true') &&
82+
env.PATHFINDER_SOURCE == 'artifact' }}
8183
uses: ./.github/actions/download-artifact-retry
8284
with:
8385
name: cuda-pathfinder-wheel
@@ -86,12 +88,19 @@ jobs:
8688
- name: Constrain builds to the local cuda.pathfinder wheel
8789
if: ${{ env.BUILD_BINDINGS == 'true' }}
8890
run: |
89-
pathfinder_wheels=(cuda_pathfinder/dist/cuda_pathfinder-*.whl)
90-
test "${#pathfinder_wheels[@]}" -eq 1
91-
test -f "${pathfinder_wheels[0]}"
9291
mkdir -p wheel-constraints
93-
pathfinder_uri="file://$(realpath "${pathfinder_wheels[0]}")"
94-
printf 'cuda-pathfinder @ %s\n' "${pathfinder_uri}" | tee wheel-constraints/cuda-bindings.txt
92+
if [[ "${PATHFINDER_SOURCE}" == artifact ]]; then
93+
pathfinder_wheels=(cuda_pathfinder/dist/cuda_pathfinder-*.whl)
94+
test "${#pathfinder_wheels[@]}" -eq 1
95+
test -f "${pathfinder_wheels[0]}"
96+
pathfinder_uri="file://$(realpath "${pathfinder_wheels[0]}")"
97+
printf 'cuda-pathfinder @ %s\n' "${pathfinder_uri}" > wheel-constraints/cuda-bindings.txt
98+
elif [[ "${PATHFINDER_SOURCE}" == published ]]; then
99+
: > wheel-constraints/cuda-bindings.txt
100+
else
101+
echo "Error: PATHFINDER_SOURCE must be artifact or published" >&2
102+
exit 1
103+
fi
95104
96105
# Cython packages need CTK + sccache (local disk cache only in this job).
97106
- name: Install rapidsai/sccache

‎.github/workflows/test-sdist-windows.yml‎

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,15 @@ permissions:
3535
jobs:
3636
test-sdist:
3737
name: Test sdist builds
38-
if: ${{ inputs.workplan == '' || fromJSON(inputs.workplan).jobs.sdist_tests }}
38+
if: ${{ inputs.workplan == '' || fromJSON(inputs.workplan).jobs.sdist_package_roots[fromJSON(inputs.bindings-package).package_root] }}
3939
env:
4040
BINDINGS_ROOT: ${{ fromJSON(inputs.bindings-package).package_root }}
4141
CUDA_PYTHON_BUILD_MAJOR: ${{ fromJSON(inputs.bindings-package).cuda_major }}
4242
BUILD_PATHFINDER: ${{ fromJSON(inputs.bindings-package).release_status == 'current' && (inputs.workplan == '' || fromJSON(inputs.workplan).modules.pathfinder.needs_build) }}
43-
BUILD_BINDINGS: ${{ inputs.workplan == '' || fromJSON(inputs.workplan).modules.bindings.needs_build }}
44-
BUILD_CORE: ${{ inputs.workplan == '' || fromJSON(inputs.workplan).modules.core.needs_build }}
45-
BUILD_PYTHON: ${{ inputs.workplan == '' || fromJSON(inputs.workplan).modules.python.needs_build }}
43+
BUILD_BINDINGS: ${{ inputs.workplan == '' || fromJSON(inputs.workplan).modules.bindings.package_roots[fromJSON(inputs.bindings-package).package_root].needs_build }}
44+
BUILD_CORE: ${{ inputs.workplan == '' || fromJSON(inputs.workplan).modules.core.cuda_majors[fromJSON(inputs.bindings-package).cuda_variant].needs_build }}
45+
BUILD_PYTHON: ${{ inputs.workplan == '' || fromJSON(inputs.workplan).modules.python.package_roots[fromJSON(inputs.bindings-package).package_root].needs_build }}
46+
PATHFINDER_SOURCE: ${{ inputs.workplan == '' && 'artifact' || fromJSON(inputs.workplan).sources.pathfinder }}
4647
timeout-minutes: 60
4748
runs-on: windows-2022
4849
steps:
@@ -93,7 +94,8 @@ jobs:
9394
pip wheel --no-deps --wheel-dir cuda_python/dist cuda_python/dist/*.tar.gz
9495
9596
- name: Download cuda.pathfinder wheel
96-
if: ${{ env.BUILD_PATHFINDER != 'true' && (env.BUILD_BINDINGS == 'true' || env.BUILD_CORE == 'true') }}
97+
if: ${{ env.BUILD_PATHFINDER != 'true' && (env.BUILD_BINDINGS == 'true' || env.BUILD_CORE == 'true') &&
98+
env.PATHFINDER_SOURCE == 'artifact' }}
9799
uses: ./.github/actions/download-artifact-retry
98100
with:
99101
name: cuda-pathfinder-wheel
@@ -102,12 +104,19 @@ jobs:
102104
- name: Constrain builds to the local cuda.pathfinder wheel
103105
if: ${{ env.BUILD_BINDINGS == 'true' }}
104106
run: |
105-
pathfinder_wheels=(cuda_pathfinder/dist/cuda_pathfinder-*.whl)
106-
test "${#pathfinder_wheels[@]}" -eq 1
107-
test -f "${pathfinder_wheels[0]}"
108107
mkdir -p wheel-constraints
109-
pathfinder_uri="file:///$(cygpath -am "${pathfinder_wheels[0]}")"
110-
printf 'cuda-pathfinder @ %s\n' "${pathfinder_uri}" | tee wheel-constraints/cuda-bindings.txt
108+
if [[ "${PATHFINDER_SOURCE}" == artifact ]]; then
109+
pathfinder_wheels=(cuda_pathfinder/dist/cuda_pathfinder-*.whl)
110+
test "${#pathfinder_wheels[@]}" -eq 1
111+
test -f "${pathfinder_wheels[0]}"
112+
pathfinder_uri="file:///$(cygpath -am "${pathfinder_wheels[0]}")"
113+
printf 'cuda-pathfinder @ %s\n' "${pathfinder_uri}" > wheel-constraints/cuda-bindings.txt
114+
elif [[ "${PATHFINDER_SOURCE}" == published ]]; then
115+
: > wheel-constraints/cuda-bindings.txt
116+
else
117+
echo "Error: PATHFINDER_SOURCE must be artifact or published" >&2
118+
exit 1
119+
fi
111120
112121
# Cython packages need CTK. No sccache on Windows (this is a correctness
113122
# smoke test, not a production build; see build-wheel.yml which also

0 commit comments

Comments
 (0)