Skip to content

Commit 1f02e78

Browse files
lemtoccodex
andcommitted
feat(ci): use self-hosted zsh benchmark runner
- Run the main zsh benchmark on the self-hosted local-bench runner - Keep the PR benchmark on macos-latest and scope git signing config to the workspace - Add actionlint configuration for the local-bench label and clean benchmark temp files Co-authored-by: Codex GPT-5.5 <noreply@openai.com>
1 parent ce8caa8 commit 1f02e78

3 files changed

Lines changed: 41 additions & 7 deletions

File tree

.github/actionlint.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
self-hosted-runner:
2+
labels:
3+
- local-bench

.github/workflows/benchmark-pr.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ jobs:
2222
- uses: ./.github/actions/setup-bench-env
2323
id: env
2424

25-
- name: Disable git commit signing
26-
run: git config --global commit.gpgsign false
25+
- name: Disable git commit signing in workspace
26+
run: git config --local commit.gpgsign false
2727

2828
- uses: ./.github/actions/run-benchmark
2929

@@ -42,3 +42,10 @@ jobs:
4242
comment-always: true
4343
fail-on-alert: true
4444
summary-always: true
45+
46+
- name: Clean benchmark temporary files
47+
if: always()
48+
shell: bash
49+
run: |
50+
rm -rf "$RUNNER_TEMP/zsh-bench"
51+
rm -f zsh-bench-result.txt benchmark-result.json

.github/workflows/benchmark.yml

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: Zsh Interactive Benchmark
22

33
on:
4+
workflow_dispatch:
45
push:
56
branches: [main]
67

@@ -15,16 +16,32 @@ permissions:
1516
jobs:
1617
benchmark:
1718
name: Zsh Interactive Latency
18-
runs-on: macos-latest
19+
runs-on: [self-hosted, local-bench]
1920
timeout-minutes: 30
2021
steps:
2122
- uses: actions/checkout@v6
2223

23-
- uses: ./.github/actions/setup-bench-env
24-
id: env
24+
- name: Add local tool paths
25+
shell: bash
26+
run: |
27+
{
28+
echo "$HOME/.local/share/mise/shims"
29+
echo "$HOME/.nix-profile/bin"
30+
echo "/etc/profiles/per-user/$USER/bin"
31+
echo "/run/current-system/sw/bin"
32+
echo "/nix/var/nix/profiles/default/bin"
33+
echo "/opt/homebrew/bin"
34+
echo "/opt/homebrew/sbin"
35+
} >> "$GITHUB_PATH"
2536
26-
- name: Disable git commit signing
27-
run: git config --global commit.gpgsign false
37+
- name: Warm local shell caches
38+
shell: bash
39+
run: |
40+
zsh -i -c exit
41+
bash .github/scripts/warm-zsh-startup-cache.sh
42+
43+
- name: Disable git commit signing in workspace
44+
run: git config --local commit.gpgsign false
2845

2946
- uses: ./.github/actions/run-benchmark
3047

@@ -43,3 +60,10 @@ jobs:
4360
fail-on-alert: true
4461
summary-always: true
4562
alert-comment-cc-users: "@lemtoc"
63+
64+
- name: Clean benchmark temporary files
65+
if: always()
66+
shell: bash
67+
run: |
68+
rm -rf "$RUNNER_TEMP/zsh-bench"
69+
rm -f zsh-bench-result.txt benchmark-result.json

0 commit comments

Comments
 (0)