99 - ' .bashrc'
1010 - ' .aliases'
1111 - ' .github/workflows/install-dotfiles.yml'
12- - ' .github/scripts/benchmark.sh'
12+ - ' .github/scripts/benchmark-nvim .sh'
1313 - ' .github/scripts/benchmark-bash.sh'
14+ - ' .github/scripts/compare-benchmark.py'
1415 pull_request :
1516 paths :
1617 - ' scripts/bootstrap.sh'
1718 - ' .config/nvim/**'
1819 - ' .bashrc'
1920 - ' .aliases'
2021 - ' .github/workflows/install-dotfiles.yml'
21- - ' .github/scripts/benchmark.sh'
22+ - ' .github/scripts/benchmark-nvim .sh'
2223 - ' .github/scripts/benchmark-bash.sh'
24+ - ' .github/scripts/compare-benchmark.py'
2325 schedule :
2426 - cron : ' 0 3 * * 6'
2527 workflow_dispatch :
4648 - name : Install prerequisites
4749 run : |
4850 apt-get update
49- apt-get install -y git curl sudo tree xz-utils fontconfig gcc make
51+ apt-get install -y git curl sudo tree xz-utils fontconfig gcc make python3
5052
5153 - name : Create test user
5254 run : |
@@ -282,7 +284,7 @@ jobs:
282284 su - clay -c '
283285 export PATH="$HOME/.pixi/bin:$PATH"
284286 cd ~/dotfiles
285- bash .github/scripts/benchmark.sh /tmp/result.json
287+ bash .github/scripts/benchmark-nvim .sh /tmp/result.json
286288 cat /tmp/result.json
287289 '
288290
@@ -303,34 +305,21 @@ jobs:
303305 restore-keys : |
304306 ${{ runner.os }}-benchmark-history-
305307
306- - name : Compare against benchmark history (alert on regression)
307- uses : benchmark-action/github-action-benchmark@v1
308- with :
309- name : nvim startup (Ubuntu)
310- tool : customSmallerIsBetter
311- output-file-path : /tmp/result.json
312- external-data-json-path : /tmp/cache/benchmark-data.json
313- alert-threshold : ' 150%'
314- comment-on-alert : true
315- fail-on-alert : false
316- alert-comment-cc-users : ' @claydugo'
317- github-token : ${{ secrets.GITHUB_TOKEN }}
318-
319- - name : Compare bash startup against history (alert on regression)
320- uses : benchmark-action/github-action-benchmark@v1
321- with :
322- name : bash startup (Ubuntu)
323- tool : customSmallerIsBetter
324- output-file-path : /tmp/bash-result.json
325- external-data-json-path : /tmp/cache/benchmark-data.json
326- alert-threshold : ' 150%'
327- comment-on-alert : true
328- fail-on-alert : false
329- alert-comment-cc-users : ' @claydugo'
330- github-token : ${{ secrets.GITHUB_TOKEN }}
308+ - name : Compare against rolling baseline (nvim + bash)
309+ env :
310+ RECORD : ${{ github.event_name == 'push' && '--record' || '' }}
311+ GITHUB_SHA : ${{ github.sha }}
312+ run : |
313+ chown -R clay:clay /tmp/cache 2>/dev/null || true
314+ su - clay -c "
315+ export GITHUB_SHA='${GITHUB_SHA}'
316+ cd ~/dotfiles
317+ python3 .github/scripts/compare-benchmark.py /tmp/result.json /tmp/cache 'nvim startup (Ubuntu)' ${RECORD}
318+ python3 .github/scripts/compare-benchmark.py /tmp/bash-result.json /tmp/cache 'bash startup (Ubuntu)' ${RECORD}
319+ "
331320
332321 - name : Save benchmark history
333- if : always()
322+ if : github.event_name == 'push'
334323 uses : actions/cache/save@v4
335324 with :
336325 path : /tmp/cache
@@ -458,7 +447,7 @@ jobs:
458447 run : |
459448 export PATH="$HOME/.pixi/bin:$PATH"
460449 cd "$HOME/dotfiles"
461- bash .github/scripts/benchmark.sh /tmp/result.json
450+ bash .github/scripts/benchmark-nvim .sh /tmp/result.json
462451 cat /tmp/result.json
463452
464453 - name : Measure bash startup
@@ -476,34 +465,16 @@ jobs:
476465 restore-keys : |
477466 ${{ runner.os }}-benchmark-history-
478467
479- - name : Compare against benchmark history (alert on regression)
480- uses : benchmark-action/github-action-benchmark@v1
481- with :
482- name : nvim startup (macOS)
483- tool : customSmallerIsBetter
484- output-file-path : /tmp/result.json
485- external-data-json-path : /tmp/cache/benchmark-data.json
486- alert-threshold : ' 150%'
487- comment-on-alert : true
488- fail-on-alert : false
489- alert-comment-cc-users : ' @claydugo'
490- github-token : ${{ secrets.GITHUB_TOKEN }}
491-
492- - name : Compare bash startup against history (alert on regression)
493- uses : benchmark-action/github-action-benchmark@v1
494- with :
495- name : bash startup (macOS)
496- tool : customSmallerIsBetter
497- output-file-path : /tmp/bash-result.json
498- external-data-json-path : /tmp/cache/benchmark-data.json
499- alert-threshold : ' 150%'
500- comment-on-alert : true
501- fail-on-alert : false
502- alert-comment-cc-users : ' @claydugo'
503- github-token : ${{ secrets.GITHUB_TOKEN }}
468+ - name : Compare against rolling baseline (nvim + bash)
469+ env :
470+ RECORD : ${{ github.event_name == 'push' && '--record' || '' }}
471+ run : |
472+ cd "$HOME/dotfiles"
473+ python3 .github/scripts/compare-benchmark.py /tmp/result.json /tmp/cache 'nvim startup (macOS)' ${RECORD}
474+ python3 .github/scripts/compare-benchmark.py /tmp/bash-result.json /tmp/cache 'bash startup (macOS)' ${RECORD}
504475
505476 - name : Save benchmark history
506- if : always()
477+ if : github.event_name == 'push'
507478 uses : actions/cache/save@v4
508479 with :
509480 path : /tmp/cache
0 commit comments