ci: add Copilot cloud agent setup workflow#10
Merged
Conversation
1286eca to
1a96b3f
Compare
1a96b3f to
9d35e26
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
.github/workflows/copilot-setup-steps.ymlso Copilot's cloud agent boots into a working dev shell with cached toolchain artifacts.Per the docs, the file must live at this exact path and contain a job named
copilot-setup-steps; its steps run onubuntu-latestbefore each agent session, and the resulting filesystem is snapshotted as the agent's starting state.What the workflow does
DeterminateSystems/nix-installer-action).firefly-toolboxas a substituter viacachix/cachix-action@v15— read-only, no auth token, written to/etc/nix/nix.confsonix developpulls toolchain artifacts from the cache instead of building them./nix/store(nix develop --command true).direnv+nix-direnv.direnv exec . true— this materializes the.turnkey/*cell symlinks, links.buckconfigto the Nix-generated config, and syncsgo-deps.toml/rust-deps.toml. Sanity check verifiesbuck2,bw,tk,jj,go,cargoare all on PATH.$GITHUB_ENVso the agent can invoke tools without prefixing every command withdirenv exec.Why
buck2 builddoesn't have to wait on cell materialization or deps-file regeneration.nix.conflevel (instead of relying on the flake'snixConfig) avoids the trusted-users prompt, which the agent can't answer.Test plan
mainand it completes successfully.buck2,bw,tk,jj,go,cargoare on PATH from the agent's first command.buck2 build //experimental/...without re-fetching toolchain artifacts.Follow-ups worth verifying after first run
$GITHUB_ENVsurvives into the agent session via the snapshot; if not, AGENTS.md should add guidance to prefix commands withdirenv exec . ….snapshotjob setting persists/nix/storebetween sessions (would make cachix fetches a one-time cost).