blob: 4324c63687deab32c5bf93c08f54e60b663d8d8f [file] [log] [blame]
Roger Meierdf71a2e2015-04-09 01:06:49 +02001# Licensed to the Apache Software Foundation (ASF) under one
2# or more contributor license agreements. See the NOTICE file
3# distributed with this work for additional information
4# regarding copyright ownership. The ASF licenses this file
5# to you under the Apache License, Version 2.0 (the
6# "License"); you may not use this file except in compliance
7# with the License. You may obtain a copy of the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing,
12# software distributed under the License is distributed on an
13# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14# KIND, either express or implied. See the License for the
15# specific language governing permissions and limitations
16# under the License.
17#
18
19# build Apache Thrift on AppVeyor - https://ci.appveyor.com
20
Nobuaki Sukegawae8c71d82015-11-23 19:51:37 +090021shallow_clone: true
22clone_depth: 10
23
Roger Meierdf71a2e2015-04-09 01:06:49 +020024version: '{build}'
25os:
Nobuaki Sukegawae8c71d82015-11-23 19:51:37 +090026# - Windows Server 2012 R2
27- Visual Studio 2015
Roger Meierdf71a2e2015-04-09 01:06:49 +020028
29environment:
Nobuaki Sukegawa1425c5a2016-02-28 12:26:48 +090030 BOOST_ROOT: C:\Libraries\boost_1_59_0
31 BOOST_LIBRARYDIR: C:\Libraries\boost_1_59_0\lib64-msvc-14.0
Nobuaki Sukegawa9549b252016-05-15 00:25:17 +090032 # Unfurtunately, these versions need manual update because old versions are quickly deleted.
33 ANT_VERSION: 1.9.7
Nobuaki Sukegawabe3acfd2016-09-26 00:09:00 +090034 OPENSSL_VERSION: 1_0_2i
Roger Meierdf71a2e2015-04-09 01:06:49 +020035
Roger Meier5d0a8062015-04-12 21:06:11 +020036install:
Nobuaki Sukegawae8c71d82015-11-23 19:51:37 +090037- '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64'
Nobuaki Sukegawa1425c5a2016-02-28 12:26:48 +090038- cd \
Nobuaki Sukegawae8c71d82015-11-23 19:51:37 +090039 # Zlib
40- appveyor DownloadFile https://github.com/madler/zlib/archive/v1.2.8.tar.gz
Nobuaki Sukegawa1425c5a2016-02-28 12:26:48 +090041- 7z x v1.2.8.tar.gz -so | 7z x -si -ttar > nul
Nobuaki Sukegawae8c71d82015-11-23 19:51:37 +090042- cd zlib-1.2.8
43- cmake -G "Visual Studio 14 2015 Win64" .
44- cmake --build . --config release
45- cd ..
46 # OpenSSL
Nobuaki Sukegawa9549b252016-05-15 00:25:17 +090047- appveyor DownloadFile https://slproweb.com/download/Win64OpenSSL-%OPENSSL_VERSION%.exe
48- ps: Start-Process "Win64OpenSSL-${env:OPENSSL_VERSION}.exe" -ArgumentList "/silent /verysilent /sp- /suppressmsgboxes" -Wait
Nobuaki Sukegawae8c71d82015-11-23 19:51:37 +090049 # Libevent
50- appveyor DownloadFile https://github.com/libevent/libevent/releases/download/release-2.0.22-stable/libevent-2.0.22-stable.tar.gz
Nobuaki Sukegawa1425c5a2016-02-28 12:26:48 +090051- 7z x libevent-2.0.22-stable.tar.gz -so | 7z x -si -ttar > nul
Nobuaki Sukegawae8c71d82015-11-23 19:51:37 +090052- cd libevent-2.0.22-stable
53- nmake -f Makefile.nmake
54- mkdir lib
55- move *.lib lib\
56- move WIN32-Code\event2\* include\event2\
57- move *.h include\
58- cd ..
Nobuaki Sukegawa1e3cf9b2016-09-26 00:22:29 +090059- appveyor-retry cinst -y winflexbison
Nobuaki Sukegawa9549b252016-05-15 00:25:17 +090060- appveyor DownloadFile http://www.us.apache.org/dist/ant/binaries/apache-ant-%ANT_VERSION%-bin.zip
61- 7z x apache-ant-%ANT_VERSION%-bin.zip > nul
Nobuaki Sukegawaaa7d0d52016-02-27 03:04:34 +090062- cd %APPVEYOR_BUILD_FOLDER%
Nobuaki Sukegawae8c71d82015-11-23 19:51:37 +090063# TODO: Enable Haskell build
64# - cinst HaskellPlatform -version 2014.2.0.0
65
Roger Meierdf71a2e2015-04-09 01:06:49 +020066
67build_script:
Nobuaki Sukegawa9549b252016-05-15 00:25:17 +090068- set PATH=C:\ProgramData\chocolatey\bin;C:\apache-ant-%ANT_VERSION%\bin;%PATH%
Nobuaki Sukegawaaa7d0d52016-02-27 03:04:34 +090069- set JAVA_HOME=C:\Program Files\Java\jdk1.7.0
70- set PATH=%JAVA_HOME%\bin;%PATH%
Nobuaki Sukegawae8c71d82015-11-23 19:51:37 +090071# - set PATH=%PATH%;C:\Program Files (x86)\Haskell Platform\2014.2.0.0\bin
72# - set PATH=%PATH%;C:\Program Files (x86)\Haskell Platform\2014.2.0.0\lib\extralibs\bin
Nobuaki Sukegawa1425c5a2016-02-28 12:26:48 +090073- set PATH=C:\Python27-x64\scripts;C:\Python27-x64;%PATH%
Nobuaki Sukegawabf9fa902016-09-04 18:49:21 +090074- pip install ipaddress backports.ssl_match_hostname tornado twisted
Roger Meierdf71a2e2015-04-09 01:06:49 +020075- mkdir cmake-build
76- cd cmake-build
Nobuaki Sukegawa1425c5a2016-02-28 12:26:48 +090077- cmake -G "Visual Studio 14 2015 Win64" -DWITH_SHARED_LIB=OFF -DLIBEVENT_ROOT=C:\libevent-2.0.22-stable -DZLIB_INCLUDE_DIR=C:\zlib-1.2.8 -DZLIB_LIBRARY=C:\zlib-1.2.8\release\zlibstatic.lib -DBOOST_ROOT="%BOOST_ROOT%" -DBOOST_LIBRARYDIR="%BOOST_LIBRARYDIR%" ..
Nobuaki Sukegawaaa7d0d52016-02-27 03:04:34 +090078- findstr /b /e BUILD_COMPILER:BOOL=ON CMakeCache.txt
Nobuaki Sukegawa1425c5a2016-02-28 12:26:48 +090079- findstr /b /e BUILD_CPP:BOOL=ON CMakeCache.txt
Nobuaki Sukegawaaa7d0d52016-02-27 03:04:34 +090080- findstr /b /e BUILD_JAVA:BOOL=ON CMakeCache.txt
Nobuaki Sukegawa1425c5a2016-02-28 12:26:48 +090081- findstr /b /e BUILD_PYTHON:BOOL=ON CMakeCache.txt
82# - findstr /b /e BUILD_C_GLIB:BOOL=ON CMakeCache.txt
83# - findstr /b /e BUILD_HASKELL:BOOL=ON CMakeCache.txt
Nobuaki Sukegawaaa7d0d52016-02-27 03:04:34 +090084- findstr /b /e BUILD_TESTING:BOOL=ON CMakeCache.txt
Nobuaki Sukegawae8c71d82015-11-23 19:51:37 +090085# - cmake --build .
Roger Meierdf71a2e2015-04-09 01:06:49 +020086- cmake --build . --config Release
Nobuaki Sukegawae8c71d82015-11-23 19:51:37 +090087# TODO: Fix cpack
88# - cpack
Nobuaki Sukegawa1425c5a2016-02-28 12:26:48 +090089# TODO: Run more tests
90# CTest fails to invoke ant seemingly due to "ant.bat" v.s. "ant" (shell script) conflict.
91# Currently, everything that involves OpenSSL seems to hang forever on our Appveyor setup.
92# Also a few C++ tests hang (on Appveyor or on Windows in general).
93- ctest -C Release --timeout 600 -VV -E "(concurrency_test|processor_test|TInterruptTest|StressTestNonBlocking|OpenSSLManualInitTest|SecurityTest|PythonTestSSLSocket|python_test$|^Java)"
Roger Meierdf71a2e2015-04-09 01:06:49 +020094
Roger Meier5d0a8062015-04-12 21:06:11 +020095#TODO make it perfect ;-r