Roger Meier | df71a2e | 2015-04-09 01:06:49 +0200 | [diff] [blame] | 1 | # 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 Sukegawa | e8c71d8 | 2015-11-23 19:51:37 +0900 | [diff] [blame] | 21 | shallow_clone: true |
| 22 | clone_depth: 10 |
| 23 | |
Roger Meier | df71a2e | 2015-04-09 01:06:49 +0200 | [diff] [blame] | 24 | version: '{build}' |
| 25 | os: |
Nobuaki Sukegawa | e8c71d8 | 2015-11-23 19:51:37 +0900 | [diff] [blame] | 26 | # - Windows Server 2012 R2 |
| 27 | - Visual Studio 2015 |
Roger Meier | df71a2e | 2015-04-09 01:06:49 +0200 | [diff] [blame] | 28 | |
| 29 | environment: |
Nobuaki Sukegawa | 1425c5a | 2016-02-28 12:26:48 +0900 | [diff] [blame^] | 30 | BOOST_ROOT: C:\Libraries\boost_1_59_0 |
| 31 | BOOST_LIBRARYDIR: C:\Libraries\boost_1_59_0\lib64-msvc-14.0 |
Roger Meier | df71a2e | 2015-04-09 01:06:49 +0200 | [diff] [blame] | 32 | |
Roger Meier | 5d0a806 | 2015-04-12 21:06:11 +0200 | [diff] [blame] | 33 | install: |
Nobuaki Sukegawa | e8c71d8 | 2015-11-23 19:51:37 +0900 | [diff] [blame] | 34 | - '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64' |
Nobuaki Sukegawa | 1425c5a | 2016-02-28 12:26:48 +0900 | [diff] [blame^] | 35 | - cd \ |
Nobuaki Sukegawa | e8c71d8 | 2015-11-23 19:51:37 +0900 | [diff] [blame] | 36 | # Zlib |
| 37 | - appveyor DownloadFile https://github.com/madler/zlib/archive/v1.2.8.tar.gz |
Nobuaki Sukegawa | 1425c5a | 2016-02-28 12:26:48 +0900 | [diff] [blame^] | 38 | - 7z x v1.2.8.tar.gz -so | 7z x -si -ttar > nul |
Nobuaki Sukegawa | e8c71d8 | 2015-11-23 19:51:37 +0900 | [diff] [blame] | 39 | - cd zlib-1.2.8 |
| 40 | - cmake -G "Visual Studio 14 2015 Win64" . |
| 41 | - cmake --build . --config release |
| 42 | - cd .. |
| 43 | # OpenSSL |
Nobuaki Sukegawa | 1ea3ca5 | 2016-02-01 22:01:14 +0900 | [diff] [blame] | 44 | - appveyor DownloadFile https://slproweb.com/download/Win64OpenSSL-1_0_2f.exe |
| 45 | - ps: Start-Process Win64OpenSSL-1_0_2f.exe -ArgumentList "/silent /verysilent /sp- /suppressmsgboxes" -Wait |
Nobuaki Sukegawa | e8c71d8 | 2015-11-23 19:51:37 +0900 | [diff] [blame] | 46 | # Libevent |
| 47 | - appveyor DownloadFile https://github.com/libevent/libevent/releases/download/release-2.0.22-stable/libevent-2.0.22-stable.tar.gz |
Nobuaki Sukegawa | 1425c5a | 2016-02-28 12:26:48 +0900 | [diff] [blame^] | 48 | - 7z x libevent-2.0.22-stable.tar.gz -so | 7z x -si -ttar > nul |
Nobuaki Sukegawa | e8c71d8 | 2015-11-23 19:51:37 +0900 | [diff] [blame] | 49 | - cd libevent-2.0.22-stable |
| 50 | - nmake -f Makefile.nmake |
| 51 | - mkdir lib |
| 52 | - move *.lib lib\ |
| 53 | - move WIN32-Code\event2\* include\event2\ |
| 54 | - move *.h include\ |
| 55 | - cd .. |
Roger Meier | df71a2e | 2015-04-09 01:06:49 +0200 | [diff] [blame] | 56 | - cinst winflexbison |
Nobuaki Sukegawa | aa7d0d5 | 2016-02-27 03:04:34 +0900 | [diff] [blame] | 57 | - appveyor DownloadFile http://www.us.apache.org/dist//ant/binaries/apache-ant-1.9.6-bin.zip |
Nobuaki Sukegawa | 1425c5a | 2016-02-28 12:26:48 +0900 | [diff] [blame^] | 58 | - 7z x apache-ant-1.9.6-bin.zip > nul |
Nobuaki Sukegawa | aa7d0d5 | 2016-02-27 03:04:34 +0900 | [diff] [blame] | 59 | - cd %APPVEYOR_BUILD_FOLDER% |
Nobuaki Sukegawa | e8c71d8 | 2015-11-23 19:51:37 +0900 | [diff] [blame] | 60 | # TODO: Enable Haskell build |
| 61 | # - cinst HaskellPlatform -version 2014.2.0.0 |
| 62 | |
Roger Meier | df71a2e | 2015-04-09 01:06:49 +0200 | [diff] [blame] | 63 | |
| 64 | build_script: |
Nobuaki Sukegawa | aa7d0d5 | 2016-02-27 03:04:34 +0900 | [diff] [blame] | 65 | - set PATH=C:\ProgramData\chocolatey\bin;C:\apache-ant-1.9.6\bin;%PATH% |
| 66 | - set JAVA_HOME=C:\Program Files\Java\jdk1.7.0 |
| 67 | - set PATH=%JAVA_HOME%\bin;%PATH% |
Nobuaki Sukegawa | e8c71d8 | 2015-11-23 19:51:37 +0900 | [diff] [blame] | 68 | # - set PATH=%PATH%;C:\Program Files (x86)\Haskell Platform\2014.2.0.0\bin |
| 69 | # - set PATH=%PATH%;C:\Program Files (x86)\Haskell Platform\2014.2.0.0\lib\extralibs\bin |
Nobuaki Sukegawa | 1425c5a | 2016-02-28 12:26:48 +0900 | [diff] [blame^] | 70 | - set PATH=C:\Python27-x64\scripts;C:\Python27-x64;%PATH% |
Roger Meier | df71a2e | 2015-04-09 01:06:49 +0200 | [diff] [blame] | 71 | - mkdir cmake-build |
| 72 | - cd cmake-build |
Nobuaki Sukegawa | 1425c5a | 2016-02-28 12:26:48 +0900 | [diff] [blame^] | 73 | - 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 Sukegawa | aa7d0d5 | 2016-02-27 03:04:34 +0900 | [diff] [blame] | 74 | - findstr /b /e BUILD_COMPILER:BOOL=ON CMakeCache.txt |
Nobuaki Sukegawa | 1425c5a | 2016-02-28 12:26:48 +0900 | [diff] [blame^] | 75 | - findstr /b /e BUILD_CPP:BOOL=ON CMakeCache.txt |
Nobuaki Sukegawa | aa7d0d5 | 2016-02-27 03:04:34 +0900 | [diff] [blame] | 76 | - findstr /b /e BUILD_JAVA:BOOL=ON CMakeCache.txt |
Nobuaki Sukegawa | 1425c5a | 2016-02-28 12:26:48 +0900 | [diff] [blame^] | 77 | - findstr /b /e BUILD_PYTHON:BOOL=ON CMakeCache.txt |
| 78 | # - findstr /b /e BUILD_C_GLIB:BOOL=ON CMakeCache.txt |
| 79 | # - findstr /b /e BUILD_HASKELL:BOOL=ON CMakeCache.txt |
Nobuaki Sukegawa | aa7d0d5 | 2016-02-27 03:04:34 +0900 | [diff] [blame] | 80 | - findstr /b /e BUILD_TESTING:BOOL=ON CMakeCache.txt |
Nobuaki Sukegawa | e8c71d8 | 2015-11-23 19:51:37 +0900 | [diff] [blame] | 81 | # - cmake --build . |
Roger Meier | df71a2e | 2015-04-09 01:06:49 +0200 | [diff] [blame] | 82 | - cmake --build . --config Release |
Nobuaki Sukegawa | e8c71d8 | 2015-11-23 19:51:37 +0900 | [diff] [blame] | 83 | # TODO: Fix cpack |
| 84 | # - cpack |
Nobuaki Sukegawa | 1425c5a | 2016-02-28 12:26:48 +0900 | [diff] [blame^] | 85 | # TODO: Run more tests |
| 86 | # CTest fails to invoke ant seemingly due to "ant.bat" v.s. "ant" (shell script) conflict. |
| 87 | # Currently, everything that involves OpenSSL seems to hang forever on our Appveyor setup. |
| 88 | # Also a few C++ tests hang (on Appveyor or on Windows in general). |
| 89 | - ctest -C Release --timeout 600 -VV -E "(concurrency_test|processor_test|TInterruptTest|StressTestNonBlocking|OpenSSLManualInitTest|SecurityTest|PythonTestSSLSocket|python_test$|^Java)" |
Roger Meier | df71a2e | 2015-04-09 01:06:49 +0200 | [diff] [blame] | 90 | |
Roger Meier | 5d0a806 | 2015-04-12 21:06:11 +0200 | [diff] [blame] | 91 | #TODO make it perfect ;-r |