Skip to content

Commit 7820b2b

Browse files
authored
Merge branch 'main' into ehu/cve-bump-deps
2 parents f433945 + 5a21c2a commit 7820b2b

318 files changed

Lines changed: 393055 additions & 82043 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
name: 'Launch GPU EC2 Runner'
2+
description: 'Launch GPU-enabled EC2 instance as GitHub Actions self-hosted runner (wrapper for machulav/ec2-github-runner)'
3+
4+
on:
5+
workflow_dispatch:
6+
inputs:
7+
mode:
8+
description: 'Mode: start or stop'
9+
required: true
10+
github-token:
11+
description: 'GitHub Personal Access Token with repo scope for runner registration'
12+
required: true
13+
instance-type:
14+
description: 'EC2 instance type (e.g., g6.2xlarge, g5.2xlarge, g6.8xlarge)'
15+
required: false
16+
default: 'g6.2xlarge'
17+
aws-region:
18+
description: 'AWS region'
19+
required: true
20+
availability-zones-config:
21+
description: 'JSON array of AZ configs with imageId, subnetId, securityGroupId for fallback'
22+
required: false
23+
default: ''
24+
# For stop mode
25+
label:
26+
description: 'Runner label (for stop mode)'
27+
required: false
28+
ec2-instance-id:
29+
description: 'EC2 instance ID (for stop mode)'
30+
required: false
31+
# Optional
32+
ec2-instance-tags:
33+
description: 'JSON array of tags to apply to EC2 instance'
34+
required: false
35+
default: '[]'
36+
runner-home-dir:
37+
description: 'Home directory for the runner'
38+
required: false
39+
default: ''
40+
iam-role-name:
41+
description: 'IAM role name to attach to the instance (optional, for enhanced security)'
42+
required: false
43+
default: ''
44+
45+
outputs:
46+
label:
47+
description: 'Unique label for the launched runner'
48+
value: ${{ steps.ec2-runner.outputs.label }}
49+
ec2-instance-id:
50+
description: 'EC2 instance ID'
51+
value: ${{ steps.ec2-runner.outputs.ec2-instance-id }}
52+
53+
runs:
54+
using: 'composite'
55+
steps:
56+
- name: Start EC2 runner
57+
if: inputs.mode == 'start'
58+
id: ec2-runner
59+
uses: machulav/ec2-github-runner@343a1b2ae682e681c3cec9a235d882da17ff04ef # v2.6.1
60+
env:
61+
AWS_DEFAULT_REGION: ${{ inputs.aws-region }}
62+
AWS_REGION: ${{ inputs.aws-region }}
63+
with:
64+
mode: start
65+
github-token: ${{ inputs.github-token }}
66+
ec2-instance-type: ${{ inputs.instance-type }}
67+
aws-resource-tags: ${{ inputs.ec2-instance-tags }}
68+
runner-home-dir: ${{ inputs.runner-home-dir }}
69+
iam-role-name: ${{ inputs.iam-role-name }}
70+
availability-zones-config: ${{ inputs.availability-zones-config }}
71+
72+
- name: Stop EC2 runner
73+
if: inputs.mode == 'stop'
74+
uses: machulav/ec2-github-runner@343a1b2ae682e681c3cec9a235d882da17ff04ef # v2.6.1
75+
env:
76+
AWS_DEFAULT_REGION: ${{ inputs.aws-region }}
77+
AWS_REGION: ${{ inputs.aws-region }}
78+
with:
79+
mode: stop
80+
github-token: ${{ inputs.github-token }}
81+
label: ${{ inputs.label }}
82+
ec2-instance-id: ${{ inputs.ec2-instance-id }}

.github/actions/run-and-record-tests/action.yml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,30 +62,35 @@ runs:
6262
INPUT_PATTERN: ${{ inputs.pattern }}
6363
INPUT_TEXT_MODEL: ${{ inputs.text-model }}
6464
run: |
65-
SCRIPT_ARGS="--stack-config ${INPUT_STACK_CONFIG} --inference-mode ${INPUT_INFERENCE_MODE}"
65+
SCRIPT_ARGS=(
66+
--stack-config "${INPUT_STACK_CONFIG}"
67+
--inference-mode "${INPUT_INFERENCE_MODE}"
68+
)
6669
6770
# Add optional arguments only if they are provided
6871
if [ -n "${INPUT_SETUP}" ]; then
69-
SCRIPT_ARGS="${SCRIPT_ARGS} --setup ${INPUT_SETUP}"
72+
SCRIPT_ARGS+=(--setup "${INPUT_SETUP}")
7073
fi
7174
if [ -n "${INPUT_SUITE}" ]; then
72-
SCRIPT_ARGS="${SCRIPT_ARGS} --suite ${INPUT_SUITE}"
75+
SCRIPT_ARGS+=(--suite "${INPUT_SUITE}")
7376
fi
7477
if [ -n "${INPUT_SUBDIRS}" ]; then
75-
SCRIPT_ARGS="${SCRIPT_ARGS} --subdirs ${INPUT_SUBDIRS}"
78+
SCRIPT_ARGS+=(--subdirs "${INPUT_SUBDIRS}")
7679
fi
7780
if [ -n "${INPUT_PATTERN}" ]; then
78-
SCRIPT_ARGS="${SCRIPT_ARGS} --pattern ${INPUT_PATTERN}"
81+
SCRIPT_ARGS+=(--pattern "${INPUT_PATTERN}")
7982
fi
8083
if [ -n "${INPUT_TEXT_MODEL}" ]; then
81-
SCRIPT_ARGS="${SCRIPT_ARGS} --text-model ${INPUT_TEXT_MODEL}"
84+
SCRIPT_ARGS+=(--text-model "${INPUT_TEXT_MODEL}")
8285
fi
8386
8487
echo "=== Running command ==="
85-
echo "uv run --no-sync ./scripts/integration-tests.sh $SCRIPT_ARGS"
88+
printf 'uv run --no-sync ./scripts/integration-tests.sh'
89+
printf ' %q' "${SCRIPT_ARGS[@]}"
90+
printf '\n'
8691
echo ""
8792
88-
uv run --no-sync ./scripts/integration-tests.sh $SCRIPT_ARGS | tee "pytest-${INPUT_INFERENCE_MODE}.log"
93+
uv run --no-sync ./scripts/integration-tests.sh "${SCRIPT_ARGS[@]}" | tee "pytest-${INPUT_INFERENCE_MODE}.log"
8994
9095
9196
- name: Commit and push recordings

.github/actions/setup-test-environment/action.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ inputs:
2727
description: 'Explicit branch override (used by scheduled CI to pass the matrix branch)'
2828
required: false
2929
default: ''
30+
enable-hf-cache:
31+
description: 'Whether to cache HuggingFace models and datasets'
32+
required: false
33+
default: 'true'
3034

3135
runs:
3236
using: 'composite'
@@ -40,6 +44,7 @@ runs:
4044
branch: ${{ inputs.branch }}
4145

4246
- name: Cache HuggingFace models and datasets
47+
if: ${{ inputs.enable-hf-cache == 'true' }}
4348
uses: actions/cache@v4
4449
with:
4550
path: ~/.cache/huggingface
@@ -48,6 +53,7 @@ runs:
4853
hf-cache-${{ runner.os }}-
4954
5055
- name: Pre-download HuggingFace assets for offline use
56+
if: ${{ inputs.enable-hf-cache == 'true' }}
5157
shell: bash
5258
env:
5359
HF_HUB_ENABLE_HF_TRANSFER: "1"
@@ -74,7 +80,7 @@ runs:
7480
setup: ${{ inputs.setup }}
7581

7682
- name: Setup vllm
77-
if: ${{ startsWith(inputs.setup, 'vllm') && inputs.inference-mode != 'replay' }}
83+
if: ${{ startsWith(inputs.setup, 'vllm') && !startsWith(inputs.setup, 'vllm-gpu-') && inputs.inference-mode != 'replay' }}
7884
uses: ./.github/actions/setup-vllm
7985

8086
- name: Start Postgres service

0 commit comments

Comments
 (0)