chore: Adjust build for AOT
This commit is contained in:
Родитель
3f764da38f
Коммит
090ecbe81d
|
@ -25,15 +25,13 @@ jobs:
|
|||
##
|
||||
## Build Job
|
||||
##
|
||||
build_windows_job:
|
||||
build_aot_windows_job:
|
||||
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed')
|
||||
runs-on: windows-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
BUILD_CONFIGURATION: [Release]
|
||||
MONO_WASM_THREADS: ['multithread', 'singlethread']
|
||||
MONO_WASM_SIMD: ['true', 'false']
|
||||
|
||||
steps:
|
||||
- name: Setup .NET SDK
|
||||
|
@ -52,7 +50,6 @@ jobs:
|
|||
echo "CurrentCommit=$CURRENT_COMMIT"
|
||||
echo "BUILD_CONFIGURATION=${{ matrix.BUILD_CONFIGURATION }}" >> $env:GITHUB_ENV
|
||||
echo "MONO_WASM_THREADS=${{ matrix.MONO_WASM_THREADS }}" >> $env:GITHUB_ENV
|
||||
echo "MONO_WASM_SIMD=${{ matrix.MONO_WASM_SIMD }}" >> $env:GITHUB_ENV
|
||||
|
||||
- name: Clone dotnet/runtime
|
||||
run: |
|
||||
|
@ -70,51 +67,25 @@ jobs:
|
|||
run: |
|
||||
$env:MonoEnableAssertMessages=true # enable emsdk assert messages
|
||||
cd runtime
|
||||
.\build.cmd -arch wasm -os browser -subset mono+libs /p:RuntimeFlavor=Mono -c $env:BUILD_CONFIGURATION $env:ADDITIONAL_BUILD_ARGS /p:TestAssemblies=false "/p:MonoWasmBuildVariant=$env:MONO_WASM_THREADS" /p:CrossBuild=false /bl:ci-artifacts\msbuild.binlog
|
||||
.\build.cmd -arch wasm -os browser -subset mono.runtime+libs.native /p:RuntimeFlavor=Mono -c $env:BUILD_CONFIGURATION $env:ADDITIONAL_BUILD_ARGS /p:TestAssemblies=false "/p:MonoWasmBuildVariant=$env:MONO_WASM_THREADS" /p:CrossBuild=false /bl:ci-artifacts\msbuild.binlog
|
||||
|
||||
- name: Create artifact structure
|
||||
run: |
|
||||
mkdir -p ./runtime/artifacts/packages/Release/Shipping
|
||||
cd ./runtime/artifacts/packages/Release/Shipping
|
||||
rm *.symbols.nupkg
|
||||
rm *.Templates.*.nupkg
|
||||
rm *ToolChain.net6.Manifest*.nupkg
|
||||
rm *ToolChain.net7.Manifest*.nupkg
|
||||
rm *ToolChain.net8.Manifest*.nupkg
|
||||
|
||||
# rename to zip as Expand-Archive does not support nupkg
|
||||
gci -filter *.nupkg | Rename-Item -NewName { $_.name -replace "\.nupkg$", ".zip" }
|
||||
Get-ChildItem . -Filter *.zip | Expand-Archive -DestinationPath uno -Force
|
||||
|
||||
cd uno
|
||||
Remove-Item *.nuspec
|
||||
Remove-Item *.nuspec
|
||||
Remove-Item _rels -Recurse
|
||||
Remove-Item package -Recurse
|
||||
|
||||
# Move cross compiler to appropriate location
|
||||
move $env:GITHUB_WORKSPACE\runtime\artifacts\bin\mono\Browser.wasm.Release\cross runtimes\browser-wasm\native
|
||||
|
||||
|
||||
- name: Copy ninja
|
||||
run: |
|
||||
Invoke-WebRequest https://github.com/ninja-build/ninja/releases/download/v1.10.2/ninja-win.zip -OutFile ninja-win.zip
|
||||
Expand-Archive -LiteralPath 'ninja-win.zip' -DestinationPath \runtime\artifacts\packages\Release\Shipping\uno\tools\ninja
|
||||
|
||||
- name: Zip Archive
|
||||
run: |
|
||||
if('${{ matrix.MONO_WASM_THREADS }}' -ne 'singlethread') {
|
||||
$archiveConfiguration="-threads";
|
||||
}
|
||||
|
||||
if('${{ matrix.MONO_WASM_SIMD }}' -ne 'false') {
|
||||
$archiveConfiguration="$archiveConfiguration-simd";
|
||||
}
|
||||
|
||||
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-runtime-wasm-windows-$env:CURRENT_COMMIT-$env:BASE_DOTNET_SHORT_COMMIT-${{ github.run_id }}-$env:BUILD_CONFIGURATION$archiveConfiguration.zip -Path *
|
||||
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 *
|
||||
|
||||
- uses: actions/upload-artifact@v2
|
||||
if: ${{ always() }}
|
||||
|
@ -134,7 +105,6 @@ jobs:
|
|||
matrix:
|
||||
BUILD_CONFIGURATION: [Release]
|
||||
MONO_WASM_THREADS: ['multithread', 'singlethread']
|
||||
MONO_WASM_SIMD: ['true', 'false']
|
||||
|
||||
steps:
|
||||
- name: Setup .NET SDK
|
||||
|
@ -183,7 +153,6 @@ jobs:
|
|||
echo "CurrentCommit=$CURRENT_COMMIT"
|
||||
echo "BUILD_CONFIGURATION=${{ matrix.BUILD_CONFIGURATION }}" >> $GITHUB_ENV
|
||||
echo "MONO_WASM_THREADS=${{ matrix.MONO_WASM_THREADS }}" >> $GITHUB_ENV
|
||||
echo "MONO_WASM_SIMD=${{ matrix.MONO_WASM_SIMD }}" >> $GITHUB_ENV
|
||||
|
||||
- name: Clone dotnet/runtime
|
||||
run: |
|
||||
|
@ -203,7 +172,7 @@ jobs:
|
|||
run: |
|
||||
set -e
|
||||
cd runtime
|
||||
./build.sh -arch wasm -os browser -c $BUILD_CONFIGURATION $ADDITIONAL_BUILD_ARGS /p:TestAssemblies=false "/p:MonoWasmBuildVariant=$MONO_WASM_THREADS" "/p:WasmEnableSIMD=$MONO_WASM_SIMD"
|
||||
./build.sh -arch wasm -os browser -c $BUILD_CONFIGURATION $ADDITIONAL_BUILD_ARGS /p:TestAssemblies=false "/p:MonoWasmBuildVariant=$MONO_WASM_THREADS"
|
||||
|
||||
- name: Create artifact structure
|
||||
run: |
|
||||
|
@ -231,9 +200,6 @@ jobs:
|
|||
if [ '${{ matrix.MONO_WASM_THREADS }}' != 'singlethread' ]; then
|
||||
ARCHIVE_CONFIGURATION="-threads";
|
||||
fi
|
||||
if [ '${{ matrix.MONO_WASM_SIMD }}' != 'false' ]; then
|
||||
ARCHIVE_CONFIGURATION="$ARCHIVE_CONFIGURATION-simd";
|
||||
fi
|
||||
|
||||
ARTIFACTS_FOLDER=`pwd`/ci-artifacts
|
||||
mkdir -p $ARTIFACTS_FOLDER
|
||||
|
@ -245,7 +211,7 @@ jobs:
|
|||
with:
|
||||
name: wasm
|
||||
path: ci-artifacts
|
||||
|
||||
|
||||
##
|
||||
## Release Job
|
||||
##
|
||||
|
|
Загрузка…
Ссылка в новой задаче