[Check]: Disable the document to correct build error.
[platform/upstream/check.git] / appveyor.yml
1 # This is the configuration file for AppVeyor builds.
2 # Look at the following for reference:
3 # https://www.appveyor.com/docs/appveyor-yml
4
5 # Notes:
6 #   - Minimal appveyor.yml file is an empty file. All sections are optional.
7 #   - Indent each level of configuration with 2 spaces. Do not use tabs!
8 #   - All section names are case-sensitive.
9 #   - Section names should be unique on each level.
10
11 #---------------------------------#
12 #      general configuration      #
13 #---------------------------------#
14
15 # version format
16 version: 1.0.{build}
17
18 #---------------------------------#
19 #   environment configuration     #
20 #   and build matrix              #
21 #---------------------------------#
22
23 environment:
24   vsversion: none
25   arch: default
26   matrix:
27   # Visual Studio builds
28 #  - platform: vs
29 #    vsversion: 2008
30 #    arch: x86
31   - platform: vs
32     vsversion: 2010
33     arch: x86
34   - platform: vs
35     vsversion: 2012
36     arch: x86
37   - platform: vs
38     vsversion: 2013
39     arch: x86
40   - platform: vs
41     vsversion: 2015
42     arch: x86
43   - platform: vs
44     vsversion: 2017
45     arch: x86
46     APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
47   - platform: vs
48     vsversion: 2010
49     arch: x64
50   - platform: vs
51     vsversion: 2012
52     arch: x64
53   - platform: vs
54     vsversion: 2013
55     arch: x64
56   - platform: vs
57     vsversion: 2015
58     arch: x64
59   - platform: vs
60     vsversion: 2017
61     arch: x64
62     APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
63   - platform: vs
64     vsversion: 2012
65     arch: ARM
66   - platform: vs
67     vsversion: 2013
68     arch: ARM
69   - platform: vs
70     vsversion: 2015
71     arch: ARM
72   - platform: vs
73     vsversion: 2017
74     arch: ARM
75     APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
76   # Other compilers than Visual Studio
77   - platform: msvc
78   - platform: cygwin
79   - platform: mingw32
80   - platform: mingw64msys
81
82 # clone directory
83 clone_folder: c:\projects\check
84
85 # build Configuration, i.e. Debug, Release, etc.
86 configuration: Release
87
88
89 #---------------------------------#
90 #   scripts that are called at    #
91 #   the very beginning, before    #
92 #   repo cloning                  #
93 #---------------------------------#
94
95 init:
96   - git config --global core.autocrlf input
97
98
99 #---------------------------------#
100 #   scripts to run before build   #
101 #---------------------------------#
102
103 before_build:
104   - cd c:\projects\check
105   - echo Directory before starting build...
106   - dir
107   - echo Starting pre-build step...
108   # Remove the following from the path, as it will interfere with
109   # the MinGW builds
110   - set PATH=%PATH:C:\Program Files\Git\usr\bin;=%
111   - if %platform%==msvc call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat"
112   - if %platform%==msvc mkdir build
113   - if %platform%==msvc chdir build
114   - if %platform%==msvc cmake --version
115   - if %platform%==msvc cmake -G "NMake Makefiles" -DCMAKE_INSTALL_PREFIX=%P% -DCMAKE_BUILD_TYPE=Debug ..
116   - if %platform%==vs (
117       set "makecommand=Visual Studio"
118     )
119   - set "vcx=false"
120   - set "vcs=false"
121   - if %platform%==vs (
122       set "vcx=true"
123     )
124   - if %vsversion%==2005 (
125       set "vcs=true"
126     )
127   - if %vsversion%==2008 (
128       set "vcs=true"
129     )
130   - if %vcs%==true (
131       set "vcx=false"
132     )
133   - if %vsversion%==2005 (
134       set "makecommand=%makecommand% 8 %vsversion%"
135     )
136   - if %vsversion%==2008 (
137       set "makecommand=%makecommand% 9 %vsversion%"
138     )
139   - if %vsversion%==2010 (
140       set "makecommand=%makecommand% 10 %vsversion%"
141     )
142   - if %vsversion%==2012 (
143       set "makecommand=%makecommand% 11 %vsversion%"
144     )
145   - if %vsversion%==2013 (
146       set "makecommand=%makecommand% 12 %vsversion%"
147     )
148   - if %vsversion%==2015 (
149       set "makecommand=%makecommand% 14 %vsversion%"
150     )
151   - if %vsversion%==2017 (
152       set "makecommand=%makecommand% 15 %vsversion%"
153     )
154   - if %arch%==x64 (
155       set "makecommand=%makecommand% Win64"
156     )
157   - if %arch%==ARM (
158       set "makecommand=%makecommand% ARM"
159     )
160   - if %platform%==vs mkdir build
161   - if %platform%==vs chdir build
162   - if %platform%==vs cmake --version
163   - if %platform%==vs cmake -G "%makecommand%" -DCMAKE_INSTALL_PREFIX=%P% -DCMAKE_BUILD_TYPE=Debug ..
164   - if %platform%==cygwin set PATH=C:\cygwin\bin;%PATH%
165   - if %platform%==cygwin bash -c "autoreconf -i"
166   - if %platform%==cygwin bash -c "./configure"
167   - if %platform%==mingw32 set PATH=C:\MinGW\bin;%PATH%
168   - if %platform%==mingw32 mkdir build
169   - if %platform%==mingw32 chdir build
170   - if %platform%==mingw32 cmake --version
171   - if %platform%==mingw32 cmake -G "MinGW Makefiles" -DCMAKE_INSTALL_PREFIX=%P% -DCMAKE_BUILD_TYPE=Debug ..
172   - if %platform%==mingw64msys set PATH=C:\msys64\mingw64\bin;C:\msys64\usr\bin;%PATH%
173   - if %platform%==mingw64msys bash -c "autoreconf -i"
174   - if %platform%==mingw64msys bash -c "./configure"
175
176
177 #---------------------------------#
178 #   build code and unit tests     #
179 #---------------------------------#
180
181 build_script:
182   - echo Directory before running build step...
183   - dir
184   - echo Building code...
185   - if %platform%==msvc nmake
186   - if %platform%==cygwin bash -c "make"
187   - if %platform%==mingw32 mingw32-make
188   - if %platform%==mingw64msys bash -c "make"
189   - if %vcx%==true msbuild /p:Platform=%arch% "ALL_BUILD.vcxproj"
190   # Build for VS2008 (prior to the vsxproj file format), only 32 bit
191   # Options see https://msdn.microsoft.com/en-us/library/ms164311.aspx
192   - if %vcs%==true msbuild /p:Configuration=Release /p:Platform=Win32 /nologo /v:d "check.sln"
193
194
195 #---------------------------------#
196 #   run unit test for all x86     #
197 #   and x64 architecture builds   #
198 #---------------------------------#
199
200 test_script:
201   - set "testplatform=%platform%"
202   # Can not run ARM builds on x86/x64 build images
203   - if %arch%==ARM (
204       set "testplatform=none"
205     )
206   - echo Project directory before running test step...
207   - dir
208   - echo tests directory before running test step...
209   - dir tests
210   - echo Running unit tests...
211   - if %testplatform%==msvc nmake test VERBOSE=1 CTEST_OUTPUT_ON_FAILURE=TRUE
212   - if %testplatform%==vs ctest --extra-verbose -C Release
213   - if %testplatform%==cygwin bash -c "make check"
214   - if %testplatform%==mingw32 tests\check_check.exe
215   - if %testplatform%==mingw64msys bash -c "tests/check_check"
216   - if %testplatform%==none echo Can not test for %arch% here
217
218
219 #---------------------------------#
220 #   build and test completed      #
221 #---------------------------------#
222
223 on_finish:
224   - echo Project directory after running tests...
225   - dir
226   - echo tests directory after running tests...
227   - dir tests
228   - if %platform%==cygwin bash -c "cat tests/test-suite.log || true"
229