From 2126db9577930ea2d26312947ad76e42e09599a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Laban?= Date: Fri, 14 Dec 2018 15:41:39 -0500 Subject: [PATCH] Initial commit --- .gitattributes | 63 +++++ .gitignore | 248 ++++++++++++++++++ .vsts-ci.yml | 60 +++++ build/SignClient.json | 13 + build/sign-package.ps1 | 22 ++ gitversion.yml | 23 ++ src/Uno.Wasm.MonoRuntime.sln | 25 ++ .../Uno.Wasm.MonoRuntime.csproj | 60 +++++ .../netstandard1.0/Uno.Wasm.MonoRuntime.props | 13 + 9 files changed, 527 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 .vsts-ci.yml create mode 100644 build/SignClient.json create mode 100644 build/sign-package.ps1 create mode 100644 gitversion.yml create mode 100644 src/Uno.Wasm.MonoRuntime.sln create mode 100644 src/Uno.Wasm.MonoRuntime/Uno.Wasm.MonoRuntime.csproj create mode 100644 src/Uno.Wasm.MonoRuntime/build/netstandard1.0/Uno.Wasm.MonoRuntime.props diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..1ff0c42 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,63 @@ +############################################################################### +# Set default behavior to automatically normalize line endings. +############################################################################### +* text=auto + +############################################################################### +# Set default behavior for command prompt diff. +# +# This is need for earlier builds of msysgit that does not have it on by +# default for csharp files. +# Note: This is only used by command line +############################################################################### +#*.cs diff=csharp + +############################################################################### +# Set the merge driver for project and solution files +# +# Merging from the command prompt will add diff markers to the files if there +# are conflicts (Merging from VS is not affected by the settings below, in VS +# the diff markers are never inserted). Diff markers may cause the following +# file extensions to fail to load in VS. An alternative would be to treat +# these files as binary and thus will always conflict and require user +# intervention with every merge. To do so, just uncomment the entries below +############################################################################### +#*.sln merge=binary +#*.csproj merge=binary +#*.vbproj merge=binary +#*.vcxproj merge=binary +#*.vcproj merge=binary +#*.dbproj merge=binary +#*.fsproj merge=binary +#*.lsproj merge=binary +#*.wixproj merge=binary +#*.modelproj merge=binary +#*.sqlproj merge=binary +#*.wwaproj merge=binary + +############################################################################### +# behavior for image files +# +# image files are treated as binary by default. +############################################################################### +#*.jpg binary +#*.png binary +#*.gif binary + +############################################################################### +# diff behavior for common document formats +# +# Convert binary document formats to text before diffing them. This feature +# is only available from the command line. Turn it on by uncommenting the +# entries below. +############################################################################### +#*.doc diff=astextplain +#*.DOC diff=astextplain +#*.docx diff=astextplain +#*.DOCX diff=astextplain +#*.dot diff=astextplain +#*.DOT diff=astextplain +#*.pdf diff=astextplain +#*.PDF diff=astextplain +#*.rtf diff=astextplain +#*.RTF diff=astextplain diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..dcd6818 --- /dev/null +++ b/.gitignore @@ -0,0 +1,248 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. + +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +[Xx]64/ +[Xx]86/ +bld/ +[Bb]in/ +[Oo]bj/ +[Gg]enerated[Ff]iles/ + +# Visual Studio 2015 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# DNX +project.lock.json +artifacts/ + +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml + +# TODO: Un-comment the next line if you do not want to checkin +# your web deploy settings because they may include unencrypted +# passwords +#*.pubxml +*.publishproj + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/packages/* +# except build/, which is used as an MSBuild target. +!**/packages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/packages/repositories.config +# NuGet v3's project.json files produces more ignoreable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Microsoft Azure ApplicationInsights config file +ApplicationInsights.config + +# Windows Store app package directory +AppPackages/ +BundleArtifacts/ + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ + +# Others +ClientBin/ +[Ss]tyle[Cc]op.* +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.pfx +*.publishsettings +node_modules/ +orleans.codegen.cs + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm + +# SQL Server files +*.mdf +*.ldf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# LightSwitch generated files +GeneratedArtifacts/ +ModelManifest.xml + +# Paket dependency manager +.paket/paket.exe + +# FAKE - F# Make +.fake/ +build/tools/** +*.binlog +/src/Uno.Wasm.MonoRuntime/build/runtime diff --git a/.vsts-ci.yml b/.vsts-ci.yml new file mode 100644 index 0000000..7ea4a86 --- /dev/null +++ b/.vsts-ci.yml @@ -0,0 +1,60 @@ +jobs: +- job: Windows + + pool: + vmImage: 'vs2017-win2016' + + variables: + NUGET_PACKAGES: $(Agent.WorkFolder)\.nuget + + steps: + - checkout: self + clean: true + + - task: NuGetToolInstaller@0 + inputs: + versionSpec: 4.7.0 + checkLatest: false + + - powershell: .\build\build.ps1 -script build\build.cake + displayName: Build + + - task: MSBuild@1 + inputs: + solution: src/Uno.Wasm.MonoRuntime/Uno.Wasm.MonoRuntime.csproj + msbuildLocationMethod: version + msbuildVersion: latest + msbuildArchitecture: x86 + msbuildArguments: /r "/p:CombinedConfiguration=$(CombinedConfiguration)" + clean: false + maximumCpuCount: true + restoreNugetPackages: false + logProjectEvents: false + createLogFile: false + + - task: CopyFiles@2 + inputs: + SourceFolder: $(build.sourcesdirectory) + Contents: ' $(build.sourcesdirectory)\src\Uno.Wasm.MonoRuntime\Bin\Release\*.nupkg' + TargetFolder: $(build.artifactstagingdirectory) + CleanTargetFolder: false + OverWrite: false + flattenFolders: false + + - task: PowerShell@2 + displayName: Authenticode Sign Packages + inputs: + filePath: build/Sign-Package.ps1 + env: + SignClientUser: $(SignClientUser) + SignClientSecret: $(SignClientSecret) + SignPackageName: "Uno.Wasm.MonoRuntime" + SignPackageDescription: "The Uno Platform" + ArtifactDirectory: $(build.artifactstagingdirectory) + condition: and(succeeded(), not(eq(variables['build.reason'], 'PullRequest')), not(eq(variables['SignClientSecret'], '')), not(eq(variables['SignClientUser'], ''))) + + - task: PublishBuildArtifacts@1 + inputs: + PathtoPublish: $(build.artifactstagingdirectory) + ArtifactName: uno-wasm-bootstrap-drop + ArtifactType: Container \ No newline at end of file diff --git a/build/SignClient.json b/build/SignClient.json new file mode 100644 index 0000000..173e169 --- /dev/null +++ b/build/SignClient.json @@ -0,0 +1,13 @@ +{ + "SignClient": { + "AzureAd": { + "AADInstance": "https://login.microsoftonline.com/", + "ClientId": "8138ef14-0570-432c-8aad-9f73f05297d5", + "TenantId": "6d53ef61-b6d1-4150-ae0b-43b90e75e0cd" + }, + "Service": { + "Url": "https://nv-signservice.azurewebsites.net", + "ResourceId": "https://SignService/715027a2-5a78-4271-9a16-f4502f1706fe" + } + } +} diff --git a/build/sign-package.ps1 b/build/sign-package.ps1 new file mode 100644 index 0000000..41dbc56 --- /dev/null +++ b/build/sign-package.ps1 @@ -0,0 +1,22 @@ +$currentDirectory = split-path $MyInvocation.MyCommand.Definition + +# See if we have the ClientSecret available +if ([string]::IsNullOrEmpty($env:SignClientSecret)) { + Write-Host "Client Secret not found, not signing packages" + return; +} + +dotnet tool install --tool-path . SignClient + +# Setup Variables we need to pass into the sign client tool +$appSettings = "$currentDirectory\SignClient.json" + +$filesToSign = Get-ChildItem -Recurse $Env:ArtifactDirectory\* -Include *.nupkg,*.vsix | Select-Object -ExpandProperty FullName + +foreach ($fileToSign in $filesToSign) { + Write-Host "Submitting $fileToSign for signing" + .\SignClient 'sign' -c $appSettings -i $fileToSign -r $env:SignClientUser -s $env:SignClientSecret -n "$env:SignPackageName" -d "$env:SignPackageDescription" -u "$env:build_repository_uri" + Write-Host "Finished signing $fileToSign" +} + +Write-Host "Sign-package complete" diff --git a/gitversion.yml b/gitversion.yml new file mode 100644 index 0000000..5330456 --- /dev/null +++ b/gitversion.yml @@ -0,0 +1,23 @@ +assembly-versioning-scheme: MajorMinorPatch +mode: ContinuousDeployment +next-version: 1.0.0 +continuous-delivery-fallback-tag: "" +branches: + master: + regex: master + source-branches: ['master'] + tag: dev + stable: + regex: stable + source-branches: ['stable'] + tag: "" + dev: + source-branches: ['master'] + regex: dev/.*?/(.*?) + tag: dev.{BranchName} + projects: + source-branches: ['master'] + regex: projects/(.*?) + tag: proj-{BranchName} +ignore: + sha: [] \ No newline at end of file diff --git a/src/Uno.Wasm.MonoRuntime.sln b/src/Uno.Wasm.MonoRuntime.sln new file mode 100644 index 0000000..7d4fcbe --- /dev/null +++ b/src/Uno.Wasm.MonoRuntime.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.28306.52 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Uno.Wasm.MonoRuntime", "Uno.Wasm.MonoRuntime\Uno.Wasm.MonoRuntime.csproj", "{A9F09CD5-99EB-416E-9586-236D621FDDE2}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {A9F09CD5-99EB-416E-9586-236D621FDDE2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A9F09CD5-99EB-416E-9586-236D621FDDE2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A9F09CD5-99EB-416E-9586-236D621FDDE2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A9F09CD5-99EB-416E-9586-236D621FDDE2}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {D522D592-FA49-4FF6-B2C5-55B38A70DD1B} + EndGlobalSection +EndGlobal diff --git a/src/Uno.Wasm.MonoRuntime/Uno.Wasm.MonoRuntime.csproj b/src/Uno.Wasm.MonoRuntime/Uno.Wasm.MonoRuntime.csproj new file mode 100644 index 0000000..d8a115d --- /dev/null +++ b/src/Uno.Wasm.MonoRuntime/Uno.Wasm.MonoRuntime.csproj @@ -0,0 +1,60 @@ + + + + netstandard2.0 + true + false + + https://jenkins.mono-project.com/job/test-mono-mainline-wasm/1635/label=ubuntu-1804-amd64/Azure/processDownloadRequest/1635/ubuntu-1804-amd64/sdks/wasm/mono-wasm-01f6a0203b0.zip + https://jenkins.mono-project.com/job/test-mono-mainline-wasm/1635/label=ubuntu-1804-amd64/Azure/processDownloadRequest/1635/ubuntu-1804-amd64/wasm-release-Linux-01f6a0203b0566dc845eefb453e345f7ede77803.zip + $([System.IO.Path]::GetFileNameWithoutExtension($(MonoSdkUrl))) + + + + nventive + https://github.com/nventive/Uno.Wasm.MonoRuntime + https://nv-assets.azurewebsites.net/logos/uno.png + https://github.com/nventive/Uno.Wasm.MonoRuntime + This package provides the binaries and toolchain of the mono-wasm runtime, packaged to be used with the Uno.Wasm.Bootstrap package. (Source: $(MonoSdkCommitId)) + Copyright (C) 2015-2018 nventive inc. - all rights reserved + + + + + true + build/runtime + + + true + build/netstandard1.0 + + + + + + all + runtime; build; native; contentfiles; analyzers + + + + + <_localSDKFiles Include="$(MSBuildProjectDirectory)\build\runtime\*.zip" /> + + + + + + + + + + + + + true + tools/runtime + + + + + diff --git a/src/Uno.Wasm.MonoRuntime/build/netstandard1.0/Uno.Wasm.MonoRuntime.props b/src/Uno.Wasm.MonoRuntime/build/netstandard1.0/Uno.Wasm.MonoRuntime.props new file mode 100644 index 0000000..96b07ed --- /dev/null +++ b/src/Uno.Wasm.MonoRuntime/build/netstandard1.0/Uno.Wasm.MonoRuntime.props @@ -0,0 +1,13 @@ + + + + <_wasmSDKFile Include="$(MSBuildThisFileDirectory)/../runtime/mono-wasm-*.zip" /> + <_wasmAOTSDKFile Include="$(MSBuildThisFileDirectory)/../runtime/wasm-release-*.zip" /> + + + + @(_wasmSDKFile) + @(_wasmAOTSDKFile) + + + \ No newline at end of file