From ab8e75d170561639e7082e00857b06ceb1b9aaf0 Mon Sep 17 00:00:00 2001 From: Yuu <206304251+nekomario28@users.noreply.github.com> Date: Tue, 25 Aug 2026 14:18:58 +0900 Subject: [PATCH] ci: discriminate ROCm runtime-link cache lifetime fix --- .../temp-rocm-runtime-link-cache-ab.yml | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 .github/workflows/temp-rocm-runtime-link-cache-ab.yml diff --git a/.github/workflows/temp-rocm-runtime-link-cache-ab.yml b/.github/workflows/temp-rocm-runtime-link-cache-ab.yml new file mode 100644 index 00000000..4f925129 --- /dev/null +++ b/.github/workflows/temp-rocm-runtime-link-cache-ab.yml @@ -0,0 +1,55 @@ +name: TEMP ROCm runtime-link cache A-B + +on: + pull_request: + branches: + - fix/pr132-rocm-runtime-link-cache + +permissions: + contents: read + +jobs: + discriminate: + runs-on: ubuntu-24.04 + timeout-minutes: 5 + env: + BASE_SHA: 45417560beeba896a9b0866e50154d2a7a320b8b + CANDIDATE_SHA: 2ccee21c1298377f7c6c211e44165f60c3039f7f + steps: + - name: Check out exact carrier head + uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 + with: + persist-credentials: false + ref: ${{ github.event.pull_request.head.sha }} + fetch-depth: 0 + + - name: Prove base red and candidate green + shell: bash + run: | + set -euo pipefail + test "$(git rev-parse HEAD^)" = "$CANDIDATE_SHA" + test "$(git rev-parse "$CANDIDATE_SHA^^")" = "$BASE_SHA" + + base_root="$RUNNER_TEMP/base" + candidate_root="$RUNNER_TEMP/candidate" + git worktree add --detach "$base_root" "$BASE_SHA" + git worktree add --detach "$candidate_root" "$CANDIDATE_SHA" + + mkdir -p "$base_root/tests/kernels" + cp "$candidate_root/tests/kernels/test_rocm_runtime_link_cache.py" "$base_root/tests/kernels/test_rocm_runtime_link_cache.py" + + set +e + python "$base_root/tests/kernels/test_rocm_runtime_link_cache.py" >"$RUNNER_TEMP/base.log" 2>&1 + base_rc=$? + set -e + test "$base_rc" -ne 0 + grep -Fq 'AssertionError' "$RUNNER_TEMP/base.log" + echo "ROCM_RUNTIME_LINK_CACHE_BASE_RC=$base_rc" + echo 'ROCM_RUNTIME_LINK_CACHE_BASE=EXPECTED_FAIL' + + python "$candidate_root/tests/kernels/test_rocm_runtime_link_cache.py" + echo 'ROCM_RUNTIME_LINK_CACHE_CANDIDATE=PASS' + + test "$(git diff --name-only "$BASE_SHA" "$CANDIDATE_SHA" | sort)" = $'python/freetoken/kernel/utils.py\ntests/kernels/test_rocm_runtime_link_cache.py' + git diff --check "$BASE_SHA" "$CANDIDATE_SHA" + echo 'ROCM_RUNTIME_LINK_CACHE_AB=BASE_RED_FIX_GREEN'