Update tooling with .NET 6 iOS changes

This commit is contained in:
Salman Ahmed
2022-12-10 04:00:15 +03:00
parent c54a70505b
commit 1e24d195c2
5 changed files with 24 additions and 19 deletions

View File

@@ -138,8 +138,11 @@ jobs:
with:
dotnet-version: "6.0.x"
- name: Install .NET workloads
run: dotnet workload install ios
# Contrary to seemingly any other msbuild, msbuild running on macOS/Mono
# cannot accept .sln(f) files as arguments.
# Build just the iOS framework project for now.
- name: Build
run: msbuild osu.Framework.iOS/osu.Framework.iOS.csproj /restore /p:Configuration=Debug
run: dotnet build -c Debug osu-framework.iOS.slnf

View File

@@ -146,8 +146,16 @@ jobs:
id: artifactsPath
run: echo "::set-output name=NUGET_ARTIFACTS::${{github.workspace}}/artifacts"
- name: Install .NET 6.0.x
uses: actions/setup-dotnet@v1
with:
dotnet-version: "6.0.x"
- name: Install .NET workloads
run: dotnet workload install ios
- name: Pack (iOS Framework)
run: msbuild -bl:msbuildlog.binlog -v:m -target:Pack -r osu.Framework.iOS/osu.Framework.iOS.csproj -p:Configuration=Release -p:Version=${{needs.check-if-tag.outputs.version}} -p:PackageOutputPath=${{steps.artifactsPath.outputs.nuget_artifacts}}
run: dotnet pack -c Release osu.Framework.iOS /p:Version=${{needs.check-if-tag.outputs.version}} /p:GenerateDocumentationFile=true -o ${{steps.artifactsPath.outputs.nuget_artifacts}}
- name: Upload Artifacts
uses: actions/upload-artifact@v2

View File

@@ -22,7 +22,7 @@ if ($Experimental) { $cakeArguments += "-experimental" }
$cakeArguments += $ScriptArgs
dotnet tool restore
dotnet workload install android
dotnet workload restore
dotnet cake ./build/build.cake --bootstrap
dotnet cake ./build/build.cake $cakeArguments
exit $LASTEXITCODE
exit $LASTEXITCODE

View File

@@ -1,6 +1,6 @@
echo "Installing Cake.Tool..."
dotnet tool restore
dotnet workload install android
dotnet workload restore
# Parse arguments.
CAKE_ARGUMENTS=()
@@ -15,4 +15,4 @@ done
echo "Running build script..."
dotnet cake ./build/build.cake --bootstrap
dotnet cake ./build/build.cake "${CAKE_ARGUMENTS[@]}"
dotnet cake ./build/build.cake "${CAKE_ARGUMENTS[@]}"

View File

@@ -144,22 +144,16 @@ Task("PackFramework")
Task("PackiOSFramework")
.Does(() => {
MSBuild(iosFrameworkProject, new MSBuildSettings {
Restore = true,
BinaryLogger = new MSBuildBinaryLogSettings{
Enabled = true,
FileName = tempDirectory.CombineWithFilePath("msbuildlog.binlog").FullPath
},
Verbosity = Verbosity.Minimal,
ArgumentCustomization = args =>
{
args.Append($"/p:Configuration={configuration}");
DotNetCorePack(iosFrameworkProject.FullPath, new DotNetCorePackSettings{
OutputDirectory = artifactsDirectory,
Configuration = configuration,
Verbosity = DotNetCoreVerbosity.Quiet,
ArgumentCustomization = args => {
args.Append($"/p:Version={version}");
args.Append($"/p:PackageOutputPath={artifactsDirectory.MakeAbsolute(Context.Environment)}");
args.Append($"/p:GenerateDocumentationFile=true");
return args;
}
}.WithTarget("Pack"));
});
});
Task("PackAndroidFramework")