forked from mavlink/MAVSDK
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
124 lines (109 loc) · 3.56 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
# Specify version format
version: "{build}"
# Operating system (build VM template)
os: Visual Studio 2017
# build platform, i.e. Win32 (instead of x86), x64, Any CPU. This setting is optional.
platform:
- x64
# specify custom environment variables
environment:
MSVC_DEFAULT_OPTIONS: ON
# only build PR but not branch as well
skip_branch_with_pr: true
# build configuration, i.e. Debug, Release, etc.
configuration:
- Debug
- Release
# scripts that are called at very beginning, before repo cloning
init:
- cmake --version
- msbuild /version
# clone directory
clone_folder: C:\dronecore
# scripts to run before build
before_build:
- cd C:\dronecore
- git submodule update --init --recursive --depth 20
- cd C:\
- appveyor DownloadFile https://curl.haxx.se/download/curl-7.56.1.zip
- 7z x -y curl-7.56.1.zip
build: on
build_script:
- call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat"
- cd curl-7.56.1\winbuild
- if "%configuration%"=="Debug" (
nmake /f Makefile.vc mode=static VC=15 MACHINE=x64 DEBUG=yes
) else (
nmake /f Makefile.vc mode=static VC=15 MACHINE=x64 DEBUG=no
)
- cd C:\dronecore
- md build
- cd build
- if "%configuration%"=="Debug" (
cmake -DWIN_CURL_INCLUDE_DIR:STRING="C:\curl-7.56.1\include" -DWIN_CURL_LIB:STRING="C:\curl-7.56.1\builds\libcurl-vc15-x64-debug-static-ipv6-sspi-winssl\lib\libcurl_a_debug.lib" -G "Visual Studio 15 2017 Win64" ..
) else (
cmake -DWIN_CURL_INCLUDE_DIR:STRING="C:\curl-7.56.1\include" -DWIN_CURL_LIB:STRING="C:\curl-7.56.1\builds\libcurl-vc15-x64-release-static-ipv6-sspi-winssl\lib\libcurl_a.lib" -G "Visual Studio 15 2017 Win64" ..
)
- if "%configuration%"=="Debug" (
cmake --build . --target install --config Debug
) else (
cmake --build . --target install --config Release
)
- cd ..
- cd example\takeoff_land
- md build
- cd build
- cmake .. -G "Visual Studio 15 2017 Win64"
- if "%configuration%"=="Debug" (
cmake --build . --config Debug
) else (
cmake --build . --config Release
)
- cd ..\..\..
- cd example\fly_mission
- md build
- cd build
- cmake .. -G "Visual Studio 15 2017 Win64"
- if "%configuration%"=="Debug" (
cmake --build . --config Debug
) else (
cmake --build . --config Release
)
- cd ..\..\..
- cd example\offboard_velocity
- md build
- cd build
- cmake .. -G "Visual Studio 15 2017 Win64"
- if "%configuration%"=="Debug" (
cmake --build . --config Debug
) else (
cmake --build . --config Release
)
- cd ..\..\..
- cd example\transition_vtol_fixed_wing
- md build
- cd build
- cmake .. -G "Visual Studio 15 2017 Win64"
- if "%configuration%"=="Debug" (
cmake --build . --config Debug
) else (
cmake --build . --config Release
)
- cd ..\..\..
test: on
# We need to manually copy the dlls for now, otherwise they are not found.
test_script:
- cd C:\dronecore
- if "%configuration%"=="Debug" (
cp build\libs\gtest\googlemock\gtest\Debug\gtest.dll build\Debug\ &&
cp build\libs\gtest\googlemock\gtest\Debug\gtest_main.dll build\Debug\ &&
cp build\libs\gtest\googlemock\Debug\gmock.dll build\Debug\ &&
cd build\Debug &&
unit_tests_runner.exe
) else (
cp build\libs\gtest\googlemock\gtest\Release\gtest.dll build\Release\ &&
cp build\libs\gtest\googlemock\gtest\Release\gtest_main.dll build\Release\ &&
cp build\libs\gtest\googlemock\Release\gmock.dll build\Release\ &&
cd build\Release &&
unit_tests_runner.exe
)