forked from gammu/gammu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
99 lines (86 loc) · 3.01 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
version: "{build}"
image: Visual Studio 2015
configuration:
- Release
- Debug
clone_depth: 100
environment:
MYSQL_PATH: C:\Program Files\MySql\MySQL Server 5.7
POSTGRESQL_PATH: C:\Program Files\PostgreSQL\9.5
PGUSER: postgres
PGPASSWORD: Password12!
matrix:
- GENERATOR: "Visual Studio 14 2015 Win64"
- GENERATOR: "Visual Studio 14 2015"
clone_folder: c:\projects\gammu
install:
- ps: if (($env:CONFIGURATION) -eq "Debug" ) { .\admin\install_opencppcoverage.ps1 }
- appveyor DownloadFile https://download.microsoft.com/download/f/2/6/f263ac46-1fe9-4ae9-8fd3-21102100ebf5/msxsl.exe
before_build:
- cmd: >-
"%MYSQL_PATH%\\bin\\mysql.exe" "--password=Password12!" "--user=root" "-e" "create database smsd;"
- cmd: >-
"%POSTGRESQL_PATH%\\bin\\createdb.exe" smsd
- cmd: >-
cmake -G "%GENERATOR%" -DCMAKE_INSTALL_PREFIX=%P%
-DODBC_TESTING=OFF "-DODBC_DSN=mysql:Driver={MySQL ODBC 5.3 Unicode Driver}:host=localhost;dbname=smsd"
-DMYSQL_TESTING=ON -DMYSQL_USER=root "-DMYSQL_PASSWORD=Password12!"
-DPSQL_TESTING=ON -DPSQL_USER=postgres "-DPSQL_PASSWORD=Password12!"
-DMEMORYCHECK_COMMAND="c:/projects/gammu/admin/windows-coverage.bat" -DMEMORYCHECK_COMMAND_OPTIONS="--separator" -DMEMORYCHECK_TYPE=Valgrind
-DPOSTGRES_FOUND=OFF -DMYSQL_FOUND=OFF
build:
project: ALL_BUILD.vcxproj
parallel: true
verbosity: quiet
after_build:
- cmake --build . --config %CONFIGURATION% --target package
test_script:
- "SET PATH=%MYSQL_PATH%\\bin;%POSTGRESQL_PATH%\\bin;c:\\projects\\gammu;%PATH%"
- ps: >-
$failure = 0;
try
{
if (($env:CONFIGURATION) -eq "Release" ) {
$mode = "ExperimentalTest";
} else {
$mode = "ExperimentalMemCheck";
}
ctest --output-on-failure --no-compress-output --dashboard $mode --build-config ($env:CONFIGURATION);
$failure = $lastExitCode;
}
catch
{
$failure = 1;
}
finally
{
# Copy test results to fixed name
Copy-Item Testing\$(Get-Content Testing\TAG -TotalCount 1)\*.xml test.xml;
# XLST CTest XML into Junit XML
msxsl test.xml admin/ctest-to-junit.xsl -o junit.xml;
# Upload results to AppVeyor
$wc = New-Object 'System.Net.WebClient';
$wc.UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\junit.xml));
}
if ($failure -ne 0) {
# Propagate error code from testsuite
exit $failure;
}
after_test:
- bash admin/codecov.sh
services:
- mysql
- postgresql
artifacts:
- path: Gammu-*-Windows.exe
name: Gammu Installer
- path: CMakeFiles/CMakeOutput.log
name: CMake log
- path: CMakeFiles/CMakeError.log
name: CMake errors
- path: CMakeCache.txt
name: CMake cache
- path: test.xml
name: Test results
- path: junit.xml
name: Transformed test results