forked from open62541/open62541
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
86 lines (76 loc) · 3.24 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
version: '{build}'
clone_folder: c:\projects\open62541
clone_depth: 20
environment:
global:
CYG_ARCH: x86
CYG_ROOT: C:/cygwin
CYG_SETUP_URL: http://cygwin.com/setup-x86.exe
CYG_MIRROR: http://cygwin.mirror.constant.com
CYG_CACHE: C:\cygwin\var\cache\setup
CYG_BASH: C:/cygwin/bin/bash
matrix:
- CC_NAME: MinGW Makefiles
CC_SHORTNAME: mingw
MAKE: mingw32-make
FORCE_CXX: OFF
# - CC_NAME: Visual Studio 9 2008
# CC_SHORTNAME: vs2008
# # Do not use multicore switch (/m), it causes appveyor to randomly fail
# MAKE: msbuild open62541.sln
# FORCE_CXX: ON
- CC_NAME: Visual Studio 12 2013
CC_SHORTNAME: vs2013
# Do not use multicore switch (/m), it causes appveyor to randomly fail
MAKE: msbuild open62541.sln
FORCE_CXX: OFF
- CC_NAME: Visual Studio 12 2013 Win64
CC_SHORTNAME: vs2013-x64
# Do not use multicore switch (/m), it causes appveyor to randomly fail
MAKE: msbuild open62541.sln
FORCE_CXX: OFF
cache:
- '%CYG_CACHE%'
init:
- git config --global core.autocrlf input # Attempt to ensure we don't try to convert line endings to Win32 CRLF as this will cause build to fail
# Install needed build dependencies
install:
- if not exist "%CYG_ROOT%" mkdir "%CYG_ROOT%"
- ps: echo "Installing Cygwin from $env:CYG_SETUP_URL to $env:CYG_ROOT/setup-x86.exe"
- appveyor DownloadFile %CYG_SETUP_URL% -FileName %CYG_ROOT%/setup-x86.exe
- ps: echo "Downloaded. Now ready to install."
- cmd: '"%CYG_ROOT%/setup-x86.exe" --quiet-mode --no-shortcuts --only-site -R "%CYG_ROOT%" -s "%CYG_MIRROR%" -l "%CYG_CACHE%" --packages cmake,python'
- cmd: '%CYG_BASH% -lc "cygcheck -dc cygwin"'
before_build:
# Workaround for CMake not wanting sh.exe on PATH for MinGW
- set PATH=%PATH:C:\Program Files\Git\usr\bin;=%
- set PATH=C:\MinGW\bin;%PATH%
build_script:
- cd c:\projects\open62541
- md build
- cd build
- echo "Testing %CC_NAME%"
- cmake -DUA_BUILD_EXAMPLES:BOOL=ON -DUA_COMPILE_AS_CXX:BOOL=%FORCE_CXX% -G"%CC_NAME%" ..
- '%MAKE%'
- cd ..
- rd /s /q build
- md build
- cd build
- echo "Testing %CC_NAME% with amalgamation"
- cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DUA_BUILD_EXAMPLES:BOOL=ON -DUA_ENABLE_AMALGAMATION:BOOL=ON -DUA_COMPILE_AS_CXX:BOOL=%FORCE_CXX% -DBUILD_SHARED_LIBS:BOOL=OFF -G"%CC_NAME%" ..
- '%MAKE%'
- 7z a -tzip open62541-%CC_SHORTNAME%-static.zip %APPVEYOR_BUILD_FOLDER%\build\*
- move open62541-%CC_SHORTNAME%-static.zip %APPVEYOR_BUILD_FOLDER%
- cd ..
- rd /s /q build
- md build
- cd build
- echo "Testing %CC_NAME% with amalgamation and .dll"
- cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DUA_BUILD_EXAMPLES:BOOL=ON -DUA_ENABLE_AMALGAMATION:BOOL=ON -DUA_COMPILE_AS_CXX:BOOL=%FORCE_CXX% -DBUILD_SHARED_LIBS:BOOL=ON -G"%CC_NAME%" ..
- '%MAKE%'
- 7z a -tzip open62541-%CC_SHORTNAME%-dynamic.zip %APPVEYOR_BUILD_FOLDER%\build\*
- move open62541-%CC_SHORTNAME%-dynamic.zip %APPVEYOR_BUILD_FOLDER%
- cd ..
after_build:
- appveyor PushArtifact %APPVEYOR_BUILD_FOLDER%\open62541-%CC_SHORTNAME%-static.zip
- appveyor PushArtifact %APPVEYOR_BUILD_FOLDER%\open62541-%CC_SHORTNAME%-dynamic.zip