Skip to content

Commit

Permalink
Set up a simple CI profiling step using nixprof
Browse files Browse the repository at this point in the history
  • Loading branch information
yvan-sraka committed Jan 15, 2024
1 parent a00e67f commit cb66a03
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/lints.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ defaults:
env:
NIX_PATH: "nixpkgs=channel:nixos-unstable"
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# PR_NUMBER: ${{ github.event.number }}

jobs:
deadnix:
Expand All @@ -30,3 +32,19 @@ jobs:
git diff >"${TMPFILE}"
git stash -u && git stash drop
nix-shell -p reviewdog --run "reviewdog -f=diff -f.diff.strip=1 -reporter=github-pr-review < \"${TMPFILE}\""
nixprof:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v22
with:
nix_path: nixpkgs=channel:nixos-unstable
- run: |
nix profile install github:Kha/nixprof
nixprof record nix develop .#ghc8107 --accept-flake-config
nixprof report -p
nixprof report -a
nixprof report -s
# FIXME: is that the right way to publish a report on GitHub?
# curl -s -H "Authorization: token $GITHUB_TOKEN" -X POST -d "{\"body\": \"$report\"}" "https://api.github.com/repos/input-output-hk/haskell.nix/issues/$PR_NUMBER/comments"

0 comments on commit cb66a03

Please sign in to comment.