Skip to content

Add copilot-setup-steps for Windows cloud agent env#543

Merged
zateutsch merged 2 commits into
mainfrom
nmetulev/copilot-windows-agent-setup
May 21, 2026
Merged

Add copilot-setup-steps for Windows cloud agent env#543
zateutsch merged 2 commits into
mainfrom
nmetulev/copilot-windows-agent-setup

Conversation

@nmetulev

Copy link
Copy Markdown
Member

The Copilot coding agent defaults to Ubuntu, but winappcli targets net10.0-windows10.0.19041.0, publishes NativeAOT win-x64/win-arm64, and relies on Windows-only tooling (makeappx, signtool, MSIX bundling, Pester sample tests). On Ubuntu the agent cannot dotnet build the solution, so it has no way to validate its own work.

What this does

Adds .github/workflows/copilot-setup-steps.yml pinned to windows-latest with:

  • .NET 10 (actions/setup-dotnet@v5) and Node 24 (actions/setup-node@v5) to match build-package.yml.
  • dotnet restore on the solution + npm ci in src/winapp-npm to warm caches.
  • A Debug build of WinApp.Cli.csproj to surface targeting-pack / restore issues before the agent starts.
  • Developer Mode reg key for MSIX / sparse-package work.
  • 30 min timeout (max is 59).

We deliberately skip the full build-cli.ps1 here — MSIX, NuGet, and sample-test packaging would eat most of the budget. The agent can run the full script on demand.

Before merging

Important

The Copilot integrated firewall is not compatible with Windows runners. After merge, disable it in Settings → Copilot → Coding agent → Firewall policy → Disabled, otherwise every agent task will silently fail networking.

The pull_request trigger on this file's own path means CI will run the setup once on this PR — that's the smoke test before it ever touches an agent session.

The Copilot coding agent defaults to Ubuntu, but winappcli targets
net10.0-windows10.0.19041.0, publishes NativeAOT win-x64/win-arm64, and
relies on Windows-only tooling (makeappx, signtool, MSIX bundling). On
Ubuntu the agent cannot dotnet build the solution, so it has no way to
validate its own work.

Add .github/workflows/copilot-setup-steps.yml pinned to windows-latest
with .NET 10 + Node 24, restoring both the C# solution and the npm
workspace, plus a warm Debug build of the CLI. We skip the full
build-cli.ps1 to stay well under the 30 min budget; the agent can run
the full script (MSIX, NuGet, samples) on demand.

NOTE: the Copilot integrated firewall is not compatible with Windows
runners. It must be disabled in Settings -> Copilot -> Coding agent ->
Firewall policy before this takes effect on agent tasks.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 20, 2026 00:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds a dedicated GitHub Actions workflow that provides Copilot Coding Agent “setup steps” on a Windows runner, ensuring the agent can restore and build this Windows-only toolchain (net10.0-windows10.0.19041.0, NativeAOT, MSIX tooling) before starting work.

Changes:

  • Introduces .github/workflows/copilot-setup-steps.yml with the required copilot-setup-steps job on windows-latest.
  • Installs .NET 10 and Node 24, enables Windows Developer Mode, restores .NET/npm dependencies, and performs a warm Debug CLI build.
  • Adds path-scoped push/pull_request triggers plus workflow_dispatch to smoke-test the setup when the workflow file changes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions

github-actions Bot commented May 20, 2026

Copy link
Copy Markdown
Contributor

Build Metrics Report

Binary Sizes

Artifact Baseline Current Delta
CLI (ARM64) 31.26 MB 31.26 MB ✅ 0.0 KB (0.00%)
CLI (x64) 31.61 MB 31.61 MB ✅ 0.0 KB (0.00%)
MSIX (ARM64) 13.13 MB 13.13 MB 📉 -0.3 KB (-0.00%)
MSIX (x64) 13.96 MB 13.96 MB 📈 +0.0 KB (+0.00%)
NPM Package 27.34 MB 27.34 MB 📉 -0.5 KB (-0.00%)
NuGet Package 27.43 MB 27.43 MB 📉 -0.1 KB (-0.00%)
VS Code Extension 20.15 MB 20.15 MB 📉 -0.2 KB (-0.00%)

Test Results

993 passed, 1 skipped out of 994 tests in 423.5s (-46.8s vs. baseline)

Test Coverage

16.7% line coverage, 34.8% branch coverage · ✅ no change vs. baseline

CLI Startup Time

37ms median (x64, winapp --version) · ✅ -5ms vs. baseline


Updated 2026-05-20 04:19:45 UTC · commit d9ca3bb · workflow run

@zateutsch zateutsch merged commit 8511467 into main May 21, 2026
23 checks passed
@zateutsch zateutsch deleted the nmetulev/copilot-windows-agent-setup branch May 21, 2026 14:35
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.

3 participants