• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#***************************************************************************
2#                                  _   _ ____  _
3#  Project                     ___| | | |  _ \| |
4#                             / __| | | | |_) | |
5#                            | (__| |_| |  _ <| |___
6#                             \___|\___/|_| \_\_____|
7#
8# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
9#
10# This software is licensed as described in the file COPYING, which
11# you should have received as part of this distribution. The terms
12# are also available at https://curl.se/docs/copyright.html.
13#
14# You may opt to use, copy, modify, merge, publish, distribute and/or sell
15# copies of the Software, and permit persons to whom the Software is
16# furnished to do so, under the terms of the COPYING file.
17#
18# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19# KIND, either express or implied.
20#
21# SPDX-License-Identifier: curl
22#
23###########################################################################
24# https://dev.azure.com/daniel0244/curl/_build?view=runs
25#
26# Azure Pipelines configuration:
27# https://aka.ms/yaml
28
29trigger:
30  branches:
31    include:
32    - 'master'
33    - '*/ci'
34  paths:
35    exclude:
36    - '.circleci/*'
37    - '.cirrus.yml'
38    - '.github/*'
39    - 'appveyor.yml'
40    - 'packages/*'
41    - 'plan9/*'
42
43pr:
44  branches:
45    include:
46    - 'master'
47
48stages:
49
50##########################################
51### Linux jobs first
52##########################################
53
54- stage: linux
55  dependsOn: []
56  jobs:
57  - job: ubuntu
58    # define defaults to make sure variables are always expanded/replaced
59    variables:
60      install: ''
61      configure: ''
62      tests: '!433'
63    timeoutInMinutes: 60
64    pool:
65      vmImage: 'ubuntu-latest'
66    strategy:
67      matrix:
68        default:
69          name: default
70          install:
71          configure: --enable-debug --with-openssl
72        disable_ipv6:
73          name: w/o IPv6
74          configure: --disable-ipv6 --with-openssl
75        disable_http_smtp_imap:
76          name: w/o HTTP/SMTP/IMAP
77          configure: --disable-http --disable-smtp --disable-imap --without-ssl
78        disable_thredres:
79          name: sync resolver
80          configure: --disable-threaded-resolver --with-openssl
81        https_only:
82          name: HTTPS only
83          configure: --disable-dict --disable-file --disable-ftp --disable-gopher --disable-imap --disable-ldap --disable-pop3 --disable-rtmp --disable-rtsp --disable-scp --disable-sftp --disable-smb --disable-smtp --disable-telnet --disable-tftp --with-openssl
84        torture:
85          name: torture
86          install: libnghttp2-dev
87          configure: --enable-debug --disable-shared --disable-threaded-resolver --with-openssl
88          tests: -n -t --shallow=25 !FTP
89    steps:
90    - script: sudo apt-get update && sudo apt-get install -y stunnel4 python3-impacket libzstd-dev libbrotli-dev $(install)
91      displayName: 'apt install'
92      retryCountOnTaskFailure: 3
93
94    - script: autoreconf -fi && ./configure --enable-warnings --enable-werror $(configure)
95      displayName: 'configure $(name)'
96
97    - script: make V=1 && make V=1 examples && cd tests && make V=1
98      displayName: 'compile'
99      env:
100        MAKEFLAGS: "-j 2"
101
102    - script: make V=1 test-ci
103      displayName: 'test'
104      env:
105        AZURE_ACCESS_TOKEN: "$(System.AccessToken)"
106        TFLAGS: "-ac /usr/bin/curl -r $(tests)"
107
108- stage: distcheck
109  dependsOn: []
110  jobs:
111  - job: ubuntu
112    timeoutInMinutes: 30
113    pool:
114      vmImage: 'ubuntu-latest'
115    steps:
116    - script: autoreconf -fi && ./configure --without-ssl
117      displayName: 'configure $(name)'
118
119    - script: make && ./maketgz 99.98.97
120      displayName: 'make tarball'
121
122    - script: |
123        tar xf curl-99.98.97.tar.gz
124        cd curl-99.98.97
125        ./configure --prefix=$HOME/temp --without-ssl
126        make
127        make TFLAGS=1 test
128        make install
129        # basic check of the installed files
130        cd ..
131        bash scripts/installcheck.sh $HOME/temp
132        rm -rf curl-99.98.97
133
134      displayName: 'verify in-tree configure build'
135
136    - script: |
137        # verify out-of-tree build
138        tar xf curl-99.98.97.tar.gz
139        touch curl-99.98.97/docs/{cmdline-opts,libcurl}/Makefile.inc
140        mkdir build
141        cd build
142        ../curl-99.98.97/configure --without-ssl
143        make
144        make TFLAGS='-p 1 1139' test
145        # verify cmake build
146        cd ..
147        rm -rf curl-99.98.97
148
149      displayName: 'verify out-of-tree configure build'
150
151    - script: |
152        tar xf curl-99.98.97.tar.gz
153        cd curl-99.98.97
154        mkdir build
155        cd build
156        cmake ..
157        make
158
159      displayName: 'verify out-of-tree cmake build'
160
161- stage: scanbuild
162  dependsOn: []
163  jobs:
164  - job: ubuntu
165    timeoutInMinutes: 30
166    pool:
167      vmImage: 'ubuntu-latest'
168    steps:
169    - script: sudo apt-get update && sudo apt-get install -y clang-tools clang libssl-dev libssh2-1-dev libpsl-dev libbrotli-dev libzstd-dev
170      displayName: 'apt install'
171      retryCountOnTaskFailure: 3
172
173    - script: autoreconf -fi
174      displayName: 'autoreconf'
175
176    - script: scan-build ./configure --enable-debug --enable-werror --with-openssl --with-libssh2
177      displayName: 'configure'
178      env:
179        CC: "clang"
180        CCX: "clang++"
181
182    - script: scan-build --status-bugs make
183      displayName: 'make'
184
185    - script: scan-build --status-bugs make examples
186      displayName: 'make examples'
187
188##########################################
189### Windows jobs below
190##########################################
191
192- stage: windows
193  dependsOn: []
194  variables:
195    agent.preferPowerShellOnContainers: true
196  jobs:
197  - job: msys
198    # define defaults to make sure variables are always expanded/replaced
199    variables:
200      container_img: ''
201      container_cmd: ''
202      configure: ''
203      tests: ''
204    timeoutInMinutes: 120
205    pool:
206      vmImage: 'windows-2019'
207    strategy:
208      matrix:
209        v2_mingw32_openssl:
210          name: 32-bit OpenSSL/libssh2
211          container_img: ghcr.io/mback2k/curl-docker-winbuildenv/msys2-mingw32:ltsc2019
212          container_cmd: C:\msys64\usr\bin\sh
213          prepare: pacman -S --needed --noconfirm --noprogressbar libssh2-devel mingw-w64-i686-libssh2 mingw-w64-i686-python-pip mingw-w64-i686-python-wheel mingw-w64-i686-python-pyopenssl && python3 -m pip install --prefer-binary impacket
214          configure: --host=i686-w64-mingw32 --build=i686-w64-mingw32 --prefix=/mingw32 --enable-debug --enable-werror --with-libssh2 --with-openssl
215          tests: "~571"
216        v2_mingw64_openssl:
217          name: 64-bit OpenSSL/libssh2
218          container_img: ghcr.io/mback2k/curl-docker-winbuildenv/msys2-mingw64:ltsc2019
219          container_cmd: C:\msys64\usr\bin\sh
220          prepare: pacman -S --needed --noconfirm --noprogressbar libssh2-devel mingw-w64-x86_64-libssh2 mingw-w64-x86_64-python-pip mingw-w64-x86_64-python-wheel mingw-w64-x86_64-python-pyopenssl && python3 -m pip install --prefer-binary impacket
221          configure: --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --prefix=/mingw64 --enable-debug --enable-werror --with-libssh2 --with-openssl
222          tests: "~571"
223        v2_mingw64_libssh:
224          name: 64-bit OpenSSL/libssh
225          container_img: ghcr.io/mback2k/curl-docker-winbuildenv/msys2-mingw64:ltsc2019
226          container_cmd: C:\msys64\usr\bin\sh
227          prepare: pacman -S --needed --noconfirm --noprogressbar libssh-devel mingw-w64-x86_64-libssh
228          configure: --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --prefix=/mingw64 --enable-debug --enable-werror --with-libssh --with-openssl
229          tests: "~571 ~614"
230        v1_mingw:
231          name: 32-bit (legacy)
232          container_img: ghcr.io/mback2k/curl-docker-winbuildenv/msys1-mingw:ltsc2019
233          container_cmd: C:\MinGW\msys\1.0\bin\sh
234          configure: --host=i686-pc-mingw32 --build=i686-pc-mingw32 --prefix=/mingw --enable-debug --without-ssl --with-mingw1-deprecated
235          tests: "!203 !1143"
236        v1_mingw32:
237          name: 32-bit w/o zlib
238          container_img: ghcr.io/mback2k/curl-docker-winbuildenv/msys1-mingw32:ltsc2019
239          container_cmd: C:\MinGW\msys\1.0\bin\sh
240          configure: --host=i686-w64-mingw32 --build=i686-w64-mingw32 --prefix=/mingw32 --enable-debug --enable-werror --without-zlib --without-ssl
241          tests: "!203 !1143"
242        v1_mingw64:
243          name: 64-bit w/o zlib
244          container_img: ghcr.io/mback2k/curl-docker-winbuildenv/msys1-mingw64:ltsc2019
245          container_cmd: C:\MinGW\msys\1.0\bin\sh
246          configure: --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --prefix=/mingw64 --enable-debug --enable-werror --without-zlib --without-ssl
247          tests: "!203 !1143"
248        v2_mingw32_schannel:
249          name: 32-bit Schannel/SSPI/WinIDN/libssh2
250          container_img: ghcr.io/mback2k/curl-docker-winbuildenv/msys2-mingw32:ltsc2019
251          container_cmd: C:\msys64\usr\bin\sh
252          prepare: pacman -S --needed --noconfirm --noprogressbar libssh2-devel mingw-w64-i686-libssh2 mingw-w64-i686-python-pip mingw-w64-i686-python-wheel mingw-w64-i686-python-pyopenssl && python3 -m pip install --prefer-binary impacket
253          configure: --host=i686-w64-mingw32 --build=i686-w64-mingw32 --prefix=/mingw32 --enable-debug --enable-werror --enable-sspi --with-schannel --with-winidn --with-libssh2
254          tests: "~571"
255        v2_mingw64_schannel:
256          name: 64-bit Schannel/SSPI/WinIDN/libssh2
257          container_img: ghcr.io/mback2k/curl-docker-winbuildenv/msys2-mingw64:ltsc2019
258          container_cmd: C:\msys64\usr\bin\sh
259          prepare: pacman -S --needed --noconfirm --noprogressbar libssh2-devel mingw-w64-x86_64-libssh2 mingw-w64-x86_64-python-pip mingw-w64-x86_64-python-wheel mingw-w64-x86_64-python-pyopenssl && python3 -m pip install --prefer-binary impacket
260          configure: --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --prefix=/mingw64 --enable-debug --enable-werror --enable-sspi --with-schannel --with-winidn --with-libssh2
261          tests: "~571"
262        v1_mingw_schannel:
263          name: 32-bit Schannel/SSPI/WinIDN (legacy)
264          container_img: ghcr.io/mback2k/curl-docker-winbuildenv/msys1-mingw:ltsc2019
265          container_cmd: C:\MinGW\msys\1.0\bin\sh
266          configure: --host=i686-pc-mingw32 --build=i686-pc-mingw32 --prefix=/mingw --enable-debug --enable-sspi --with-schannel --with-winidn --with-mingw1-deprecated
267          tests: "!203 !305 !311 !312 !313 !404 !1143 !2033 !2035 !2038 !2041 !2042 !2048 !2070 !2079 !2087 !3023 !3024"
268        v1_mingw32_schannel:
269          name: 32-bit Schannel/SSPI/WinIDN w/o zlib
270          container_img: ghcr.io/mback2k/curl-docker-winbuildenv/msys1-mingw32:ltsc2019
271          container_cmd: C:\MinGW\msys\1.0\bin\sh
272          configure: --host=i686-w64-mingw32 --build=i686-w64-mingw32 --prefix=/mingw32 --enable-debug --enable-werror --enable-sspi --with-schannel --with-winidn --without-zlib
273          tests: "!203 !1143"
274        v1_mingw64_schannel:
275          name: 64-bit Schannel/SSPI/WinIDN w/o zlib
276          container_img: ghcr.io/mback2k/curl-docker-winbuildenv/msys1-mingw64:ltsc2019
277          container_cmd: C:\MinGW\msys\1.0\bin\sh
278          configure: --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --prefix=/mingw64  --enable-debug --enable-werror --enable-sspi --with-schannel --with-winidn --without-zlib
279          tests: "!203 !1143"
280    container:
281      image: $(container_img)
282      env:
283        MSYS2_PATH_TYPE: inherit
284    steps:
285    - script: $(container_cmd) -l -c "cd $(echo '%cd%') && $(prepare)"
286      displayName: 'prepare'
287      condition: variables.prepare
288      retryCountOnTaskFailure: 3
289
290    - script: $(container_cmd) -l -c "cd $(echo '%cd%') && autoreconf -fi && ./configure $(configure)"
291      displayName: 'configure $(name)'
292
293    - script: $(container_cmd) -l -c "cd $(echo '%cd%') && make V=1 && make V=1 examples && cd tests && make V=1"
294      displayName: 'compile'
295      env:
296        MAKEFLAGS: "-j 2"
297
298    - script: $(container_cmd) -l -c "cd $(echo '%cd%') && make V=1 install && PATH=/usr/bin:/bin find . -type f -path '*/.libs/*.exe' -print -execdir mv -t .. {} \;"
299      displayName: 'install'
300
301    - script: $(container_cmd) -l -c "cd $(echo '%cd%') && make V=1 test-ci"
302      displayName: 'test'
303      env:
304        AZURE_ACCESS_TOKEN: "$(System.AccessToken)"
305        TFLAGS: "-ac /usr/bin/curl.exe !IDN !SCP ~612 ~1056 $(tests)"
306