From d145440164edef37b76ec3e4d8db1a162805dfbc Mon Sep 17 00:00:00 2001 From: Jerome Laban Date: Wed, 22 Apr 2020 15:49:45 -0400 Subject: [PATCH] fix: macOS .NET Core build error and ci validation --- .vsts-ci.yml | 22 ++++++++----------- src/Uno.Wasm.Bootstrap/ShellTask.cs | 5 +++++ .../Uno.Wasm.Bootstrap.csproj | 1 + 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/.vsts-ci.yml b/.vsts-ci.yml index 7537629be..48f9e95e7 100644 --- a/.vsts-ci.yml +++ b/.vsts-ci.yml @@ -61,7 +61,7 @@ jobs: parameters: jobName: Linux_netcore3_1 netcore_version: 3.1.x - linux_container: unoplatform/wasm-build:2.0 + linux_container: unoplatform/wasm-build:2.1.1 - job: macOS @@ -80,26 +80,15 @@ jobs: displayName: 'Install Ninja' - - bash: | - cd $(Agent.WorkFolder) - git clone https://github.com/juj/emsdk.git - cd emsdk - ./emsdk install latest - ./emsdk activate latest - - displayName: 'Install Emscripten' - - task: NuGetToolInstaller@0 inputs: versionSpec: 4.7.0 checkLatest: false - bash: | - export PATH=$PATH:$(Agent.WorkFolder)/ninja-mac - source $(Agent.WorkFolder)/emsdk/emsdk_env.sh msbuild /m /r /t:Publish /p:Configuration=Release src/Uno.Wasm.Bootstrap.sln - displayName: Build + displayName: MSBuild Validation - task: CopyFiles@2 inputs: @@ -110,6 +99,13 @@ jobs: OverWrite: false flattenFolders: false + - bash: | + cd $(build.sourcesdirectory)/src/Uno.Wasm.Sample + dotnet build || true # expected failure + dotnet build + + displayName: .NET Core Validation + - task: PublishBuildArtifacts@1 condition: always() inputs: diff --git a/src/Uno.Wasm.Bootstrap/ShellTask.cs b/src/Uno.Wasm.Bootstrap/ShellTask.cs index 6067ebabf..b542625fe 100644 --- a/src/Uno.Wasm.Bootstrap/ShellTask.cs +++ b/src/Uno.Wasm.Bootstrap/ShellTask.cs @@ -393,6 +393,11 @@ as the BrotliStream must be closed in order to signal that no more blocks are be throw new InvalidOperationException($"WSL is required for this build but could not be found. (Searched for [{executable}])"); } } + else if (System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform(System.Runtime.InteropServices.OSPlatform.OSX)) + { + parameters = $"{executable} {parameters}"; + executable = "mono"; + } var p = new Process { diff --git a/src/Uno.Wasm.Bootstrap/Uno.Wasm.Bootstrap.csproj b/src/Uno.Wasm.Bootstrap/Uno.Wasm.Bootstrap.csproj index 49635d21a..1bb86d0cf 100644 --- a/src/Uno.Wasm.Bootstrap/Uno.Wasm.Bootstrap.csproj +++ b/src/Uno.Wasm.Bootstrap/Uno.Wasm.Bootstrap.csproj @@ -10,6 +10,7 @@ true 2.0.1-test.3 true + 8.0