-
Notifications
You must be signed in to change notification settings - Fork 21
/
azure-pipelines.yml
160 lines (141 loc) · 5.18 KB
/
azure-pipelines.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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
# While we can't run vagrant/virtualbox directly due to nested virtualization limitations,
# we can at least run the scripts that would get executed by vagrant.
# This tests 90% of the snapshotting code.
#
trigger:
- "*"
jobs:
- job: download
timeoutInMinutes: 0
pool:
vmImage: ubuntu-16.04
steps:
- script: ./vagranttools/downloadbasebox.sh
- job: wine
timeoutInMinutes: 0
pool:
vmImage: ubuntu-16.04
strategy:
maxParallel: 10
steps:
- script: make buildwine
- script: |
WINE_VER=$(docker images --format "{{.Tag}}" wine)
docker save wine:$WINE_VER | gzip > wine.tar.gz
- task: PublishBuildArtifacts@1
inputs:
artifactName: wine
pathtoPublish: wine.tar.gz
- job: snapshot
timeoutInMinutes: 0
pool:
vmImage: win1803
variables:
VAGRANT: C:\HashiCorp\Vagrant\bin\vagrant.exe
strategy:
maxParallel: 10
matrix:
msvc9:
MSVC: 9
msvc10:
MSVC: 10
#msvc11:
# MSVC: 11
#msvc12:
# MSVC: 12
msvc14:
MSVC: 14
msvc15:
MSVC: 15
msvc16:
MSVC: 16
steps:
- powershell: vagranttools\setup_basic.ps1
- script: vagranttools\snapshot.bat $(Build.Repository.LocalPath)\build\msvc$(MSVC)\snapshots\SNAPSHOT-01
- script: dir $(Build.Repository.LocalPath)\build\msvc$(MSVC)\snapshots\SNAPSHOT-01
- powershell: vagranttools\setup_msvc.ps1 -msvc_ver $(MSVC) -output_dir $(Build.Repository.LocalPath)\build\msvc$(MSVC)\snapshots\SNAPSHOT-02
- script: vagranttools\snapshot.bat $(Build.Repository.LocalPath)\build\msvc$(MSVC)\snapshots\SNAPSHOT-02
- script: dir $(Build.Repository.LocalPath)\build\msvc$(MSVC)\snapshots\SNAPSHOT-02
- script: vagranttools\compare-snapshots.bat $(Build.Repository.LocalPath)\build\msvc$(MSVC)\snapshots\SNAPSHOT-01 $(Build.Repository.LocalPath)\build\msvc$(MSVC)\snapshots\SNAPSHOT-02 $(Build.Repository.LocalPath)\build\msvc$(MSVC)\snapshots\CMP
- script: dir $(Build.Repository.LocalPath)\build\msvc$(MSVC)\snapshots\CMP
- script: zip -r msvc$(MSVC)-snapshot.zip build
- task: PublishBuildArtifacts@1
inputs:
artifactName: msvc$(MSVC)-snapshot
pathtoPublish: msvc$(MSVC)-snapshot.zip
- job: docker
timeoutInMinutes: 0
pool:
vmImage: ubuntu-16.04
strategy:
maxParallel: 10
matrix:
msvc9:
MSVC: 9
msvc10:
MSVC: 10
#msvc11:
# MSVC: 11
#msvc12:
# MSVC: 12
msvc14:
MSVC: 14
msvc15:
MSVC: 15
msvc16:
MSVC: 16
steps:
# free up space
- script: df -h .
- script: |
docker rm $(docker ps -a -q)
docker rmi $(docker images -q) --force
docker system prune --all --force
- script: sudo apt-get clean
- script: sudo rm -rf /opt/ghc
- script: sudo rm -rf /usr/local/lib/android
- script: df -h .
- task: DownloadBuildArtifacts@0
inputs:
artifactName: wine
downloadPath: $(Build.Repository.LocalPath)
- script: ls -la $(Build.Repository.LocalPath)
- script: ls -la $(Build.Repository.LocalPath)/*
- script: gunzip -c $(Build.Repository.LocalPath)/wine/wine.tar.gz | docker load
- script: rm -rf wine
- script: df -h .
- task: DownloadBuildArtifacts@0
inputs:
artifactName: msvc$(MSVC)-snapshot
downloadPath: $(Build.Repository.LocalPath)
- script: ls -la $(Build.Repository.LocalPath)
- script: ls -la $(Build.Repository.LocalPath)/*
- script: find . -iname \*snapshot.zip
- script: find . -iname \*snapshot.zip | xargs -Ifile unzip -o file
- script: find . -iname \*snapshot.zip | xargs rm
- script: ls -la $(Build.Repository.LocalPath)/build
- script: df -h .
- script: make buildmsvc$(MSVC)
- script: docker images
- script: df -h .
- script: rm -rf build
- script: df -h .
- script: |
cd examples
make windev$(MSVC)
- script: docker images
# free up space
- script: df -h .
- script: docker rmi windev:$(MSVC)
- script: df -h
- script: docker save msvc:$(MSVC) | gzip > msvc$(MSVC).tar.gz
- script: df -h .
- task: PublishBuildArtifacts@1
inputs:
artifactName: msvc$(MSVC)
pathtoPublish: msvc$(MSVC).tar.gz
dependsOn:
- download
- wine
- snapshot
condition: succeeded()