@@ -5,68 +5,48 @@ configuration: Release
5
5
platform : x64
6
6
clone_depth : 5
7
7
environment :
8
- APPVEYOR_SAVE_CACHE_ON_ERROR : true
9
- CLCACHE_SERVER : 1
10
8
PATH : ' C:\Python37-x64;C:\Python37-x64\Scripts;%PATH%'
11
9
PYTHONUTF8 : 1
12
10
QT_DOWNLOAD_URL : ' https://github.com/sipsorcery/qt_win_binary/releases/download/v1.6/Qt5.9.8_x64_static_vs2019.zip'
13
11
QT_DOWNLOAD_HASH : ' 9a8c6eb20967873785057fdcd329a657c7f922b0af08c5fde105cc597dd37e21'
14
12
QT_LOCAL_PATH : ' C:\Qt5.9.8_x64_static_vs2019'
15
13
VCPKG_INSTALL_PATH : ' C:\tools\vcpkg\installed'
16
14
VCPKG_COMMIT_ID : ' ed0df8ecc4ed7e755ea03e18aaf285fd9b4b4a74'
17
- cache :
18
- - C:\tools\vcpkg\installed -> build_msvc\vcpkg-packages.txt
19
- - C:\Qt5.9.8_x64_static_vs2019
20
15
install :
21
16
# Disable zmq test for now since python zmq library on Windows would cause Access violation sometimes.
22
17
# - cmd: pip install zmq
23
18
# Powershell block below is to install the c++ dependencies via vcpkg. The pseudo code is:
24
- # 1. Check whether the vcpkg install directory exists (note that updating the vcpkg-packages.txt file
25
- # will cause the appveyor cache rules to invalidate the directory)
26
- # 2. If the directory is missing:
27
19
# a. Checkout the vcpkg source (including port files) for the specific checkout and build the vcpkg binary,
28
20
# b. Install the missing packages.
29
21
- ps : |
30
22
$env:PACKAGES = Get-Content -Path build_msvc\vcpkg-packages.txt
31
- Write-Host "vcpkg list: $env:PACKAGES"
32
- if(!(Test-Path -Path ($env:VCPKG_INSTALL_PATH))) {
33
- cd c:\tools\vcpkg
34
- $env:GIT_REDIRECT_STDERR = '2>&1' # git is writing non-errors to STDERR when doing git pull. Send to STDOUT instead.
35
- git pull origin master
36
- git checkout $env:VCPKG_COMMIT_ID
37
- .\bootstrap-vcpkg.bat
38
- Add-Content "C:\tools\vcpkg\triplets\$env:PLATFORM-windows-static.cmake" "set(VCPKG_BUILD_TYPE release)"
39
- .\vcpkg install --triplet $env:PLATFORM-windows-static $env:PACKAGES.split() > $null
40
- cd "$env:APPVEYOR_BUILD_FOLDER"
41
- }
42
- else {
43
- Write-Host "required vcpkg packages already installed."
44
- }
45
- c:\tools\vcpkg\vcpkg integrate install
23
+ Write-Host "vcpkg installing packages: $env:PACKAGES"
24
+ cd c:\tools\vcpkg
25
+ $env:GIT_REDIRECT_STDERR = '2>&1' # git is writing non-errors to STDERR when doing git pull. Send to STDOUT instead.
26
+ git pull origin master > $null
27
+ git -c advice.detachedHead=false checkout $env:VCPKG_COMMIT_ID
28
+ .\bootstrap-vcpkg.bat > $null
29
+ Add-Content "C:\tools\vcpkg\triplets\$env:PLATFORM-windows-static.cmake" "set(VCPKG_BUILD_TYPE release)"
30
+ .\vcpkg install --triplet $env:PLATFORM-windows-static $env:PACKAGES.split() > $null
31
+ Write-Host "vcpkg packages installed successfully."
32
+ .\vcpkg integrate install
33
+ cd "$env:APPVEYOR_BUILD_FOLDER"
46
34
before_build :
47
35
# Powershell block below is to download and extract the Qt static libraries. The pseudo code is:
48
- # 1. If the Qt destination directory exists assume it is correct and do nothing. To
49
- # force a fresh install of the packages delete the job's appveyor cache.
50
- # 2. Otherwise:
51
36
# a. Download the zip file with the prebuilt Qt static libraries.
52
37
# b. Check that the downloaded file matches the expected hash.
53
38
# c. Extract the zip file to the specific destination path expected by the msbuild projects.
54
39
- ps : |
55
- if(!(Test-Path -Path ($env:QT_LOCAL_PATH))) {
56
- Write-Host "Downloading Qt binaries.";
57
- Invoke-WebRequest -Uri $env:QT_DOWNLOAD_URL -Out qtdownload.zip;
58
- Write-Host "Qt binaries successfully downloaded, checking hash against $env:QT_DOWNLOAD_HASH...";
59
- if((Get-FileHash qtdownload.zip).Hash -eq $env:QT_DOWNLOAD_HASH) {
60
- Expand-Archive qtdownload.zip -DestinationPath $env:QT_LOCAL_PATH;
61
- Write-Host "Qt binary download matched the expected hash.";
62
- }
63
- else {
64
- Write-Host "ERROR: Qt binary download did not match the expected hash.";
65
- Exit-AppveyorBuild;
66
- }
40
+ Write-Host "Downloading Qt binaries.";
41
+ Invoke-WebRequest -Uri $env:QT_DOWNLOAD_URL -Out qtdownload.zip;
42
+ Write-Host "Qt binaries successfully downloaded, checking hash against $env:QT_DOWNLOAD_HASH...";
43
+ if((Get-FileHash qtdownload.zip).Hash -eq $env:QT_DOWNLOAD_HASH) {
44
+ Expand-Archive qtdownload.zip -DestinationPath $env:QT_LOCAL_PATH;
45
+ Write-Host "Qt binary download matched the expected hash.";
67
46
}
68
47
else {
69
- Write-Host "Qt binaries already present.";
48
+ Write-Host "ERROR: Qt binary download did not match the expected hash.";
49
+ Exit-AppveyorBuild;
70
50
}
71
51
- cmd : python build_msvc\msvc-autogen.py
72
52
build_script :
0 commit comments