Skip to content

feat(ci): use self-hosted zsh benchmark runner #107

feat(ci): use self-hosted zsh benchmark runner

feat(ci): use self-hosted zsh benchmark runner #107

Workflow file for this run

name: Zsh Interactive Benchmark
on:
workflow_dispatch:
push:
branches: [main]
concurrency:
group: benchmark
cancel-in-progress: false
permissions:
deployments: write
contents: write
jobs:
benchmark:
name: Zsh Interactive Latency
runs-on: [self-hosted, local-bench]
timeout-minutes: 30
steps:
- uses: actions/checkout@v6
- name: Add local tool paths
shell: bash
run: |
{
echo "$HOME/.local/share/mise/shims"
echo "$HOME/.nix-profile/bin"
echo "/etc/profiles/per-user/$USER/bin"
echo "/run/current-system/sw/bin"
echo "/nix/var/nix/profiles/default/bin"
echo "/opt/homebrew/bin"
echo "/opt/homebrew/sbin"
} >> "$GITHUB_PATH"
- name: Warm local shell caches
shell: bash
run: |
zsh -i -c exit
bash .github/scripts/warm-zsh-startup-cache.sh
- name: Disable git commit signing in workspace
run: git config --local commit.gpgsign false
- uses: ./.github/actions/run-benchmark
- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@v1
with:
name: Zsh Interactive Latency
tool: customSmallerIsBetter
output-file-path: benchmark-result.json
benchmark-data-dir-path: .
github-token: ${{ secrets.GITHUB_TOKEN }}
auto-push: true
alert-threshold: "150%"
comment-on-alert: true
comment-always: true
fail-on-alert: true
summary-always: true
alert-comment-cc-users: "@lemtoc"
- name: Clean benchmark temporary files
if: always()
shell: bash
run: |
rm -rf "$RUNNER_TEMP/zsh-bench"
rm -f zsh-bench-result.txt benchmark-result.json