Skip to content

Commit 3a5ebe7

Browse files
committed
Move Azure Login closer to signing, and collect MSBuild binlogs
1 parent ed1e896 commit 3a5ebe7

File tree

3 files changed

+18
-4
lines changed

3 files changed

+18
-4
lines changed

.github/workflows/ci-signed.yaml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,22 +36,33 @@ jobs:
3636
- name: Get .NET information
3737
run: dotnet --info
3838

39+
- name: "Build target: BuildAll"
40+
run: dotnet run --project tools/builder --no-launch-profile -- BuildAll --timing
41+
3942
- name: Login to Azure CLI
4043
uses: azure/login@v2
4144
with:
4245
client-id: ${{ vars.KEYVAULT_APP_ID }}
4346
tenant-id: ${{ vars.KEYVAULT_TENANT_ID }}
4447
subscription-id: ${{ vars.KEYVAULT_SUBSCRIPTION_ID }}
4548

46-
- name: "Build target: BuildAll & PublishPackages"
49+
- name: "Build target: PublishPackages"
4750
env:
4851
PUSH_APIKEY: ${{ secrets.FEEDZ_PUSH_KEY }}
4952
PUSH_URI: ${{ vars.FEEDZ_PUSH_URL }}
5053
SIGN_APP_ID: ${{ vars.KEYVAULT_APP_ID }}
5154
SIGN_CERT_NAME: ${{ vars.KEYVAULT_CERT_NAME }}
5255
SIGN_TIMESTAMP_URI: ${{ vars.KEYVAULT_TIMESTAMP_URL }}
5356
SIGN_VAULT_URI: ${{ vars.KEYVAULT_URL }}
54-
run: dotnet run --project tools/builder --no-launch-profile -- BuildAll PublishPackages --timing
57+
run: dotnet run --project tools/builder --no-launch-profile -- PublishPackages --timing
58+
59+
- name: "Upload artifact: build"
60+
uses: actions/upload-artifact@v4
61+
with:
62+
name: build
63+
path: artifacts/build
64+
compression-level: 9
65+
if: always()
5566

5667
- name: "Upload artifact: test"
5768
uses: actions/upload-artifact@v4

tools/builder/common

tools/builder/targets/Build.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using System.IO;
12
using System.Threading.Tasks;
23
using Xunit.BuildTools.Models;
34

@@ -9,6 +10,8 @@ public static partial Task PerformBuild(BuildContext context)
910
{
1011
context.BuildStep("Compiling binaries");
1112

12-
return context.Exec("dotnet", $"msbuild -nologo -maxCpuCount -restore:False -verbosity:{context.Verbosity} -p:Configuration={context.ConfigurationText} -p:PackageOutputPath={context.PackageOutputFolder}");
13+
var buildLog = Path.Combine(context.BuildArtifactsFolder, "build.binlog");
14+
15+
return context.Exec("dotnet", $"msbuild -nologo -maxCpuCount -restore:False -verbosity:{context.Verbosity} -property:Configuration={context.ConfigurationText} -p:PackageOutputPath={context.PackageOutputFolder} -binaryLogger:{buildLog}");
1316
}
1417
}

0 commit comments

Comments
 (0)