Skip to content

Commit

Permalink
Merge pull request #194 from unoplatform/dev/jela/devserver-error
Browse files Browse the repository at this point in the history
fix: macOS .NET Core build error and ci validation
  • Loading branch information
jeromelaban authored Apr 22, 2020
2 parents 1e4fc8b + d145440 commit 4fd6cf6
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 13 deletions.
22 changes: 9 additions & 13 deletions .vsts-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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:
Expand All @@ -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:
Expand Down
5 changes: 5 additions & 0 deletions src/Uno.Wasm.Bootstrap/ShellTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
1 change: 1 addition & 0 deletions src/Uno.Wasm.Bootstrap/Uno.Wasm.Bootstrap.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<IsTool>true</IsTool>
<Version>2.0.1-test.3</Version>
<GeneratePackageOnBuild Condition="'$(Configuration)'=='Release'">true</GeneratePackageOnBuild>
<LangVersion>8.0</LangVersion>
</PropertyGroup>

<PropertyGroup>
Expand Down

0 comments on commit 4fd6cf6

Please sign in to comment.