forked from dchapyshev/aspia
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
87 lines (71 loc) · 2.13 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
version: "{build}"
branches:
only:
- master
skip_tags: true
max_jobs: 1
image: Visual Studio 2019 Preview
environment:
ASPIA_DIR: &ASPIA_DIR c:\aspia
CACHE_DIR: &CACHE_DIR c:\aspia_cache
LIB_URL: https://files.aspia.org/dev/third_party.7z
VER_URL: https://files.aspia.org/dev/third_party.txt
clone_folder: *ASPIA_DIR
clone_depth: 1
cache:
- *CACHE_DIR
install:
# Check the version of third-party libraries.
- curl -o "c:\version.txt" "%VER_URL%"
- set /p NEW_VERSION=<"c:\version.txt"
- if exist "%CACHE_DIR%\version.txt" (set /p OLD_VERSION=<"%CACHE_DIR%\version.txt")
- if not exist "%CACHE_DIR%\version.txt" (set UPDATE_CACHE=1)
- if not "%OLD_VERSION%" == "%NEW_VERSION%" (set UPDATE_CACHE=1)
# If need to update libraries.
- if "%UPDATE_CACHE%" == "1" (echo "Cache is obsolete. Updating..." &&
rmdir /S /Q "%CACHE_DIR%" & mkdir "%CACHE_DIR%" &&
curl -o "%CACHE_DIR%\third_party.7z" "%LIB_URL%" &&
copy "c:\version.txt" "%CACHE_DIR%\version.txt")
# Unpack the cached libraries.
- 7z x "%CACHE_DIR%\third_party.7z" -o"c:"
- set ASPIA_THIRD_PARTY_DIR=c:\third_party
platform:
- Win32
configuration:
- Release
- Debug
matrix:
fast_finish: true
before_build:
- cd /d %ASPIA_DIR%
- mkdir build
- cd build
- cmake --version
- cmake ..\source -G "Visual Studio 16 2019"
build:
project: "%ASPIA_DIR%/build/aspia.sln"
verbosity: minimal
parallel: true
test_script:
- ps: |
$tests_dir = "$env:APPVEYOR_BUILD_FOLDER\build\$env:CONFIGURATION";
$test_base = "$tests_dir\aspia_base_tests"
& $test_base
If ($LastExitCode -ne 0) {
exit $LastExitCode
}
$test_crypto = "$tests_dir\aspia_crypto_tests"
& $test_crypto
If ($LastExitCode -ne 0) {
exit $LastExitCode
}
$test_desktop = "$tests_dir\aspia_desktop_tests"
& $test_desktop
If ($LastExitCode -ne 0) {
exit $LastExitCode
}
$test_net = "$tests_dir\aspia_net_tests"
& $test_net
If ($LastExitCode -ne 0) {
exit $LastExitCode
}