Skip to content

Commit 961e667

Browse files
committed
Remove cached directories and associated script blocks from appveyor CI configuration.
1 parent 3276c14 commit 961e667

File tree

1 file changed

+19
-39
lines changed

1 file changed

+19
-39
lines changed

.appveyor.yml

Lines changed: 19 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -5,68 +5,48 @@ configuration: Release
55
platform: x64
66
clone_depth: 5
77
environment:
8-
APPVEYOR_SAVE_CACHE_ON_ERROR: true
9-
CLCACHE_SERVER: 1
108
PATH: 'C:\Python37-x64;C:\Python37-x64\Scripts;%PATH%'
119
PYTHONUTF8: 1
1210
QT_DOWNLOAD_URL: 'https://github.com/sipsorcery/qt_win_binary/releases/download/v1.6/Qt5.9.8_x64_static_vs2019.zip'
1311
QT_DOWNLOAD_HASH: '9a8c6eb20967873785057fdcd329a657c7f922b0af08c5fde105cc597dd37e21'
1412
QT_LOCAL_PATH: 'C:\Qt5.9.8_x64_static_vs2019'
1513
VCPKG_INSTALL_PATH: 'C:\tools\vcpkg\installed'
1614
VCPKG_COMMIT_ID: 'ed0df8ecc4ed7e755ea03e18aaf285fd9b4b4a74'
17-
cache:
18-
- C:\tools\vcpkg\installed -> build_msvc\vcpkg-packages.txt
19-
- C:\Qt5.9.8_x64_static_vs2019
2015
install:
2116
# Disable zmq test for now since python zmq library on Windows would cause Access violation sometimes.
2217
# - cmd: pip install zmq
2318
# 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:
2719
# a. Checkout the vcpkg source (including port files) for the specific checkout and build the vcpkg binary,
2820
# b. Install the missing packages.
2921
- ps: |
3022
$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"
4634
before_build:
4735
# 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:
5136
# a. Download the zip file with the prebuilt Qt static libraries.
5237
# b. Check that the downloaded file matches the expected hash.
5338
# c. Extract the zip file to the specific destination path expected by the msbuild projects.
5439
- 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.";
6746
}
6847
else {
69-
Write-Host "Qt binaries already present.";
48+
Write-Host "ERROR: Qt binary download did not match the expected hash.";
49+
Exit-AppveyorBuild;
7050
}
7151
- cmd: python build_msvc\msvc-autogen.py
7252
build_script:

0 commit comments

Comments
 (0)