Skip to content

Commit 4d4739d

Browse files
[copilot] allow copilot-setup-steps.yml to fail (#1193)
We found Copilot can go off track if: * Copilot commits a build error (of any kind). * You comment suggesting how to fix the build error. * Copilot setup steps will now fail, and Copilot can't fix it! So, once you are in this state, you can't really get Copilot back on track unless you manually fix it. Going forward, we should: * Allow the "build" step to fail * Upload the logs as an artifact Copilot should be able to do its work with a failing build. Other changes: * Update to .NET 9 / 10. * This caused disk space to fill! * To solve this, I made it only build `net9.0-android` on GitHub actions. * This made the disk usage lower, build time shorter.
1 parent df3bb73 commit 4d4739d

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

.github/workflows/copilot-setup-steps.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,7 @@ jobs:
1313
- name: Setup .NET
1414
uses: actions/setup-dotnet@v4
1515
with:
16-
dotnet-version: '8.x'
17-
18-
- name: Install Cake .NET Tool
19-
run: dotnet tool install -g cake.tool
16+
dotnet-version: '9.x'
2017

2118
- name: Install Android workload
2219
run: dotnet workload install android
@@ -27,8 +24,12 @@ jobs:
2724
distribution: 'microsoft'
2825
java-version: '11'
2926

27+
- name: Restore dotnet tools
28+
run: dotnet tool restore
29+
3030
- name: Run dotnet cake
3131
run: dotnet cake
32+
continue-on-error: true
3233

3334
- name: Display environment info
3435
run: |

Directory.Build.props

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
<_DefaultTargetFrameworkVersionNext>10.0</_DefaultTargetFrameworkVersionNext>
1717
<_DefaultTargetFrameworkNext>net$(_DefaultTargetFrameworkVersionNext)-android$(_DefaultPlatformVersionNext).0</_DefaultTargetFrameworkNext>
1818
<!-- combined -->
19-
<_DefaultTargetFrameworks>$(_DefaultTargetFrameworkBase);$(_DefaultTargetFrameworkNext)</_DefaultTargetFrameworks>
19+
<_DefaultTargetFrameworks Condition=" '$(GITHUB_ACTIONS)' != 'true' ">$(_DefaultTargetFrameworkBase);$(_DefaultTargetFrameworkNext)</_DefaultTargetFrameworks>
20+
<_DefaultTargetFrameworks Condition=" '$(GITHUB_ACTIONS)' == 'true' ">$(_DefaultTargetFrameworkBase)</_DefaultTargetFrameworks>
2021

2122
<CheckEolWorkloads>false</CheckEolWorkloads>
2223

0 commit comments

Comments
 (0)