Skip to content
Closed
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
55 changes: 55 additions & 0 deletions .github/workflows/temp-rocm-runtime-link-cache-ab.yml
Original file line number Diff line number Diff line change
@@ -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'
Loading