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
8
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat(ci): Add benchmark to PRs (#316)

authored by

Victor Borja and committed by
GitHub
192d83ab cfa2d158

+47 -12
+9 -2
.github/ISSUE_TEMPLATE/bug_report.md
··· 1 1 --- 2 2 3 - name: Bug report 4 - about: Issues are testable/actionable tasks. Use Discussions for questions, feature-requests, problem solving. 3 + name: Bug report with tests 4 + about: "Issues are for maintainer's time-allocated tasks! Use Discussions for questions, feature-requests, problem solving, etc." 5 5 title: 'BUG: ' 6 6 labels: 'bug' 7 7 assignees: '' 8 8 9 9 --- 10 + 11 + > [!NOTE] 12 + > The BUG tag is for failing code with tests. 13 + > DO-NOT use it unless you have code for a failing test. 14 + > You are welcome to send either bogus repo or just a `denTest` code snippet reproducing a bug. 15 + > Issues are for maintainer's time-allocated tasks! Use Discussions for questions, feature-requests, problem solving, etc. 16 + 10 17 Please read https://den.oeiuwq.com/tutorials/bogus/ first. 11 18 12 19 If you have found a bug, please share a reproduction repository with us.
+30
.github/workflows/benchmark.yml
··· 1 + name: benchmark 2 + on: 3 + pull_request: 4 + types: [labeled, opened, synchronize, reopened, ready_for_review] 5 + concurrency: 6 + group: ${{ github.workflow }}-${{ github.ref }} 7 + cancel-in-progress: true 8 + env: 9 + NIX_PATH: "nixpkgs=https://channels.nixos.org/nixpkgs-unstable/nixexprs.tar.xz" 10 + jobs: 11 + approved: 12 + name: approved 13 + runs-on: ubuntu-latest 14 + if: ${{contains(github.event.pull_request.labels.*.name, 'approved')}} 15 + steps: 16 + - run: true 17 + benchmark: 18 + needs: [approved] 19 + runs-on: ubuntu-latest 20 + if: ${{!contains(github.event.pull_request.labels.*.name, 'bench-skip')}} 21 + steps: 22 + - uses: wimpysworld/nothing-but-nix@v10 23 + - uses: cachix/install-nix-action@v31 24 + - uses: DeterminateSystems/magic-nix-cache-action@v13 25 + - uses: actions/checkout@v6 26 + - run: nix develop -c just -- help 27 + - 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')}}
+1
.github/workflows/test.yml
··· 1 + name: test 1 2 on: 2 3 push: 3 4 branches: [main]
+4 -4
Justfile
··· 45 45 nix flake check --override-input target . github:vic/checkmate 46 46 47 47 [arg("tmpdir",long="tmpdir"), arg("head",long="head",short="h"), arg("base",long="base",short="b"), arg("warm",long="warm",short="w"), arg("runs",long="runs",short="r")] 48 - bench tmpdir="/tmp" head="HEAD" base="refs/remotes/origin/main" warm="10" runs="20": 48 + bench tmpdir="/tmp" head="HEAD" base="refs/remotes/origin/main" warm="1" runs="1" *args: 49 49 rm -rf "{{tmpdir}}/den-head" "{{tmpdir}}/den-base" 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 - hyperfine -m "{{runs}}" -w "{{warm}}" --show-output \ 53 - -n head "cd {{tmpdir}}/den-head && nix-shell ./shell.nix --run 'just ci'" \ 54 - -n base "cd {{tmpdir}}/den-base && nix-shell ./shell.nix --run 'just ci'" 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'" 55 55 rm -rf "{{tmpdir}}/den-head" "{{tmpdir}}/den-base"
+2 -4
templates/bogus/.github/workflows/test.yml
··· 9 9 strategy: 10 10 fail-fast: false 11 11 matrix: 12 - os: [ubuntu-latest, macos-latest] 13 - # add more releases or commits to test 14 - # rev: [ "main", "v0.8.0", "caa328d" ] 15 - rev: ["main"] 12 + os: [ubuntu-latest] 13 + rev: ["main"] # Add other releases, `latest` or commits 16 14 name: Den (rev ${{matrix.rev}}) 17 15 runs-on: ${{matrix.os}} 18 16 steps:
+1 -2
templates/microvm/README.md
··· 22 22 nixos-rebuild build --flake .#server 23 23 ``` 24 24 25 - See https://microvm-nix.github.io/microvm.nix/host.html\ 26 - https://microvm-nix.github.io/microvm.nix/declarative.html 25 + See https://microvm-nix.github.io/microvm.nix/host.html https://microvm-nix.github.io/microvm.nix/declarative.html