forked from unoplatform/Uno.Xaml-Controls-Gallery
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vsts-linux-build.yml
102 lines (82 loc) · 3.02 KB
/
.vsts-linux-build.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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
parameters:
pool: ''
jobs:
- job: Linux
container: unoplatform/wasm-build:2.1
pool:
vmImage: 'ubuntu-latest'
strategy:
matrix:
FullAOT:
RuntimeMode: FullAOT
MixedModeBuild: False
Mixed:
RuntimeMode: Mixed
MixedModeBuild: True
variables:
NUGET_PACKAGES: $(build.sourcesdirectory)/.nuget
DOTNET_ROOT: $(Agent.ToolsDirectory)/dotnet
steps:
- checkout: self
clean: true
- task: UseDotNet@2
inputs:
packageType: 'runtime'
version: '2.2.x'
- task: nventiveCanaryUpdater@5
condition: startsWith(variables['Build.SourceBranch'], 'refs/heads/canaries')
inputs:
solution: 'XamlControlsGallery.Windows/XamlControlsGallery.sln'
usePrivateFeed: false
useNuGetOrg: true
mergeBranch: true
branchToMerge: 'master'
nugetUpdaterVersion: '2.0.6'
allowDowngrade: true
packageAuthor: 'nventive'
summaryFile: '$(Build.ArtifactStagingDirectory)/Canary.md'
resultFile: '$(Build.ArtifactStagingDirectory)/update_result.json'
- bash: |
cd ~
git clone https://github.com/emscripten-core/emsdk
cd emsdk
./emsdk install sdk-1.39.11
./emsdk activate sdk-1.39.11
displayName: 'Setup Emscripten'
- bash: |
cd ~/emsdk
wget https://raw.githubusercontent.com/mono/mono/27247739c68faee7b2a63ae805222d4b375d2161/sdks/builds/emscripten-pr-8457.diff
wget https://raw.githubusercontent.com/mono/mono/27247739c68faee7b2a63ae805222d4b375d2161/sdks/builds/fix-emscripten-8511.diff
cd ~/emsdk/upstream/emscripten
patch -N -p1 < ~/emsdk/emscripten-pr-8457.diff
patch -N -p1 < ~/emsdk/fix-emscripten-8511.diff
displayName: 'Apply Emscripten Mono patches'
- task: UseDotNet@2
inputs:
packageType: 'runtime'
version: '2.1.x'
- task: UseGitVersion@5
inputs:
versionSpec: '5.x'
updateAssemblyInfo: false
- script: |
source ~/emsdk/emsdk_env.sh
msbuild /r /p:Configuration=Release /p:MixedModeBuild=$(MixedModeBuild) "/p:InformationalVersion=$GITVERSION_INFORMATIONALVERSION" $(build.sourcesdirectory)/XamlControlsGallery.Wasm/XamlControlsGallery.Wasm.csproj /bl:$(build.artifactstagingdirectory)\build.binlog
env:
GITVERSION_INFORMATIONALVERSION: $(GITVERSION_INFORMATIONALVERSION)
- task: CopyFiles@2
displayName: 'Publish Wasm Binaries'
inputs:
SourceFolder: $(build.sourcesdirectory)/XamlControlsGallery.Wasm/bin/Release/netstandard2.0/dist
Contents: '**/*.*'
TargetFolder: $(build.artifactstagingdirectory)/XamlUIBasics-wasm/$(RuntimeMode)
CleanTargetFolder: false
OverWrite: false
flattenFolders: false
- task: PublishBuildArtifacts@1
# https://developercommunity.visualstudio.com/content/problem/284991/public-vsts-previouw-cant-set-build-number-of-pr-b.html
condition: eq(variables['System.PullRequest.IsFork'], 'False')
inputs:
PathtoPublish: $(build.artifactstagingdirectory)
ArtifactName: xaml-gallery-aot-drop
ArtifactType: Container