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
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,22 @@ Bump to [Dependency Name] [Dependency Version]

## Contributing Guidelines

### Copilot Development Environment Setup

For GitHub Copilot development, use the automated setup workflow:

- Run `.github/workflows/copilot-setup-steps.yml` via GitHub Actions workflow dispatch
- This builds the repository from source and creates a local Android workload
- Sets up .NET 10 Preview with all dependencies required for development
- Verifies the setup by building sample projects
- Provides a complete development environment for AI-assisted coding

The workflow runs the essential build steps:
1. `make prepare-external-git-dependencies` - Sets up external dependencies
2. `make jenkins` - Builds the complete project with autoprovision
3. `make create-nupkgs` - Creates installable packages
4. Verifies the local workload setup works correctly

### Updating AI Instructions
- Always update `copilot-instructions.md` when making changes that would affect how AI assistants should work with the codebase
- This includes new patterns, conventions, build processes, or significant structural changes
87 changes: 87 additions & 0 deletions .github/workflows/copilot-setup-steps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
name: "Copilot Setup Steps"

on: workflow_dispatch

jobs:
copilot-setup-steps:
runs-on: ubuntu-latest
timeout-minutes: 120

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive

- name: Setup .NET 10 Preview
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.100-preview.6.25304.106'

- name: Verify .NET installation
run: |
dotnet --version
echo "Checking .NET runtimes:"
dotnet --list-runtimes

- name: Install basic dependencies
run: |
sudo apt-get update
sudo apt-get install -y curl wget git build-essential

- name: Set environment variables
run: |
echo "DOTNET_NOLOGO=true" >> $GITHUB_ENV
echo "DOTNET_CLI_TELEMETRY_OPTOUT=true" >> $GITHUB_ENV

- name: Prepare external git dependencies
run: |
echo "=== Preparing external git dependencies ==="
make prepare-external-git-dependencies PREPARE_CI=1 CONFIGURATION=Debug
timeout-minutes: 30

- name: Run jenkins build
run: |
echo "=== Running jenkins build (this may take a while) ==="
make jenkins PREPARE_CI=1 PREPARE_AUTOPROVISION=1 CONFIGURATION=Debug
timeout-minutes: 60

- name: Create NuGet packages
run: |
echo "=== Creating NuGet packages ==="
make create-nupkgs CONFIGURATION=Debug
timeout-minutes: 20

- name: Verify local workload setup
run: |
if [ -f "./dotnet-local.sh" ]; then
./dotnet-local.sh --version
./dotnet-local.sh workload list
else
echo "dotnet-local.sh not found, checking for dotnet in bin/"
find bin/ -name "dotnet" -type f || echo "No local dotnet found"
fi

- name: Test building sample project
run: |
if [ -f "./dotnet-local.sh" ]; then
echo "=== Building HelloWorld sample ==="
cd samples/HelloWorld/HelloLibrary
../../../dotnet-local.sh restore HelloLibrary.DotNet.csproj
../../../dotnet-local.sh build HelloLibrary.DotNet.csproj --no-restore
echo "=== HelloLibrary build completed successfully ==="
else
echo "Skipping sample build - dotnet-local.sh not available"
fi

- name: Display disk usage
run: df -h

- name: Show build artifacts
run: |
echo "=== Checking bin/ directory ==="
ls -la bin/ || echo "bin/ directory not found"
echo "=== Checking for packs ==="
find bin/ -name "*packs*" -type d || echo "No packs directories found"
echo "=== Checking for Android workload ==="
find bin/ -name "*Android*" -type d || echo "No Android directories found"
Loading