calculator/.vsts-ci.Linux.yml

74 строки
2.1 KiB
YAML

jobs:
- job: Linux_WebAssembly
container: unoplatform/wasm-build:3.0
pool:
vmImage: 'ubuntu-latest'
variables:
NUGET_PACKAGES: $(build.sourcesdirectory)/.nuget
VersionCodeOffset: 400559 # last value for the APK release
EMSDK_VERSION: 2.0.23 # Needs to be aligned with the current bootstrapper build
steps:
- checkout: self
clean: true
- template: build/uno-ci/canary-updater.yml
- template: build/uno-ci/gitversion.yml
- task: UseDotNet@2
displayName: 'Use .NET Core sdk'
retryCountOnTaskFailure: 3
inputs:
packageType: sdk
version: 6.0.200
- bash: |
cd ~
git clone --branch $(EMSDK_VERSION) https://github.com/emscripten-core/emsdk
cd emsdk
./emsdk install $(EMSDK_VERSION)
./emsdk activate $(EMSDK_VERSION)
displayName: 'Setup Emscripten'
retryCountOnTaskFailure: 3
- script: |
source ~/emsdk/emsdk_env.sh
cd src/CalcManager
chmod +x build.sh
./build.sh
displayName: 'Build Wasm CalcManager'
env:
GITVERSION_FullSemVer: $(GITVERSION_FullSemVer)
- script: |
cd $(build.sourcesdirectory)
dotnet msbuild /r /p:BuildPlatformTarget=Wasm $(build.sourcesdirectory)/src/build/build.csproj
dotnet msbuild /r /p:Configuration=Release $(build.sourcesdirectory)/src/Calculator.Wasm/Calculator.Wasm.csproj "/p:InformationalVersion=$GITVERSION_INFORMATIONALVERSION" /bl:$(build.artifactstagingdirectory)/linux.binlog
env:
GITVERSION_FullSemVer: $(GITVERSION_FullSemVer)
displayName: 'Build Calculator'
- task: CopyFiles@2
displayName: 'Publish Wasm Binaries'
inputs:
SourceFolder: $(build.sourcesdirectory)/src/Calculator.Wasm/bin/Release/net5.0/dist
Contents: '**/*.*'
TargetFolder: $(build.artifactstagingdirectory)/Uno-Calculator-wasm
CleanTargetFolder: false
OverWrite: false
flattenFolders: false
- task: PublishBuildArtifacts@1
condition: always()
retryCountOnTaskFailure: 3
inputs:
PathtoPublish: $(build.artifactstagingdirectory)
ArtifactName: Uno-Calculator-wasm
ArtifactType: Container