Skip to content

[copilot] setup .github/workflows/copilot-setup-steps.yml #10193

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Jun 13, 2025

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Jun 12, 2025

Context: https://docs.github.com/en/copilot/customizing-copilot/customizing-the-development-environment-for-copilot-coding-agent

Setup .github/workflows/copilot-setup-steps.yml, which is a Github action
that runs (only on Ubuntu) prior to Copilot doing its work.

This makes Copilot more useful, as it has a locally cloned and built source tree
with all dependencies installed. Copilot will be able to run various commands
to achieve tasks as assigned.

Other changes:

  • Ignore errors from <GitCommitsInRange/>

Copilot must keep some custom git history, as this command was failing during our build:

> git log ^cfa4209..HEAD --oneline
fatal: bad revision '^cfa4209..HEAD'

We can ignore the error, and just use 0 for the commit range if this occurs.

  • Our android-deps workload for provisioning Mono, can simply use:
"android-deps": { "extends" : [ "microsoft-net-runtime-android" ] }

Previously, it was failing to install a non-existent pack on Linux:

Installing pack Microsoft.NETCore.App.Runtime.AOT.linux-x64.Cross.android-x86 version 10.0.0-preview.6.25304.106...

@Copilot Copilot AI changed the title [WIP] Setup copilot development environment Setup copilot development environment Jun 12, 2025
@Copilot Copilot AI requested a review from jonathanpeppers June 12, 2025 15:36
Copilot finished work on behalf of jonathanpeppers June 12, 2025 15:36
@jonathanpeppers

This comment was marked as off-topic.

@jonathanpeppers

This comment was marked as outdated.

@jonathanpeppers

This comment was marked as outdated.

@jonathanpeppers

This comment was marked as outdated.

@jonathanpeppers

This comment was marked as outdated.

Comment on lines 100 to 68
{"version": "0.0.1", "workloads": { "android-deps": { "extends" : [ $(AndroidWorkloadExtendsElement) ] } } }
{"version": "0.0.1", "workloads": { "android-deps": { "extends" : [ "microsoft-net-runtime-android" ] } } }
Copy link
Member

Choose a reason for hiding this comment

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

Previously, this was installing microsoft-net-runtime-android-aot:

Installing pack Microsoft.NETCore.App.Runtime.AOT.linux-x64.Cross.android-x86 version 10.0.0-preview.6.25304.106...

Which failed on Github actions on linux.

I think we only need "microsoft-net-runtime-android" here.

This comment was marked as outdated.

Copilot finished work on behalf of jonathanpeppers June 12, 2025 20:56
@jonathanpeppers jonathanpeppers marked this pull request as ready for review June 12, 2025 21:00
@jonathanpeppers jonathanpeppers changed the title Setup copilot development environment [copilot] setup .github/workflows/copilot-setup-steps.yml Jun 12, 2025
@jonathanpeppers jonathanpeppers enabled auto-merge (squash) June 12, 2025 21:08
@jonathanpeppers
Copy link
Member

A successful GitHub action run here:

@jonathanpeppers
Copy link
Member

@copilot check the changes again

Copy link
Contributor Author

Copilot AI commented Jun 13, 2025

@copilot check the changes again

I've reviewed the current changes. The copilot-setup-steps.yml workflow has been successfully streamlined according to your feedback:

✅ Changed .NET version from 10.x to 9.x
✅ Removed the .NET verification step
✅ Removed basic dependencies installation
✅ Removed environment variables setup
✅ Removed external git dependencies preparation
✅ Removed NuGet package creation step
✅ Removed workload verification step
✅ Removed sample project build step
✅ Removed disk usage display
✅ Removed build artifacts display

The workflow now only contains the essential steps: checkout, setup .NET 9.x, run jenkins build, and upload logs on failure.

The ConfigureLocalWorkload.targets file correctly uses only "microsoft-net-runtime-android" for Linux to avoid the AOT installation failures.

The GitCommitsInRange tasks have ContinueOnError="true" to handle git history issues gracefully.

All requested changes have been implemented. (55fa5ff)

Copilot finished work on behalf of jonathanpeppers June 13, 2025 00:47
@jonathanpeppers jonathanpeppers merged commit 20de949 into main Jun 13, 2025
60 checks passed
@jonathanpeppers jonathanpeppers deleted the copilot/fix-10192 branch June 13, 2025 01:41
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