forked from c-ares/c-ares
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
118 lines (101 loc) · 5.54 KB
/
appveyor.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
# Copyright (C) The c-ares project and its contributors
# SPDX-License-Identifier: MIT
image: Visual Studio 2015
# Github/Bitbucket only: get source code for one particular commit as zip archive, instead of git clone'ing.
shallow_clone: true
# Github/Bitbucket only: per-file commit filtering
skip_commits:
files:
- .gitignore
- '**/*.md'
- .travis.yml
# List of build configurations to test.
configuration:
- RelWithDebInfo
# Note: You can set extra cmake args for a particular matrix entry with CMAKE_EXTRA_OPTIONS. For example:
# CMAKE_EXTRA_OPTIONS: -DOPENSSL_ROOT_DIR=C:/OpenSSL-Win32
environment:
matrix:
# MSVC 2015, 32-bit x86 (cmake)
- COMPILER: MSVC
BUILDTOOL: CMAKE
MSVC_SETUP_ARG: x86
MSVC_SETUP_PATH: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat
# MSVC 2015, 64-bit x86 (cmake)
- COMPILER: MSVC
BUILDTOOL: CMAKE
MSVC_SETUP_ARG: x64
MSVC_SETUP_PATH: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat
# MinGW, 32-bit x86 (cmake)
- COMPILER: MINGW
BUILDTOOL: CMAKE
PATH: C:\mingw-w64\i686-5.3.0-posix-dwarf-rt_v4-rev0\mingw32\bin;%PATH%
# MinGW, 32-bit x86 (cmake static only)
- COMPILER: MINGW
BUILDTOOL: CMAKESTATIC
PATH: C:\mingw-w64\i686-5.3.0-posix-dwarf-rt_v4-rev0\mingw32\bin;%PATH%
# MSVC 2015, 32-bit x86 (nmake)
- COMPILER: MSVC
BUILDTOOL: NMAKE
MSVC_SETUP_ARG: x86
MSVC_SETUP_PATH: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat
# MSVC 2015, 64-bit x86 (nmake)
- COMPILER: MSVC
BUILDTOOL: NMAKE
MSVC_SETUP_ARG: x64
MSVC_SETUP_PATH: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat
# MinGW, 32-bit x86 (makefiles)
- COMPILER: MINGW
BUILDTOOL: MAKE
PATH: C:\mingw-w64\i686-5.3.0-posix-dwarf-rt_v4-rev0\mingw32\bin;%PATH%
install:
- if "%COMPILER%" == "MINGW" rename "C:\Program Files\Git\usr\bin\sh.exe" "sh2.exe"
before_build:
# Setup build environment for the selected compiler (not all compilers need to do anything here).
# -- Visual Studio --
- if "%COMPILER%" == "MSVC" call "%MSVC_SETUP_PATH%" %MSVC_SETUP_ARG%
build_script:
- if "%BUILDTOOL%" == "NMAKE" copy .\include\ares_build.h.dist .\include\ares_build.h
- if "%BUILDTOOL%" == "NMAKE" nmake /NOLOGO /f .\Makefile.msvc
- if "%BUILDTOOL%" == "CMAKE" mkdir C:\projects\build-cares
- if "%BUILDTOOL%" == "CMAKE" cd C:\projects\build-cares
- if "%BUILDTOOL%" == "CMAKE" cmake -GNinja -DCMAKE_BUILD_TYPE=%configuration% -DCMAKE_INSTALL_PREFIX=C:\projects\build-cares\test_install -DCARES_STATIC=ON -DCARES_STATIC_PIC=ON -DCARES_BUILD_TESTS=ON %CMAKE_EXTRA_OPTIONS% %APPVEYOR_BUILD_FOLDER%
- if "%BUILDTOOL%" == "CMAKE" ninja -v install
- if "%BUILDTOOL%" == "CMAKESTATIC" mkdir C:\projects\build-cares
- if "%BUILDTOOL%" == "CMAKESTATIC" cd C:\projects\build-cares
- if "%BUILDTOOL%" == "CMAKESTATIC" cmake -GNinja -DCMAKE_BUILD_TYPE=%configuration% -DCMAKE_INSTALL_PREFIX=C:\projects\build-cares\test_install -DCARES_SHARED=OFF -DCARES_STATIC=ON -DCARES_STATIC_PIC=ON -DCARES_BUILD_TESTS=ON %CMAKE_EXTRA_OPTIONS% %APPVEYOR_BUILD_FOLDER%
- if "%BUILDTOOL%" == "CMAKESTATIC" ninja -v install
- if "%BUILDTOOL%" == "MAKE" copy .\include\ares_build.h.dist .\include\ares_build.h
- if "%BUILDTOOL%" == "MAKE" mingw32-make.exe -f Makefile.m32 demos
test_script:
# We can't use powershell for tests due to treating stderr as an error
- if "%BUILDTOOL%" == "NMAKE" cd test
- if "%BUILDTOOL%" == "NMAKE" nmake /NOLOGO /f .\Makefile.msvc vtest
- if "%BUILDTOOL%" == "NMAKE" nmake /NOLOGO /f .\Makefile.msvc aresfuzz aresfuzzname dnsdump
- if "%BUILDTOOL%" == "NMAKE" .\msvc\arestest\lib-debug\dnsdump.exe fuzzinput\answer_a fuzzinput\answer_aaaa
- if "%BUILDTOOL%" == "MAKE" cd test
- if "%BUILDTOOL%" == "MAKE" mingw32-make.exe -f Makefile.m32
- if "%BUILDTOOL%" == "MAKE" mingw32-make.exe -f Makefile.m32 aresfuzz.exe aresfuzzname.exe dnsdump.exe
- if "%BUILDTOOL%" == "MAKE" .\dnsdump.exe fuzzinput\answer_a fuzzinput\answer_aaaa
- if "%BUILDTOOL%" == "CMAKE" cd C:\projects\build-cares\bin
- if "%BUILDTOOL%" == "CMAKE" .\adig.exe www.google.com
- if "%BUILDTOOL%" == "CMAKE" .\acountry.exe www.google.com
- if "%BUILDTOOL%" == "CMAKE" .\ahost.exe www.google.com
- if "%BUILDTOOL%" == "CMAKE" .\arestest.exe -4 -v
- if "%BUILDTOOL%" == "CMAKE" .\dnsdump.exe "%APPVEYOR_BUILD_FOLDER%\test\fuzzinput\answer_a" "%APPVEYOR_BUILD_FOLDER%\test\fuzzinput\answer_aaaa"
- if "%BUILDTOOL%" == "CMAKESTATIC" cd C:\projects\build-cares\bin
- if "%BUILDTOOL%" == "CMAKESTATIC" .\adig.exe www.google.com
- if "%BUILDTOOL%" == "CMAKESTATIC" .\acountry.exe www.google.com
- if "%BUILDTOOL%" == "CMAKESTATIC" .\ahost.exe www.google.com
- if "%BUILDTOOL%" == "CMAKESTATIC" .\arestest.exe -4 -v
- if "%BUILDTOOL%" == "CMAKESTATIC" .\dnsdump.exe "%APPVEYOR_BUILD_FOLDER%\test\fuzzinput\answer_a" "%APPVEYOR_BUILD_FOLDER%\test\fuzzinput\answer_aaaa"
#on_finish:
# - cd C:\projects\build-cares\test
# - dir /B *.log > list.txt
# - cmake -E tar cfv all_tests.zip --format=zip --files-from=list.txt
# - appveyor PushArtifact all_tests.zip
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
# Force build worker to stay open after build is done, so we can RDP into it.
# Enable RDP connections into build worker.
#init:
# - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))