Skip to content

Commit

Permalink
Add instructions to run CI locally on any commit
Browse files Browse the repository at this point in the history
  • Loading branch information
spacefrogg committed Jul 1, 2024
1 parent 09e8b8d commit aae3212
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,17 @@ Suppose Nix is set up correctly, you just run:
```sh
nix run .#makes -- . /build
```

## Locally reproduce a CI run

Suppose you want to produce a CI run locally, maybe because it has failed on GitHub or because you want to run it on a different commit of a pull request that consist of multiple commits.
You can adapt the previously shown call to `makes` to do that; replace `<rev>` with the commit hash of interest:

```sh
# use the commit directly from GitHub
nix run .#makes -- github:Barkhausen-Institut/koika@<rev> /build
# alternatively, if the commit is already locally available
nix run .#makes -- local:"$PWD"@<rev> /build
```

`makes` downloads the repository in the state given in `<rev>` and executes the CI script referenced via `/build`.

0 comments on commit aae3212

Please sign in to comment.