forked from Yadoms/yadoms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.appveyor-unit-test.yml
79 lines (63 loc) · 2.59 KB
/
.appveyor-unit-test.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
# Notes:
# - Minimal appveyor.yml file is an empty file. All sections are optional.
# - Indent each level of configuration with 2 spaces. Do not use tabs!
# - All section names are case-sensitive.
# - Section names should be unique on each level.
# version format
version: 1.0.{build}
# Build worker image (VM template)
image: Visual Studio 2017
#---------------------------------#
# build configuration #
#---------------------------------#
# build platform, i.e. x86, x64, Any CPU. This setting is optional.
platform: Win32
# build Configuration, i.e. Debug, Release, etc.
configuration: Debug
init:
# Log RDP access information
#TODO - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
# Add pre-compiled dependancies in cache
cache:
- extra_libs\boost_1_64_0 -> '.appveyor.yml'
- extra_libs\poco-1.7.9-all -> '.appveyor.yml'
# scripts that run after cloning repository
install:
# Download extra libs
- ps: echo "Download extra libs..."
- ps: if (!(Test-Path 'extra_libs')) { mkdir 'extra_libs' }
- ps: pushd extra_libs
- ps: if (!(Test-Path 'boost_1_64_0')) { Invoke-WebRequest http://yadoms.com/appveyor_build/boost_1_64_0-build.7z -OutFile boost.7z; 7z x boost.7z -bso0 }
- ps: if (!(Test-Path 'poco-1.7.9-all')) { Invoke-WebRequest http://yadoms.com/appveyor_build/poco-1.7.9-all-build.7z -OutFile poco.7z; 7z x poco.7z -bso0 }
- ps: rm *.7z
- ps: popd
- ps: echo "[END] install"
# scripts to run before build
before_build:
# Yadoms configuration file
- ps: echo "Create Yadoms unit-test configuration file CMakeListsUserConfig.txt..."
- ps: $cd_for_cmake="$pwd".Replace("\", "/")
- ps: echo $cd_for_cmake
- ps: Set-Content 'tests/unit/sources/CMakeListsUserConfig.txt' ('set(BOOST_ROOT "' + $cd_for_cmake + '/extra_libs/boost_1_64_0")')
- ps: Add-Content 'tests/unit/sources/CMakeListsUserConfig.txt' ('set(POCO_ROOT "' + $cd_for_cmake + '/extra_libs/poco-1.7.9-all")')
- ps: cat 'tests/unit/sources/CMakeListsUserConfig.txt'
# Create solution
- ps: pushd tests/unit
- ps: echo "Create solution..."
- cmd: cmake_windows_tests.cmd
- ps: popd
build:
parallel: false
project: tests/unit/projects/yadomsTests.sln
# MSBuild verbosity level
verbosity: normal
test_script:
- ps: pushd tests/unit/builds/$env:configuration/
- cmd: yadomsTests.exe
- ps: popd
notifications:
- provider: Email
subject: 'Build {{status}}: {{projectName}}, branch {{branch}}, {{buildVersion}}'
to:
- '{{commitAuthorEmail}}'
on_build_status_changed: true