Skip to content

Commit 84ac1c8

Browse files
committed
[ci] Move the cuda jobs to new infrastructure
1 parent bc61768 commit 84ac1c8

File tree

1 file changed

+46
-2
lines changed

1 file changed

+46
-2
lines changed

.github/workflows/ci.yml

Lines changed: 46 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,51 @@ concurrency:
1414
cancel-in-progress: true
1515

1616
jobs:
17+
# Pre-flight job to activate the cuda infrastructure
18+
prepare-dell:
19+
name: Activate self-host infrastructure
20+
runs-on: [self-hosted, spotter]
21+
steps:
22+
- name: Send Magic Packet
23+
env:
24+
TARGET_IP: ${{ secrets.DELL_IP }}
25+
MAC_ADDR: ${{ secrets.DELL_MAC }}
26+
# The container has no ping, emulate it.
27+
PING: "timeout 1 bash -c 'cat < /dev/null > /dev/tcp/${{ secrets.DELL_IP }}/22' 2>/dev/null"
28+
run: |
29+
# Mask the IP and potential broadcast to keep logs clean
30+
echo "::add-mask::$TARGET_IP"
31+
BROADCAST=$(echo $TARGET_IP | sed 's/\.[0-9]*$/ .255/' | tr -d ' ')
32+
echo "::add-mask::$BROADCAST"
33+
34+
# Install tool silently
35+
sudo apt-get update -qq && sudo apt-get install -y -qq wakeonlan > /dev/null
36+
37+
# Check if already awake (using the Bash TCP PING variable)
38+
if eval "$PING"; then
39+
echo "Target machine is already awake. Exiting."
40+
exit 0
41+
fi
42+
43+
# If offline, send WoL
44+
echo "Machine is offline. Sending WoL..."
45+
wakeonlan -i $BROADCAST $MAC_ADDR > /dev/null
46+
47+
# Wait & Verify Loop (checks every 10s for 4 minutes)
48+
echo "Waiting for response (checking Port 22)..."
49+
for i in {1..24}; do
50+
if eval "$PING"; then
51+
echo "Machine is online and SSH is ready."
52+
exit 0
53+
fi
54+
sleep 10
55+
done
56+
57+
echo "Error: Target hardware did not respond within the timeout period."
58+
exit 1
59+
1760
build:
61+
timeout-minutes: 600 # If some self-host machine is not available
1862
name: ${{ matrix.name }}
1963
runs-on: ${{ matrix.os }}
2064
strategy:
@@ -114,7 +158,7 @@ jobs:
114158
debug_build: true
115159

116160
- name: selfh-ubu22-gcc12-runtime19-analyzers
117-
os: [self-hosted, cuda]
161+
os: [self-hosted, cuda, heavy]
118162
compiler: gcc-12
119163
clang-runtime: '19'
120164
coverage: true
@@ -193,7 +237,7 @@ jobs:
193237
cuda: true
194238

195239
- name: selfh-ubu22-clang16-runtime18-cuda
196-
os: [self-hosted, cuda]
240+
os: [self-hosted, cuda, heavy]
197241
runs-on: cuda
198242
compiler: clang-16
199243
clang-runtime: '18'

0 commit comments

Comments
 (0)