copilot-setup-steps: add Nix dev shell setup, CI cache restore, and Copilot instructions#14321
Conversation
Agent-Logs-Url: https://github.com/ocaml/dune/sessions/37b01ae9-426e-4f7f-a227-8b5ad104a68d Co-authored-by: Alizter <8614547+Alizter@users.noreply.github.com>
Agent-Logs-Url: https://github.com/ocaml/dune/sessions/6cbddda1-b0da-47af-868d-dccfec173a86 Co-authored-by: Alizter <8614547+Alizter@users.noreply.github.com>
Agent-Logs-Url: https://github.com/ocaml/dune/sessions/bc12efdd-9f18-48b6-b8c2-df5ccf2933c6 Co-authored-by: Alizter <8614547+Alizter@users.noreply.github.com>
|
@copilot The PR description isn't very good. Please update it to mention the entire change rather than just the final one. |
Updated the PR description to cover all three commits:
|
| save: false | ||
|
|
||
| - name: Enter Nix dev shell | ||
| run: nix develop -c true |
There was a problem hiding this comment.
Fixed in 3a271e4. The step now runs nix develop -c bash -c 'echo "$PATH"' | tr ':' '\n' >> "$GITHUB_PATH", which exports all the dev shell's PATH entries (the Nix store paths containing OCaml, opam, etc.) into $GITHUB_PATH so they're available to the Copilot agent in subsequent steps.
Agent-Logs-Url: https://github.com/ocaml/dune/sessions/afd41894-6fde-4f3c-aca2-8d82331c4ba6 Co-authored-by: Alizter <8614547+Alizter@users.noreply.github.com>
|
@copilot No, I suppose you can leave it as -c true for now. Later when copilot is running commands it will need to remember to use |
Agent-Logs-Url: https://github.com/ocaml/dune/sessions/c21108e1-647e-42fc-a870-dba08011ceb3 Co-authored-by: Alizter <8614547+Alizter@users.noreply.github.com>
|
@copilot please come up with a plan on adding copilot instructions. It should probably have commands based on nix. Read AGENTS.md for an idea of what you should go for. If possible link directly to that file, but recall that when you first start up your dev environment you will need to call |
Agent-Logs-Url: https://github.com/ocaml/dune/sessions/4b3c63ec-a62f-44c3-a974-b0f1e6e20a96 Co-authored-by: Alizter <8614547+Alizter@users.noreply.github.com>
Added
|
Sets up the Copilot coding agent environment for this repository with a Nix dev shell, CI cache integration, and agent instructions.
Changes Made
.github/workflows/copilot-setup-steps.ymlwith steps to install Nix (nixbuild/nix-quick-install-action@v34) and warm the dev shell vianix develop -c truenix-community/cache-nix-action@v7using the same primary key and fallback prefix pattern (nix-Linux-nix-test--) as the main CI job, so the warmed Nix store is reused rather than rebuiltsave: false) — setup steps consume the CI cache but never write their own entry, keeping cache management solely in CI.github/copilot-instructions.mdthat links toAGENTS.mdfor full development guidance and documents the Nix-specific requirements:nix develop -c make bootstrap(required once on a fresh checkout before any other commands)nix develop -cprefix