Skip to content

Commit 8c0a959

Browse files
sipsorceryfanquake
authored andcommitted
Remove cached directories and associated script blocks from appveyor CI configuration.
Github-Pull: #19444 Rebased-From: 961e667
1 parent d70f700 commit 8c0a959

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,69 +5,49 @@ 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'
16-
cache:
17-
- C:\tools\vcpkg\installed -> build_msvc\vcpkg-packages.txt
18-
- C:\Users\appveyor\clcache -> .appveyor.yml, build_msvc\**, **\Makefile.am, **\*.vcxproj.in
19-
- C:\Qt5.9.8_x64_static_vs2019
2014
install:
2115
- cmd: pip install --quiet git+https://github.com/frerich/[email protected]
2216
# Disable zmq test for now since python zmq library on Windows would cause Access violation sometimes.
2317
# - cmd: pip install zmq
2418
# Powershell block below is to install the c++ dependencies via vcpkg. The pseudo code is:
25-
# 1. Check whether the vcpkg install directory exists (note that updating the vcpkg-packages.txt file
26-
# will cause the appveyor cache rules to invalidate the directory)
27-
# 2. If the directory is missing:
2819
# a. Update the vcpkg source (including port files) and build the vcpkg binary,
2920
# b. Install the missing packages.
3021
- ps: |
3122
$env:PACKAGES = Get-Content -Path build_msvc\vcpkg-packages.txt
32-
Write-Host "vcpkg list: $env:PACKAGES"
33-
if(!(Test-Path -Path ($env:VCPKG_INSTALL_PATH))) {
34-
cd c:\tools\vcpkg
35-
$env:GIT_REDIRECT_STDERR = '2>&1' # git is writing non-errors to STDERR when doing git pull. Send to STDOUT instead.
36-
git pull origin master
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
- ps: clcache -M 536870912
4836
# Powershell block below is to download and extract the Qt static libraries. The pseudo code is:
49-
# 1. If the Qt destination directory exists assume it is correct and do nothing. To
50-
# force a fresh install of the packages delete the job's appveyor cache.
51-
# 2. Otherwise:
5237
# a. Download the zip file with the prebuilt Qt static libraries.
5338
# b. Check that the downloaded file matches the expected hash.
5439
# c. Extract the zip file to the specific destination path expected by the msbuild projects.
5540
- ps: |
56-
if(!(Test-Path -Path ($env:QT_LOCAL_PATH))) {
57-
Write-Host "Downloading Qt binaries.";
58-
Invoke-WebRequest -Uri $env:QT_DOWNLOAD_URL -Out qtdownload.zip;
59-
Write-Host "Qt binaries successfully downloaded, checking hash against $env:QT_DOWNLOAD_HASH...";
60-
if((Get-FileHash qtdownload.zip).Hash -eq $env:QT_DOWNLOAD_HASH) {
61-
Expand-Archive qtdownload.zip -DestinationPath $env:QT_LOCAL_PATH;
62-
Write-Host "Qt binary download matched the expected hash.";
63-
}
64-
else {
65-
Write-Host "ERROR: Qt binary download did not match the expected hash.";
66-
Exit-AppveyorBuild;
67-
}
41+
Write-Host "Downloading Qt binaries.";
42+
Invoke-WebRequest -Uri $env:QT_DOWNLOAD_URL -Out qtdownload.zip;
43+
Write-Host "Qt binaries successfully downloaded, checking hash against $env:QT_DOWNLOAD_HASH...";
44+
if((Get-FileHash qtdownload.zip).Hash -eq $env:QT_DOWNLOAD_HASH) {
45+
Expand-Archive qtdownload.zip -DestinationPath $env:QT_LOCAL_PATH;
46+
Write-Host "Qt binary download matched the expected hash.";
6847
}
6948
else {
70-
Write-Host "Qt binaries already present.";
49+
Write-Host "ERROR: Qt binary download did not match the expected hash.";
50+
Exit-AppveyorBuild;
7151
}
7252
- cmd: python build_msvc\msvc-autogen.py
7353
- ps: Start-Process clcache-server

0 commit comments

Comments
 (0)