Modular, context-aware and aspect-oriented dendritic Nix configurations. Discussions: https://oeiuwq.zulipchat.com/join/nqp26cd4kngon6mo3ncgnuap/ den.oeiuwq.com
configurations den dendritic nix aspect oriented

fix(ci): benchmark compare head against base (#321)

authored by oeiuwq.com and committed by

GitHub f7c19da6 244d1623

+6 -7
+4 -5
.github/workflows/benchmark.yml
··· 11 11 approved: 12 12 name: approved 13 13 runs-on: ubuntu-latest 14 - if: ${{contains(github.event.pull_request.labels.*.name, 'approved')}} 14 + if: ${{contains(github.event.pull_request.labels.*.name, 'bench-approved')}} 15 15 steps: 16 16 - run: true 17 17 benchmark: 18 18 needs: [approved] 19 19 runs-on: ubuntu-latest 20 - if: ${{!contains(github.event.pull_request.labels.*.name, 'bench-skip')}} 21 20 steps: 22 21 - uses: wimpysworld/nothing-but-nix@v10 23 22 - uses: cachix/install-nix-action@v31 ··· 25 24 - uses: actions/checkout@v6 26 25 - run: nix develop -c just -- help 27 26 - run: git fetch origin ${{github.base_ref}} --depth 1 28 - - run: nix develop -c just -- bench --head HEAD --base origin/${{github.base_ref}} --warm 1 --runs 1 -- --show-output 2>&1 | tee "$GITHUB_STEP_SUMMARY" 29 - - run: grep "faster than base" "$GITHUB_STEP_SUMMARY" 30 - if: ${{!contains(github.event.pull_request.labels.*.name, 'bench-approved')}} 27 + - run: nix develop -c just -- bench --head HEAD --base origin/${{github.base_ref}} --warm 1 --runs 1 -- --show-output 2>&1 | tee "$GITHUB_STEP_SUMMARY" /tmp/den-bench.log 28 + - run: grep "faster than base" "/tmp/den-bench.log" 29 + if: ${{!contains(github.event.pull_request.labels.*.name, 'bench-skip')}}
+2 -2
Justfile
··· 50 50 git clone --local --depth 1 --revision "$(git rev-list -n1 {{head}})" .git "{{tmpdir}}/den-head" 2>/dev/null 51 51 git clone --local --depth 1 --revision "$(git rev-list -n1 {{base}})" .git "{{tmpdir}}/den-base" 2>/dev/null 52 52 hyperfine -m "{{runs}}" -w "{{warm}}" {{args}} \ 53 - -n head "cd {{tmpdir}}/den-head && nix-shell ./shell.nix --run 'just ci | grep successful'" \ 54 - -n base "cd {{tmpdir}}/den-base && nix-shell ./shell.nix --run 'just ci | grep successful'" 53 + -n head "cd {{tmpdir}}/den-head && nix-shell ./shell.nix --run 'just ci 2>&1 | grep successful'" \ 54 + -n base "cd {{tmpdir}}/den-base && nix-shell ./shell.nix --run 'just ci 2>&1 | grep successful'" 55 55 rm -rf "{{tmpdir}}/den-head" "{{tmpdir}}/den-base"