-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Adjust compiler assets, remove unused contents
- Loading branch information
1 parent
1b9f2ec
commit 3f197b1
Showing
5 changed files
with
181 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,7 @@ env: | |
DOTNETRUNTIME_COMMIT: be32947d322ae71526ad1dde412a1dca44ea4fba | ||
DOTNETSDK_VERSION: 9.0.100-preview.6.24328.19 | ||
ADDITIONAL_BUILD_ARGS: '/p:MonoEnableAssertMessages=true /p:WasmEnableES6=true /p:WasmExceptionHandling=true' | ||
GitVersion_Version: 5.10.3 | ||
|
||
concurrency: | ||
group: ${{github.workflow}} - ${{github.ref}} | ||
|
@@ -42,7 +43,19 @@ jobs: | |
- uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
|
||
|
||
- name: Setup GitVersion | ||
uses: gittools/actions/gitversion/[email protected] | ||
with: | ||
versionSpec: ${{ env.GitVersion_Version }} | ||
|
||
- name: GitVersion | ||
id: gitversion | ||
uses: gittools/actions/gitversion/[email protected] | ||
with: | ||
useConfigFile: true | ||
configFilePath: build/gitversion.yml | ||
|
||
- name: Set Variable from current Commit | ||
run: | | ||
Invoke-Expression "git rev-parse --short HEAD" | Out-String -NoNewLine -OutVariable CURRENT_COMMIT | ||
|
@@ -70,26 +83,20 @@ jobs: | |
- name: Create artifact structure | ||
run: | | ||
New-Item -ItemType Directory -Force -Path ./runtime/artifacts/packages/Release/Shipping/uno/runtimes/browser-wasm/native | ||
cd ./runtime/artifacts/packages/Release/Shipping/uno | ||
New-Item -ItemType Directory -Force -Path $env:GITHUB_WORKSPACE/nuget/tools | ||
New-Item -ItemType Directory -Force -Path $env:GITHUB_WORKSPACE/ci-output | ||
# Move cross compiler to appropriate location | ||
move $env:GITHUB_WORKSPACE\runtime\artifacts\bin\mono\Browser.wasm.Release\cross runtimes\browser-wasm\native | ||
- name: Zip Archive | ||
run: | | ||
move $env:GITHUB_WORKSPACE\runtime\artifacts\bin\mono\Browser.wasm.Release\cross $env:GITHUB_WORKSPACE/nuget/tools | ||
Invoke-Expression "Get-Location | select -ExpandProperty Path" | Out-String -NoNewLine -OutVariable Current_Path | ||
$ARTIFACTS_FOLDER="$Current_Path\ci-artifacts" | ||
mkdir -p $ARTIFACTS_FOLDER | ||
cd .\runtime\artifacts\packages\Release\Shipping\uno | ||
Compress-Archive -DestinationPath $ARTIFACTS_FOLDER\dotnet-aot-wasm-windows-$env:CURRENT_COMMIT-$env:BASE_DOTNET_SHORT_COMMIT-${{ github.run_id }}-$env:BUILD_CONFIGURATION$archiveConfiguration.zip -Path * | ||
cd $env:GITHUB_WORKSPACE/nuget | ||
dotnet pack Uno.NETCore.App.Runtime.AOT.Cross.browser-wasm.csproj /p:OutputPath=$GITHUB_WORKSPACE/ci-output "/p:Version=${{ steps.gitversion.outputs.semVer }}" | ||
- uses: actions/upload-artifact@v2 | ||
if: ${{ always() }} | ||
with: | ||
name: wasm | ||
path: ci-artifacts | ||
name: nuget | ||
path: ci-output | ||
|
||
## | ||
## Build Job | ||
|
@@ -105,6 +112,22 @@ jobs: | |
MONO_WASM_THREADS: ['multithread', 'singlethread'] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
|
||
- name: Setup GitVersion | ||
uses: gittools/actions/gitversion/[email protected] | ||
with: | ||
versionSpec: ${{ env.GitVersion_Version }} | ||
|
||
- name: GitVersion | ||
id: gitversion | ||
uses: gittools/actions/gitversion/[email protected] | ||
with: | ||
useConfigFile: true | ||
configFilePath: build/gitversion.yml | ||
|
||
- name: Setup .NET SDK | ||
uses: actions/[email protected] | ||
with: | ||
|
@@ -139,10 +162,6 @@ jobs: | |
- name: Trust My Directory | ||
run: git config --global --add safe.directory /__w/Uno.DotnetRuntime.WebAssembly/Uno.DotnetRuntime.WebAssembly | ||
|
||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
|
||
- name: Set Variable from current Commit | ||
run: | | ||
set -e | ||
|
@@ -184,15 +203,19 @@ jobs: | |
unzip -o '*.nupkg' -d uno | ||
cd uno | ||
rm *.nuspec | ||
# remove unused assets that are part of the official SDK | ||
rm -fR _rels | ||
rm -fR package | ||
rm -fR analyzers | ||
rm -fR ref | ||
rm -f \[Content_Types\].xml | ||
rm -f Icon.png | ||
rm -f LICENCE.TXT | ||
find data ! -name 'RuntimeList.xml' -type f -exec rm -f {} + | ||
- name: Zip Archive | ||
run: | | ||
if [ '${{ matrix.MONO_WASM_THREADS }}' != 'singlethread' ]; then | ||
ARCHIVE_CONFIGURATION="-threads"; | ||
fi | ||
ARTIFACTS_FOLDER=`pwd`/ci-artifacts | ||
mkdir -p $ARTIFACTS_FOLDER | ||
cd ./runtime/artifacts/packages/Release/Shipping/uno | ||
|
@@ -213,6 +236,18 @@ jobs: | |
with: | ||
submodules: true | ||
|
||
- name: Setup GitVersion | ||
uses: gittools/actions/gitversion/[email protected] | ||
with: | ||
versionSpec: ${{ env.GitVersion_Version }} | ||
|
||
- name: GitVersion | ||
id: gitversion | ||
uses: gittools/actions/gitversion/[email protected] | ||
with: | ||
useConfigFile: true | ||
configFilePath: build/gitversion.yml | ||
|
||
- name: Setup .NET SDK | ||
uses: actions/[email protected] | ||
with: | ||
|
@@ -229,7 +264,7 @@ jobs: | |
cd nuget | ||
ls -la | ||
find . -name '*.zip' -exec sh -c 'unzip -d "${1%.*}" "$1"' _ {} \; | ||
dotnet pack /p:OutputPath=$GITHUB_WORKSPACE/ci-output | ||
dotnet pack Uno.NETCore.App.Runtime.Mono.browser-wasm.csproj /p:OutputPath=$GITHUB_WORKSPACE/ci-output "/p:Version=${{ steps.gitversion.outputs.semVer }}" | ||
- uses: actions/upload-artifact@v2 | ||
if: ${{ always() }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
assembly-versioning-scheme: MajorMinorPatch | ||
mode: Mainline | ||
|
||
branches: | ||
main: | ||
mode: ContinuousDeployment | ||
regex: main | ||
tag: dev | ||
increment: Minor | ||
|
||
pull-request: | ||
regex: ^(pull|pull\-requests|pr)[/-] | ||
mode: ContinuousDeployment | ||
tag: PullRequest | ||
increment: Inherit | ||
|
||
stable: | ||
regex: release/stable/.* | ||
tag: '' | ||
increment: Patch | ||
source-branches: ['main'] | ||
is-mainline: true | ||
|
||
beta: | ||
mode: ContinuousDeployment | ||
regex: release/beta/.* | ||
tag: 'beta' | ||
increment: inherit | ||
source-branches: ['main'] | ||
|
||
dev: | ||
mode: ContinuousDeployment | ||
regex: dev/.*?/(.*?) | ||
tag: dev.{BranchName} | ||
source-branches: ['main', 'release', 'projects', 'feature'] | ||
increment: inherit | ||
|
||
projects: | ||
tag: proj-{BranchName} | ||
regex: projects/(.*?) | ||
source-branches: ['main'] | ||
increment: inherit | ||
|
||
feature: | ||
tag: feature.{BranchName} | ||
regex: feature/(.*?) | ||
source-branches: ['main'] | ||
increment: inherit | ||
|
||
ignore: | ||
sha: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"SignClient": { | ||
"AzureAd": { | ||
"AADInstance": "https://login.microsoftonline.com/", | ||
"ClientId": "80441c68-7fd8-4866-8dd1-8c78ff585a8a", | ||
"TenantId": "a297d6c0-b635-41a3-b1e3-558efe71e413" | ||
}, | ||
"Service": { | ||
"Url": "https://uno-signservice.azurewebsites.net", | ||
"ResourceId": "https://SignService.platformuno.onmicrosoft.com/6dd8824b-6147-4b02-a1af-ea83b0ffebdb" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" |
37 changes: 37 additions & 0 deletions
37
nuget/Uno.NETCore.App.Runtime.AOT.Cross.browser-wasm.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild> | ||
<IsPackable>true</IsPackable> | ||
<IncludeBuildOutput>false</IncludeBuildOutput> | ||
<PackageProjectUrl>https://github.dev/unoplatform/Uno.DotnetRuntime.WebAssembly</PackageProjectUrl> | ||
<RepositoryUrl>https://github.dev/unoplatform/Uno.DotnetRuntime.WebAssembly</RepositoryUrl> | ||
<Description>.NET Ahead of Time Compiler for WebAssembly</Description> | ||
<Copyright>Copyright (C) 2015-$([System.DateTime]::Now.ToString(`yyyy`)) Uno Platform inc. - all rights reserved</Copyright> | ||
<NoWarn>NU5100;NU5128</NoWarn> | ||
<PackageId>Uno.NETCore.App.Runtime.AOT.$(NETCoreSdkPortableRuntimeIdentifier).Cross.browser-wasm</PackageId> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<None Include="tools/**" Pack="true" PackagePath="tools" /> | ||
</ItemGroup> | ||
|
||
<Target Name="DownloadAndSetPackageIcon" BeforeTargets="_GetPackageFiles"> | ||
<PropertyGroup> | ||
<IconUrl>https://uno-assets.platform.uno/logos/uno.png</IconUrl> | ||
</PropertyGroup> | ||
|
||
<DownloadFile SourceUrl="$(IconUrl)" DestinationFolder="$(IntermediateOutputPath)"> | ||
<Output TaskParameter="DownloadedFile" PropertyName="UnoPackageDownloadedIcon" /> | ||
</DownloadFile> | ||
|
||
<PropertyGroup> | ||
<PackageIcon>$([System.IO.Path]::GetFileName($(UnoPackageDownloadedIcon)))</PackageIcon> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<None Include="$(UnoPackageDownloadedIcon)" Pack="true" PackagePath="\" Visible="false" /> | ||
</ItemGroup> | ||
</Target> | ||
</Project> |