From 5f2c5770d47a9a62d951e311896e490d26210beb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Dach?= Date: Sun, 24 Oct 2021 17:25:53 +0200 Subject: [PATCH 1/2] Add build-only CI jobs for mobile platforms --- .github/workflows/ci.yml | 42 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0da1f9636b..2a3b2fd978 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,6 +50,48 @@ jobs: name: osu-test-results-${{matrix.os.prettyname}}-${{matrix.threadingMode}} path: ${{github.workspace}}/TestResults/TestResults-${{matrix.os.prettyname}}-${{matrix.threadingMode}}.trx + build-only-android: + name: Build only (Android) + runs-on: windows-latest + timeout-minutes: 60 + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Install .NET 5.0.x + uses: actions/setup-dotnet@v1 + with: + dotnet-version: "5.0.x" + + - name: Setup MSBuild + uses: microsoft/setup-msbuild@v1 + + - name: Build + run: msbuild osu.Android.slnf /restore /p:Configuration=Debug + + build-only-ios: + # While this workflow technically *can* run, it fails as iOS builds are blocked by multiple issues. + # See https://github.com/ppy/osu-framework/issues/4677 for the details. + # The job can be unblocked once those issues are resolved and game deployments can happen again. + if: false + name: Build only (iOS) + runs-on: macos-latest + timeout-minutes: 60 + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Install .NET 5.0.x + uses: actions/setup-dotnet@v1 + with: + dotnet-version: "5.0.x" + + # Contrary to seemingly any other msbuild, msbuild running on macOS/Mono + # cannot accept .sln(f) files as arguments. + # Build just the main game for now. + - name: Build + run: msbuild osu.iOS/osu.iOS.csproj /restore /p:Configuration=Debug + inspect-code: name: Code Quality runs-on: ubuntu-latest From 00732822c34a9dcd4ae7716f9b8141a90e1307a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Dach?= Date: Sun, 24 Oct 2021 17:41:55 +0200 Subject: [PATCH 2/2] Replace insufficiently specific exception type Resolves compilation failures for the newly-added Android build-only CI job caused by inspection CA2201 ("Exception type System.Exception is not sufficiently specific"). --- osu.Game.Tests/Visual/Online/TestSceneChatOverlay.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/osu.Game.Tests/Visual/Online/TestSceneChatOverlay.cs b/osu.Game.Tests/Visual/Online/TestSceneChatOverlay.cs index 9562b41363..ab4e1b4457 100644 --- a/osu.Game.Tests/Visual/Online/TestSceneChatOverlay.cs +++ b/osu.Game.Tests/Visual/Online/TestSceneChatOverlay.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Net; using JetBrains.Annotations; using NUnit.Framework; using osu.Framework.Allocation; @@ -105,7 +106,7 @@ namespace osu.Game.Tests.Visual.Online } else { - getUser.TriggerFailure(new Exception()); + getUser.TriggerFailure(new WebException()); } return true;