forked from unoplatform/calculator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vsts-ci.Linux.yml
73 lines (59 loc) · 2.1 KB
/
.vsts-ci.Linux.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
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: 3.1.7 # 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