Skip to content

Commit

Permalink
Move CI build to Windows, disable NetFx tests on Mono (#163)
Browse files Browse the repository at this point in the history
  • Loading branch information
bradwilson authored Oct 13, 2023
1 parent 989128a commit 24e6844
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 50 deletions.
58 changes: 8 additions & 50 deletions .github/workflows/push-main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
jobs:
build:
name: "Build"
runs-on: ubuntu-22.04
runs-on: windows-latest
env:
DOTNET_NOLOGO: true
steps:
Expand All @@ -32,58 +32,9 @@ jobs:
- name: Get .NET information
run: dotnet --info

- name: Get Mono information
run: mono --version

- name: "Build target: BuildAll"
run: dotnet run --project tools/builder --no-launch-profile -- BuildAll --timing

- name: "Upload artifact: test"
uses: actions/upload-artifact@v3
with:
name: test
path: artifacts/test
if: always()

- name: "Upload artifact: packages"
uses: actions/upload-artifact@v3
with:
name: packages
path: artifacts/packages
if: always()

publish:
name: "Sign and Publish"
runs-on: windows-latest
needs: build
env:
DOTNET_NOLOGO: true
steps:
- name: Clone source
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true

- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v1

- name: Install .NET SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
6.0.x
7.0.x
- name: Get .NET information
run: dotnet --info

- name: "Download artifact: packages"
uses: actions/download-artifact@v3
with:
name: packages
path: artifacts/packages

- name: "Build target: PublishPackages"
env:
PUSH_APIKEY: ${{ secrets.PUSH_APIKEY }}
Expand All @@ -97,6 +48,13 @@ jobs:
SIGN_VAULT_URI: ${{ secrets.SIGN_VAULT_URI }}
run: dotnet run --project tools/builder --no-launch-profile -- PublishPackages --timing

- name: "Upload artifact: test"
uses: actions/upload-artifact@v3
with:
name: test
path: artifacts/test
if: always()

- name: "Upload artifact: packages"
uses: actions/upload-artifact@v3
with:
Expand Down
9 changes: 9 additions & 0 deletions tools/builder/targets/TestFx.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System;
using System.IO;
using System.Threading.Tasks;
using Xunit.BuildTools.Models;
Expand All @@ -14,6 +15,14 @@ public static Task OnExecute(BuildContext context)
{
context.BuildStep("Running .NET Framework tests");

if (context.NeedMono)
{
context.WriteLineColor(ConsoleColor.Yellow, "Skipping .NET Framework tests on non-Windows OSes.");
Console.WriteLine();

return Task.CompletedTask;
}

var resultPath = Path.Combine(context.BaseFolder, "artifacts", "test");
File.Delete(Path.Combine(resultPath, "netfx.trx"));

Expand Down

0 comments on commit 24e6844

Please sign in to comment.