forked from jmcnamara/libxlsxwriter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
65 lines (52 loc) · 1.92 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
version: '{build}'
clone_depth: 1
platform:
- x64
- x86
os:
- Visual Studio 2015
- Visual Studio 2017
environment:
matrix:
- additional_flags: ""
STATIC: ON
ZLIB_LIB: zlibstatic
- additional_flags: "/std:c++latest"
STATIC: ON
ZLIB_LIB: zlibstatic
- additional_flags: ""
STATIC: OFF
ZLIB_LIB: zlib
- additional_flags: "/std:c++latest"
STATIC: OFF
ZLIB_LIB: zlib
matrix:
fast_finish: true
exclude:
- additional_flags: "/std:c++latest"
os: Visual Studio 2015
configuration:
#- Debug
- Release
init: []
install: []
build_script:
# Set the correct generator
- IF "%APPVEYOR_BUILD_WORKER_IMAGE%" == "Visual Studio 2015" ( SET GEN="Visual Studio 14 2015") ELSE (SET GEN="Visual Studio 15 2017")
# ZLIB isn't included on Windows, and no package manager has a static,
# /MT-linked build, so we can download it and build it ourselves
- appveyor DownloadFile http://zlib.net/zlib-1.2.11.tar.gz -FileName zlib-1.2.11.tar.gz
- 7z x zlib-1.2.11.tar.gz > NUL
- 7z x zlib-1.2.11.tar > NUL
- cd zlib-1.2.11
- cmake -G %GEN% -DCMAKE_BUILD_TYPE=%configuration% -DCMAKE_C_FLAGS_RELEASE="/MT"
- cmake --build . --config %configuration%
# Configure libxlsxwriter to use the static ZLIB
- cd ..
- cmake . -G%GEN% -DCMAKE_BUILD_TYPE=%configuration% -DCMAKE_C_FLAGS_RELEASE="/MT" -DBUILD_STATIC=%STATIC% -DBUILD_TESTS=ON -DZLIB_LIBRARY=%APPVEYOR_BUILD_FOLDER%\zlib-1.2.11\Release\%ZLIB_LIB%.lib -DZLIB_INCLUDE_DIR=%APPVEYOR_BUILD_FOLDER%\zlib-1.2.11
- cmake --build . --config %configuration% --target install
test_script:
# Currently disable tests for MSVC: There's an issue with the test runner, not the library.
# All the examples work properly.
# - IF "%STATIC%" == OFF ( copy %APPVEYOR_BUILD_FOLDER%\zlib-1.2.11\Release\%ZLIB_LIB%.dll %APPVEYOR_BUILD_FOLDER%\%configuration%\%ZLIB_LIB%.dll )
- IF %STATIC% == ON ( ctest -C %configuration% -V )