From f26cc7e2e7dc2eda67054d1509a532315a241513 Mon Sep 17 00:00:00 2001 From: Mike Sarahan Date: Wed, 26 Feb 2025 07:55:44 -0600 Subject: [PATCH] use gha-tools rapids-telemetry-setup for mkdir -p (#1839) Please refer to https://github.com/rapidsai/gha-tools/pull/148 for explanation here. Authors: - Mike Sarahan (https://github.com/msarahan) Approvers: - James Lamb (https://github.com/jameslamb) URL: https://github.com/rapidsai/rmm/pull/1839 --- ci/build_cpp.sh | 7 +++++-- ci/build_python.sh | 7 +++++-- ci/build_wheel_cpp.sh | 7 +++++-- ci/build_wheel_python.sh | 7 +++++-- 4 files changed, 20 insertions(+), 8 deletions(-) diff --git a/ci/build_cpp.sh b/ci/build_cpp.sh index 6e6737d71..8321215fa 100755 --- a/ci/build_cpp.sh +++ b/ci/build_cpp.sh @@ -22,6 +22,9 @@ export RAPIDS_PACKAGE_VERSION # Creates and exports $RATTLER_CHANNELS source rapids-rattler-channel-string +# Creates artifacts directory for telemetry +source rapids-telemetry-setup + # --no-build-id allows for caching with `sccache` # more info is available at # https://rattler.build/latest/tips_and_tricks/#using-sccache-or-ccache-with-rattler-build @@ -30,9 +33,9 @@ rattler-build build --recipe conda/recipes/librmm \ --no-build-id \ --channel-priority disabled \ --output-dir "$RAPIDS_CONDA_BLD_OUTPUT_DIR" \ - "${RATTLER_CHANNELS[@]}" 2>&1 | tee telemetry-artifacts/build.log + "${RATTLER_CHANNELS[@]}" 2>&1 | tee ${GITHUB_WORKSPACE}/telemetry-artifacts/build.log -sccache --show-adv-stats | tee telemetry-artifacts/sccache-stats.txt +sccache --show-adv-stats | tee ${GITHUB_WORKSPACE}/telemetry-artifacts/sccache-stats.txt # remove build_cache directory rm -rf "$RAPIDS_CONDA_BLD_OUTPUT_DIR"/build_cache diff --git a/ci/build_python.sh b/ci/build_python.sh index 7ae21b873..f822efd50 100755 --- a/ci/build_python.sh +++ b/ci/build_python.sh @@ -26,6 +26,9 @@ export RAPIDS_PACKAGE_VERSION # Creates and exports $RATTLER_CHANNELS source rapids-rattler-channel-string +# Creates artifacts directory for telemetry +source rapids-telemetry-setup + # --no-build-id allows for caching with `sccache` # more info is available at # https://rattler.build/latest/tips_and_tricks/#using-sccache-or-ccache-with-rattler-build @@ -35,9 +38,9 @@ rattler-build build --recipe conda/recipes/rmm \ --channel-priority disabled \ --output-dir "$RAPIDS_CONDA_BLD_OUTPUT_DIR" \ -c "${CPP_CHANNEL}" \ - "${RATTLER_CHANNELS[@]}" 2>&1 | tee telemetry-artifacts/build.log + "${RATTLER_CHANNELS[@]}" 2>&1 | tee ${GITHUB_WORKSPACE}/telemetry-artifacts/build.log -sccache --show-adv-stats | tee telemetry-artifacts/sccache-stats.txt +sccache --show-adv-stats | tee ${GITHUB_WORKSPACE}/telemetry-artifacts/sccache-stats.txt # See https://github.com/prefix-dev/rattler-build/issues/1424 rm -rf "$RAPIDS_CONDA_BLD_OUTPUT_DIR"/build_cache diff --git a/ci/build_wheel_cpp.sh b/ci/build_wheel_cpp.sh index 23f325322..0605aafc2 100755 --- a/ci/build_wheel_cpp.sh +++ b/ci/build_wheel_cpp.sh @@ -16,9 +16,12 @@ cd "${package_dir}" sccache --zero-stats -rapids-pip-retry wheel . -w dist -v --no-deps --disable-pip-version-check 2>&1 | tee ../../telemetry-artifacts/build.log +# Creates artifacts directory for telemetry +source rapids-telemetry-setup -sccache --show-adv-stats | tee ../../telemetry-artifacts/sccache-stats.txt +rapids-pip-retry wheel . -w dist -v --no-deps --disable-pip-version-check 2>&1 | tee ${GITHUB_WORKSPACE}/telemetry-artifacts/build.log + +sccache --show-adv-stats | tee ${GITHUB_WORKSPACE}/telemetry-artifacts/sccache-stats.txt python -m wheel tags --platform any dist/* --remove diff --git a/ci/build_wheel_python.sh b/ci/build_wheel_python.sh index 44d90b744..7438b102e 100755 --- a/ci/build_wheel_python.sh +++ b/ci/build_wheel_python.sh @@ -24,10 +24,13 @@ echo "librmm-${RAPIDS_PY_CUDA_SUFFIX} @ file://$(echo "${CPP_WHEELHOUSE}"/librmm sccache --zero-stats +# Creates artifacts directory for telemetry +source rapids-telemetry-setup + PIP_CONSTRAINT="${PWD}/build-constraints.txt" \ - rapids-pip-retry wheel . -w dist -v --no-deps --disable-pip-version-check 2>&1 | tee ../../telemetry-artifacts/build.log + rapids-pip-retry wheel . -w dist -v --no-deps --disable-pip-version-check 2>&1 | tee ${GITHUB_WORKSPACE}/telemetry-artifacts/build.log -sccache --show-adv-stats | tee ../../telemetry-artifacts/sccache-stats.txt +sccache --show-adv-stats | tee ${GITHUB_WORKSPACE}/telemetry-artifacts/sccache-stats.txt mkdir -p final_dist EXCLUDE_ARGS=(