forked from unoplatform/Uno.Wasm.Bootstrap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vsts-ci-linux.yml
131 lines (105 loc) · 3.77 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
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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
parameters:
jobName: ''
linux_container: ''
linux_vmImage: 'ubuntu-latest'
netcore_version: ''
jobs:
- job: ${{ parameters.jobName }}
container: ${{ parameters.linux_container }}
workspace:
clean: all
pool:
vmImage: ${{ parameters.linux_vmImage }}
variables:
NUGET_PACKAGES: $(build.sourcesdirectory)/.nuget
EMSCRIPTEN_VERSION: 1.40.0
NETCORE_VERSION: ${{ parameters.netcore_version }}
steps:
- checkout: self
clean: true
# Select .NET Core 2.2 for gitversion@5
- task: UseDotNet@2
condition: ne(variables['NETCORE_VERSION'], '2.2.x')
displayName: 'Use .NET Core sdk'
inputs:
packageType: sdk
version: 2.2.x
installationPath: $(Agent.ToolsDirectory)/dotnet
- task: GitVersion@5
inputs:
runtime: 'core'
useConfigFile: true
configFilePath: gitversion.yml
updateAssemblyInfo: false
- task: UseDotNet@2
displayName: 'Use .NET Core sdk'
condition: ne(variables['NETCORE_VERSION'], '2.2.x')
inputs:
packageType: sdk
version: ${{ parameters.netcore_version }}
installationPath: $(Agent.ToolsDirectory)/dotnet
- bash: |
cd ~
echo Installing emscripten $(EMSCRIPTEN_VERSION)
git clone --branch $(EMSCRIPTEN_VERSION) https://github.com/emscripten-core/emsdk
cd ~/emsdk
./emsdk install $(EMSCRIPTEN_VERSION)
./emsdk activate $(EMSCRIPTEN_VERSION)
displayName: 'Setup Emscripten'
- bash: |
cd ~/emsdk
wget https://raw.githubusercontent.com/mono/mono/b777471fcace85325e2c2af0e460f4ecd8059b5a/sdks/builds/fix-emscripten-8511.diff
cd ~/emsdk/upstream/emscripten
patch -N -p1 < ~/emsdk/fix-emscripten-8511.diff
displayName: 'Apply Emscripten Mono patches'
- task: NuGetToolInstaller@0
inputs:
versionSpec: 4.9.1
checkLatest: false
- bash: |
source ~/emsdk/emsdk_env.sh
msbuild /r /t:Publish /p:Configuration=Release src/Uno.Wasm.Bootstrap.sln
displayName: Build
- bash: |
cd $(build.sourcesdirectory)/src/Uno.Wasm.Sample
dotnet build || true # expected failure (nuget restore does not provide the packager a proper TargetFramework support)
dotnet build
- task: CopyFiles@2
inputs:
SourceFolder: $(build.sourcesdirectory)/src/Uno.Wasm.AotTests/bin/Release/netstandard2.0/publish
Contents: '**/*.*'
TargetFolder: $(build.artifactstagingdirectory)
CleanTargetFolder: false
OverWrite: false
flattenFolders: false
- bash: rm -fr ~/emsdk
displayName: Cleanup Emscripten folder to run tests
- bash: |
cd $(build.sourcesdirectory)/src/Uno.Wasm.AotTests/bin/Release/netstandard2.0/dist
python server.py &
cd $(build.sourcesdirectory)/src/WasmAot.UITests
npm install
node app
displayName: Raytracer UI Tests
- bash: |
sed -i "s/8000/8001/g" "$(build.sourcesdirectory)/src/Uno.Wasm.StaticLinking.Aot/bin/Release/netstandard2.0/dist/server.py"
cd $(build.sourcesdirectory)/src/Uno.Wasm.StaticLinking.Aot/bin/Release/netstandard2.0/dist
python server.py &
cd $(build.sourcesdirectory)/src/Uno.Wasm.StaticLinking.Aot.UITests
npm install
node app
displayName: StaticLinking.Aot Tests
- bash: |
sed -i "s/8000/8002/g" "$(build.sourcesdirectory)/src/Uno.Wasm.Threads/bin/Release/netstandard2.0/dist/server.py"
cd $(build.sourcesdirectory)/src/Uno.Wasm.Threads/bin/Release/netstandard2.0/dist
python server.py &
cd $(build.sourcesdirectory)/src/Uno.Wasm.Threading.UITests
npm install
node app
displayName: Threading Tests
- task: PublishBuildArtifacts@1
condition: always()
inputs:
PathtoPublish: $(build.artifactstagingdirectory)
ArtifactName: uno-wasm-bootstrap-linux-aot
ArtifactType: Container