Commit ab4dae82 authored by Ivan Shynkarenka's avatar Ivan Shynkarenka

Appveyor Cygwin build

parent 94343b6b
#! /usr/bin/env bash
cmake -Hc++ -B./build-cygwin -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=debug -DCMAKE_INSTALL_PREFIX=./capnproto-c++-cygwin
cmake --build ./build-cygwin --config debug --target install -- -j2
...@@ -50,11 +50,15 @@ environment: ...@@ -50,11 +50,15 @@ environment:
BUILD_NAME: mingw BUILD_NAME: mingw
EXTRA_BUILD_FLAGS: -j2 EXTRA_BUILD_FLAGS: -j2
- BUILD_NAME: cygwin
install: install:
- if not exist "%MINGW_ARCHIVE%" appveyor DownloadFile "%MINGW_URL%" -FileName "%MINGW_ARCHIVE%" - if not exist "%MINGW_ARCHIVE%" appveyor DownloadFile "%MINGW_URL%" -FileName "%MINGW_ARCHIVE%"
- 7z x -y "%MINGW_ARCHIVE%" > nul - 7z x -y "%MINGW_ARCHIVE%" > nul
- ps: Get-Command sh.exe -All | Remove-Item - ps: Get-Command sh.exe -All | Remove-Item
# CMake refuses to generate MinGW Makefiles if sh.exe is in the PATH # CMake refuses to generate MinGW Makefiles if sh.exe is in the PATH
- if "%BUILD_NAME%"=="cygwin" appveyor DownloadFile "http://cygwin.com/setup-x86_64.exe" -FileName "C:\cygwin64\setup-x86_64.exe"
- if "%BUILD_NAME%"=="cygwin" C:\cygwin64\setup-x86_64.exe --quiet-mode --no-shortcuts --upgrade-also --root "C:\cygwin64" --packages cmake
before_build: before_build:
- set PATH=%CD%\%MINGW_DIR%\bin;%PATH% - set PATH=%CD%\%MINGW_DIR%\bin;%PATH%
...@@ -64,24 +68,21 @@ before_build: ...@@ -64,24 +68,21 @@ before_build:
build_script: build_script:
- echo "Building Cap'n Proto with %CMAKE_GENERATOR%" - echo "Building Cap'n Proto with %CMAKE_GENERATOR%"
- >- - if NOT "%BUILD_NAME%"=="cygwin" cmake -Hc++ -B%BUILD_DIR% -G "%CMAKE_GENERATOR%" -DCMAKE_BUILD_TYPE=%BUILD_TYPE% -DCMAKE_INSTALL_PREFIX=%INSTALL_PREFIX%
cmake -Hc++ -B%BUILD_DIR% -G "%CMAKE_GENERATOR%" - if NOT "%BUILD_NAME%"=="cygwin" cmake --build %BUILD_DIR% --config %BUILD_TYPE% --target install -- %EXTRA_BUILD_FLAGS%
-DCMAKE_BUILD_TYPE=%BUILD_TYPE%
-DCMAKE_INSTALL_PREFIX=%INSTALL_PREFIX%
- cmake --build %BUILD_DIR% --config %BUILD_TYPE% --target install -- %EXTRA_BUILD_FLAGS%
# MinGW wants the build type at configure-time while MSVC wants the build type at build-time. We # MinGW wants the build type at configure-time while MSVC wants the build type at build-time. We
# can satisfy both by passing the build type to both cmake invocations. We have to suffer a # can satisfy both by passing the build type to both cmake invocations. We have to suffer a
# warning, but both generators will work. # warning, but both generators will work.
- echo "Building Cap'n Proto samples with %CMAKE_GENERATOR%" - echo "Building Cap'n Proto samples with %CMAKE_GENERATOR%"
- >- - if NOT "%BUILD_NAME%"=="cygwin" cmake -Hc++/samples -B%BUILD_DIR%-samples -G "%CMAKE_GENERATOR%" -DCMAKE_BUILD_TYPE=%BUILD_TYPE% -DCMAKE_PREFIX_PATH=%INSTALL_PREFIX%
cmake -Hc++/samples -B%BUILD_DIR%-samples -G "%CMAKE_GENERATOR%" - if NOT "%BUILD_NAME%"=="cygwin" cmake --build %BUILD_DIR%-samples --config %BUILD_TYPE%
-DCMAKE_BUILD_TYPE=%BUILD_TYPE%
-DCMAKE_PREFIX_PATH=%INSTALL_PREFIX% # Cygwin build
- cmake --build %BUILD_DIR%-samples --config %BUILD_TYPE% - if "%BUILD_NAME%"=="cygwin" C:\cygwin64\bin\bash -lc 'cd /cygdrive/c/projects/capnproto; ./appveyor-cygwin.sh'
test_script: test_script:
- timeout /t 2 - timeout /t 2
# Sleep a little to prevent interleaving test output with build output. # Sleep a little to prevent interleaving test output with build output.
- cd %BUILD_DIR%\src - cd %BUILD_DIR%\src
- ctest -V -C %BUILD_TYPE% - if NOT "%BUILD_NAME%"=="cygwin" ctest -V -C %BUILD_TYPE%
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE. // THE SOFTWARE.
#if __CYGWIN__ #ifndef _GNU_SOURCE
#define _GNU_SOURCE #define _GNU_SOURCE
#endif #endif
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
// This program is a code generator plugin for `capnp compile` which writes the schema back to // This program is a code generator plugin for `capnp compile` which writes the schema back to
// stdout in roughly capnpc format. // stdout in roughly capnpc format.
#if __CYGWIN__ #ifndef _GNU_SOURCE
#define _GNU_SOURCE #define _GNU_SOURCE
#endif #endif
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
// the types are expected to be compatible, the test also constructs an instance of the old // the types are expected to be compatible, the test also constructs an instance of the old
// type and reads it as the new type, and vice versa. // type and reads it as the new type, and vice versa.
#if __CYGWIN__ #ifndef _GNU_SOURCE
#define _GNU_SOURCE #define _GNU_SOURCE
#endif #endif
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE. // THE SOFTWARE.
#if __CYGWIN__ #ifndef _GNU_SOURCE
#define _GNU_SOURCE #define _GNU_SOURCE
#endif #endif
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE. // THE SOFTWARE.
#if __CYGWIN__ #ifndef _GNU_SOURCE
#define _GNU_SOURCE #define _GNU_SOURCE
#endif #endif
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE. // THE SOFTWARE.
#if __CYGWIN__ #ifndef _GNU_SOURCE
#define _GNU_SOURCE #define _GNU_SOURCE
#endif #endif
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
#if !_WIN32 #if !_WIN32
// For Win32 implementation, see async-io-win32.c++. // For Win32 implementation, see async-io-win32.c++.
#if __CYGWIN__ #ifndef _GNU_SOURCE
#define _GNU_SOURCE #define _GNU_SOURCE
#endif #endif
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE. // THE SOFTWARE.
#if __CYGWIN__ #ifndef _GNU_SOURCE
#define _GNU_SOURCE #define _GNU_SOURCE
#endif #endif
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE. // THE SOFTWARE.
#if __CYGWIN__ #ifndef _GNU_SOURCE
#define _GNU_SOURCE #define _GNU_SOURCE
#endif #endif
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
#if !_WIN32 #if !_WIN32
#if __CYGWIN__ #ifndef _GNU_SOURCE
#define _GNU_SOURCE #define _GNU_SOURCE
#endif #endif
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE. // THE SOFTWARE.
#if __CYGWIN__ #ifndef _GNU_SOURCE
#define _GNU_SOURCE #define _GNU_SOURCE
#endif #endif
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE. // THE SOFTWARE.
#if __CYGWIN__ #ifndef _GNU_SOURCE
#define _GNU_SOURCE #define _GNU_SOURCE
#endif #endif
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE. // THE SOFTWARE.
#if __CYGWIN__ #ifndef _GNU_SOURCE
#define _GNU_SOURCE #define _GNU_SOURCE
#endif #endif
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE. // THE SOFTWARE.
#if __CYGWIN__ #ifndef _GNU_SOURCE
#define _GNU_SOURCE #define _GNU_SOURCE
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment