Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
23 changes: 16 additions & 7 deletions .github/scripts/spur-dist-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,21 @@
set -euo pipefail

# Runs on the self-hosted runner; SSHes to the SPUR head node (AIC_SPUR_HOST), clones the repo at
# the current SHA, and runs dist-build with a CI-scoped image name and tarball
# path. The clone and tarball are left in place for spur-smoke-test.sh to use;
# spur-smoke-test.sh owns the final cleanup.
# the current SHA, and runs the requested dist-build target with a CI-scoped
# image name and tarball path. The clone and tarball are left in place for
# spur-smoke-test.sh to use; spur-smoke-test.sh owns the final cleanup.
#
# On failure, cleans up immediately so no stale state is left behind.

SHA="${1:?usage: $0 <full-sha>}"
SHA="${1:?usage: $0 <full-sha> [dist-build|dist-build-fast]}"
AIC_DIST_BUILD_TARGET="${2:-dist-build}"
case "${AIC_DIST_BUILD_TARGET}" in
dist-build | dist-build-fast) ;;
*)
echo "ERROR: unsupported build target: ${AIC_DIST_BUILD_TARGET}" >&2
exit 2
;;
esac
SHORT="${SHA:0:7}"
REPO="https://github.com/ROCm/rocm-aic.git"
AIC_IMAGE="rocm-aic-ci-${SHORT}:latest"
Expand All @@ -21,6 +29,7 @@ ssh -o ServerAliveInterval=30 -o ServerAliveCountMax=4 "${AIC_SPUR_HOST}" env \
SHA="${SHA}" \
REPO="${REPO}" \
AIC_IMAGE="${AIC_IMAGE}" \
AIC_DIST_BUILD_TARGET="${AIC_DIST_BUILD_TARGET}" \
AIC_SHARED_NFS="${AIC_SHARED_NFS}" \
AIC_SPUR_CONTROLLER="${AIC_SPUR_CONTROLLER}" \
SPUR_CONTROLLER_ADDR="${AIC_SPUR_CONTROLLER}" \
Expand All @@ -45,13 +54,13 @@ git checkout "${SHA}"

mkdir -p "${TARBALL_DIR}"

echo "=== Running dist-build (AIC_SPUR_CLUSTER=1, AIC_IMAGE=${AIC_IMAGE}) ==="
echo "=== Running ${AIC_DIST_BUILD_TARGET} (AIC_SPUR_CLUSTER=1, AIC_IMAGE=${AIC_IMAGE}) ==="
AIC_SPUR_CLUSTER=1 \
AIC_IMAGE="${AIC_IMAGE}" \
AIC_IMAGE_DIR="${TARBALL_DIR}" \
make dist-build
make "${AIC_DIST_BUILD_TARGET}"

echo "=== dist-build complete — tarball in ${TARBALL_DIR} ==="
echo "=== ${AIC_DIST_BUILD_TARGET} complete — tarball in ${TARBALL_DIR} ==="
REMOTE

echo "Build succeeded for ${SHORT}"
27 changes: 18 additions & 9 deletions .github/scripts/spur-smoke-test.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
#!/usr/bin/env bash
set -euo pipefail

# Runs on the self-hosted runner; SSHes to the SPUR head node (AIC_SPUR_HOST) and runs smoke-test
# against the tarball produced by spur-dist-build.sh for the same SHA.
# The clone and tarball are left in place for spur-tiny-test.sh (the next stage)
# to use; spur-tiny-test.sh owns the final cleanup. On failure, cleans up
# immediately so no stale state is left behind.
# Runs on the self-hosted runner; SSHes to the SPUR head node (AIC_SPUR_HOST) and
# runs the requested smoke-test target against the tarball produced by
# spur-dist-build.sh for the same SHA. The clone and tarball are left in place
# for spur-tiny-test.sh (the next stage) to use; spur-tiny-test.sh owns the final
# cleanup. On failure, cleans up immediately so no stale state is left behind.

SHA="${1:?usage: $0 <full-sha>}"
SHA="${1:?usage: $0 <full-sha> [smoke-test|smoke-test-fast]}"
AIC_SMOKE_TEST_TARGET="${2:-smoke-test}"
case "${AIC_SMOKE_TEST_TARGET}" in
smoke-test | smoke-test-fast) ;;
*)
echo "ERROR: unsupported smoke-test target: ${AIC_SMOKE_TEST_TARGET}" >&2
exit 2
;;
esac
SHORT="${SHA:0:7}"
AIC_IMAGE="rocm-aic-ci-${SHORT}:latest"
AIC_SPUR_HOST="${AIC_SPUR_HOST:?AIC_SPUR_HOST must be set (e.g. via GitHub repo variable)}"
Expand All @@ -20,6 +28,7 @@ ssh -o ServerAliveInterval=30 -o ServerAliveCountMax=4 "${AIC_SPUR_HOST}" env \
SHA="${SHA}" \
REPO="${REPO}" \
AIC_IMAGE="${AIC_IMAGE}" \
AIC_SMOKE_TEST_TARGET="${AIC_SMOKE_TEST_TARGET}" \
AIC_SHARED_NFS="${AIC_SHARED_NFS}" \
AIC_SPUR_CONTROLLER="${AIC_SPUR_CONTROLLER}" \
SPUR_CONTROLLER_ADDR="${AIC_SPUR_CONTROLLER}" \
Expand Down Expand Up @@ -48,13 +57,13 @@ if [[ ! -d "${WORKDIR}" || "${ACTUAL_SHA}" != "${SHA}" ]]; then
git -C "${WORKDIR}" checkout "${SHA}"
fi

echo "=== Running smoke-test (AIC_IMAGE=${AIC_IMAGE}) ==="
echo "=== Running ${AIC_SMOKE_TEST_TARGET} (AIC_IMAGE=${AIC_IMAGE}) ==="
AIC_SPUR_CLUSTER=1 \
AIC_IMAGE="${AIC_IMAGE}" \
AIC_IMAGE_DIR="${TARBALL_DIR}" \
make -C "${WORKDIR}" smoke-test
make -C "${WORKDIR}" "${AIC_SMOKE_TEST_TARGET}"

echo "=== smoke-test complete ==="
echo "=== ${AIC_SMOKE_TEST_TARGET} complete ==="
REMOTE

echo "Smoke test passed for ${SHORT}"
2 changes: 1 addition & 1 deletion .github/workflows/aic-amd-cliff.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: AIC AMD Cliff Benchmark
name: AIC Hardware Test - AMD Cliff Benchmark

on:
workflow_dispatch:
Expand Down
Loading
Loading