Skip to content

Commit b67a241

Browse files
committed
[ci] Adopt CppInterOp's WoL action, repro hint, and selfh split.
Three patterns CppInterOp already runs against compiler-research/ci-workflows that clad hadn't picked up after the setup-llvm move in 6e4f268. Each is a small win; bundling keeps the migration coherent. * wake-on-lan: drop the inline bash in `prepare-dell` and call `compiler-research/ci-workflows/actions/wake-on-lan@main`. One source of truth for the dell wake-up, easier to fix when its behaviour shifts. * reproduce-locally hint on failure: when a row goes red, print the exact `bin/repro <row>` invocation pinned to the failing SHA. The existing dumps are gated on runner.debug, so first red builds offered no signpost back to a local reproduction. * build-selfhost job: the two self-hosted CUDA rows move to a dedicated job with `needs: prepare-dell`, sharing the step list with `build` via a YAML anchor. Hosted-runner rows stop queuing behind the WoL probe, and which rows actually need the dell is visible in the job list. Drops a dead `runs-on: cuda` matrix field while there.
1 parent e663a33 commit b67a241

1 file changed

Lines changed: 55 additions & 59 deletions

File tree

.github/workflows/ci.yml

Lines changed: 55 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -17,44 +17,10 @@ jobs:
1717
name: Activate self-host infrastructure
1818
runs-on: [self-hosted, spotter]
1919
steps:
20-
- name: Send Magic Packet
21-
env:
22-
TARGET_IP: 192.168.100.30
23-
MAC_ADDR: a4:bb:6d:51:d5:d2
24-
# The container has no ping, emulate it.
25-
run: |
26-
# Mask the IP and potential broadcast to keep logs clean
27-
echo "::add-mask::$MAC_ADDR"
28-
echo "::add-mask::$BROADCAST"
29-
echo "::add-mask::$TARGET_IP"
30-
BROADCAST=$(echo $TARGET_IP | sed 's/\.[0-9]*$/ .255/' | tr -d ' ')
31-
PING="timeout 1 bash -c 'cat < /dev/null > /dev/tcp/$TARGET_IP/22' 2>/dev/null"
32-
33-
# Install tool silently
34-
sudo apt-get update -qq && sudo apt-get install -y -qq wakeonlan > /dev/null
35-
36-
# Check if already awake (using the Bash TCP PING variable)
37-
if eval "$PING"; then
38-
echo "Target machine is already awake. Exiting."
39-
exit 0
40-
fi
41-
42-
# If offline, send WoL
43-
echo "Machine is offline. Sending WoL..."
44-
wakeonlan -i $BROADCAST $MAC_ADDR > /dev/null
45-
46-
# Wait & Verify Loop (checks every 10s for 4 minutes)
47-
echo "Waiting for response (checking Port 22)..."
48-
for i in {1..24}; do
49-
if eval "$PING"; then
50-
echo "Machine is online and SSH is ready."
51-
exit 0
52-
fi
53-
sleep 10
54-
done
55-
56-
echo "Error: Target hardware did not respond within the timeout period."
57-
exit 1
20+
- uses: compiler-research/ci-workflows/actions/wake-on-lan@main
21+
with:
22+
mac: a4:bb:6d:51:d5:d2
23+
target-host: 192.168.100.30
5824

5925
build:
6026
timeout-minutes: 600 # If some self-host machine is not available
@@ -100,17 +66,6 @@ jobs:
10066
clang-runtime: '21'
10167
debug_build: true
10268

103-
- name: selfh-ubu22-gcc12-runtime19-analyzers
104-
os: [self-hosted, cuda, heavy]
105-
self-hosted-os: ubuntu-22.04
106-
compiler: gcc-12
107-
clang-runtime: '19'
108-
coverage: true
109-
cuda: true
110-
extra_cmake_options: '-DCLAD_ENABLE_ENZYME_BACKEND=On -DCLAD_CUDA_TEST_USE_SANITIZER=On'
111-
extra_packages: ' libzstd-dev '
112-
#clang-format: true
113-
11469
- name: ubu24-gcc13-runtime20-benchmarks
11570
os: ubuntu-24.04
11671
compiler: gcc-13
@@ -125,15 +80,6 @@ jobs:
12580
clang-runtime: '13'
12681
cuda: true
12782

128-
- name: selfh-ubu22-clang16-runtime18-cuda
129-
os: [self-hosted, cuda, heavy]
130-
self-hosted-os: ubuntu-22.04
131-
runs-on: cuda
132-
compiler: clang-16
133-
extra_cmake_options: '-DCLAD_CUDA_TEST_USE_SANITIZER=On'
134-
clang-runtime: '18'
135-
cuda: true
136-
13783
- name: ubuntu-clang15-runtime16-doc
13884
os: ubuntu-latest
13985
compiler: clang-15
@@ -178,7 +124,7 @@ jobs:
178124
compiler: clang-16
179125
clang-runtime: '18'
180126

181-
steps:
127+
steps: &build_steps
182128
- uses: actions/checkout@v4
183129
with:
184130
fetch-depth: 0
@@ -530,6 +476,24 @@ jobs:
530476
-DLLVM_EXTERNAL_LIT="`which lit`" \
531477
..
532478
cmake --build . --target sphinx-clad doxygen-clad -- -j${{ env.ncpus }}
479+
- name: Show reproduce-locally hint
480+
if: ${{ failure() }}
481+
shell: bash
482+
env:
483+
REPO: ${{ github.repository }}
484+
REPO_NAME: ${{ github.event.repository.name }}
485+
SHA: ${{ github.sha }}
486+
ROW: ${{ matrix.name }}
487+
run: |
488+
echo "::group::Reproduce this failure locally (requires Docker + nektos/act)"
489+
cat <<EOF
490+
git clone https://github.com/compiler-research/ci-workflows.git
491+
git clone https://github.com/$REPO.git
492+
cd $REPO_NAME
493+
git checkout $SHA
494+
../ci-workflows/bin/repro $ROW
495+
EOF
496+
echo "::endgroup::"
533497
- name: Failed job config
534498
if: ${{ failure() && runner.debug && runner.os != 'windows' }}
535499
env:
@@ -579,3 +543,35 @@ jobs:
579543
fail_ci_if_error: true
580544
verbose: true
581545
token: ${{ secrets.CODECOV_TOKEN }}
546+
547+
# Self-hosted CUDA rows. Separate job so `prepare-dell` gates only
548+
# what depends on the dell; the hosted-runner matrix in `build` runs
549+
# without waiting. Step list shared via the &build_steps anchor.
550+
build-selfhost:
551+
needs: prepare-dell
552+
timeout-minutes: 600 # If the dell is slow to come back up.
553+
name: ${{ matrix.name }}
554+
runs-on: ${{ matrix.os }}
555+
strategy:
556+
fail-fast: false
557+
matrix:
558+
include:
559+
- name: selfh-ubu22-gcc12-runtime19-analyzers
560+
os: [self-hosted, cuda, heavy]
561+
self-hosted-os: ubuntu-22.04
562+
compiler: gcc-12
563+
clang-runtime: '19'
564+
coverage: true
565+
cuda: true
566+
extra_cmake_options: '-DCLAD_ENABLE_ENZYME_BACKEND=On -DCLAD_CUDA_TEST_USE_SANITIZER=On'
567+
extra_packages: ' libzstd-dev '
568+
569+
- name: selfh-ubu22-clang16-runtime18-cuda
570+
os: [self-hosted, cuda, heavy]
571+
self-hosted-os: ubuntu-22.04
572+
compiler: clang-16
573+
extra_cmake_options: '-DCLAD_CUDA_TEST_USE_SANITIZER=On'
574+
clang-runtime: '18'
575+
cuda: true
576+
577+
steps: *build_steps

0 commit comments

Comments
 (0)