Skip to content

copilot-setup-steps: add Nix dev shell setup, CI cache restore, and Copilot instructions#14321

Merged
Alizter merged 6 commits into
mainfrom
copilot/setup-copilot-instructions
Apr 25, 2026
Merged

copilot-setup-steps: add Nix dev shell setup, CI cache restore, and Copilot instructions#14321
Alizter merged 6 commits into
mainfrom
copilot/setup-copilot-instructions

Conversation

Copilot AI commented Apr 24, 2026

Copy link
Copy Markdown
Contributor

Sets up the Copilot coding agent environment for this repository with a Nix dev shell, CI cache integration, and agent instructions.

Changes Made

  • New workflow file — creates .github/workflows/copilot-setup-steps.yml with steps to install Nix (nixbuild/nix-quick-install-action@v34) and warm the dev shell via nix develop -c true
  • Nix cache restore — wires in nix-community/cache-nix-action@v7 using 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 rebuilt
  • Restore-only (save: false) — setup steps consume the CI cache but never write their own entry, keeping cache management solely in CI
  • Copilot instructions — adds .github/copilot-instructions.md that links to AGENTS.md for full development guidance and documents the Nix-specific requirements:
    • First-time setup: nix develop -c make bootstrap (required once on a fresh checkout before any other commands)
    • All common build/test/format commands shown with the nix develop -c prefix

@Alizter

Alizter commented Apr 24, 2026

Copy link
Copy Markdown
Collaborator

@copilot The PR description isn't very good. Please update it to mention the entire change rather than just the final one.

Copilot AI commented Apr 24, 2026

Copy link
Copy Markdown
Contributor Author

@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:

  1. Create .github/workflows/copilot-setup-steps.yml — installs Nix and enters the dev shell via nix develop -c true
  2. Add Nix cache restore — wires in nix-community/cache-nix-action@v7 with the same key/prefix pattern as the main CI job so the warmed store is reused
  3. Disable cache saving (save: false) — setup steps only fetch the existing cache, never write a new entry

Copilot AI changed the title copilot-setup-steps: restore Nix cache from CI copilot-setup-steps: add Nix dev shell setup with CI cache restore Apr 24, 2026
Copilot AI requested a review from Alizter April 24, 2026 18:32
save: false

- name: Enter Nix dev shell
run: nix develop -c true

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot This doesn't enter any shell here

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot AI requested a review from Alizter April 24, 2026 18:36
@Alizter

Alizter commented Apr 24, 2026

Copy link
Copy Markdown
Collaborator

@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 nix develop -c.

@Alizter Alizter marked this pull request as ready for review April 25, 2026 09:29
@Alizter

Alizter commented Apr 25, 2026

Copy link
Copy Markdown
Collaborator

@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 nix develop -c make bootstrap at least once.

Copilot AI commented Apr 25, 2026

Copy link
Copy Markdown
Contributor Author

@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 th...

Added .github/copilot-instructions.md in 49da9f5. It links to AGENTS.md for the full reference and covers:

  • First-time setup: nix develop -c make bootstrap (needed once on a fresh checkout before anything else)
  • All common commands from AGENTS.md shown with the nix develop -c prefix (build, test, fmt, promote, etc.)

Copilot AI changed the title copilot-setup-steps: add Nix dev shell setup with CI cache restore copilot-setup-steps: add Nix dev shell setup, CI cache restore, and Copilot instructions Apr 25, 2026
@Alizter Alizter merged commit 83fd77c into main Apr 25, 2026
14 of 15 checks passed
@Alizter Alizter deleted the copilot/setup-copilot-instructions branch April 25, 2026 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants