Skip to content

Commit bcbc205

Browse files
committed
fix vcpkg install
1 parent 317f74e commit bcbc205

1 file changed

Lines changed: 17 additions & 20 deletions

File tree

.github/workflows/ci.yml

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -685,7 +685,8 @@ jobs:
685685
env:
686686
PYTHONUTF8: 1
687687
CI_VCPKG_TAG: '2021.05.12'
688-
VCPKG_DOWNLOADS: 'C:\Users\runneradmin\AppData\Local\vcpkg\downloads'
688+
VCPKG_ROOT: 'D:\a\elements\vcpkg'
689+
VCPKG_DOWNLOADS: '${{ github.workspace }}\..\vcpkg\downloads'
689690
VCPKG_DEFAULT_BINARY_CACHE: 'C:\Users\runneradmin\AppData\Local\vcpkg\archives'
690691
QT_DOWNLOAD_URL: 'https://download.qt.io/archive/qt/5.15/5.15.3/single/qt-everywhere-opensource-src-5.15.3.zip'
691692
QT_LOCAL_PATH: 'C:\qt-everywhere-opensource-src-5.15.3.zip'
@@ -700,8 +701,6 @@ jobs:
700701
- name: Checkout
701702
uses: actions/checkout@v4
702703

703-
# Qt static build - cached by Qt download URL.
704-
# This is a large, slow build; the cache makes it nearly free on re-runs.
705704
- name: Restore Qt static cache
706705
id: qt-cache
707706
uses: actions/cache@v4
@@ -726,14 +725,12 @@ jobs:
726725
$vsPath = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property installationPath
727726
cmd /c "`"$vsPath\VC\Auxiliary\Build\vcvars64.bat`" && cd /d $env:QT_SOURCE_DIR && mkdir build && cd build && ..\configure -release -silent -opensource -confirm-license -opengl desktop -static -static-runtime -mp -qt-zlib -qt-pcre -qt-libpng -nomake examples -nomake tests -nomake tools -no-angle -no-dbus -no-gif -no-gtk -no-ico -no-icu -no-libjpeg -no-libudev -no-sql-sqlite -no-sql-odbc -no-sqlite -no-vulkan -skip qt3d -skip qtactiveqt -skip qtandroidextras -skip qtcharts -skip qtconnectivity -skip qtdatavis3d -skip qtdeclarative -skip doc -skip qtdoc -skip qtgamepad -skip qtgraphicaleffects -skip qtimageformats -skip qtlocation -skip qtlottie -skip qtmacextras -skip qtmultimedia -skip qtnetworkauth -skip qtpurchasing -skip qtquick3d -skip qtquickcontrols -skip qtquickcontrols2 -skip qtquicktimeline -skip qtremoteobjects -skip qtscript -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtspeech -skip qtsvg -skip qtvirtualkeyboard -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebglplugin -skip qtwebsockets -skip qtwebview -skip qtx11extras -skip qtxmlpatterns -no-openssl -no-feature-bearermanagement -no-feature-printdialog -no-feature-printer -no-feature-printpreviewdialog -no-feature-printpreviewwidget -no-feature-sql -no-feature-sqlmodel -no-feature-textbrowser -no-feature-textmarkdownwriter -no-feature-textodfwriter -no-feature-xml -prefix $env:QTBASEDIR && C:\jom\jom.exe && C:\jom\jom.exe install"
728727
729-
# vcpkg tools (compilers/bootstrapper) - cached by tag.
730728
- name: Restore vcpkg tools cache
731729
uses: actions/cache@v4
732730
with:
733-
path: ${{ env.VCPKG_DOWNLOADS }}\tools
731+
path: ${{ env.VCPKG_ROOT }}\downloads\tools
734732
key: vcpkg-tools-${{ env.CI_VCPKG_TAG }}-${{ runner.os }}
735733

736-
# vcpkg binary packages - cached by tag (reupload on changes).
737734
- name: Restore vcpkg binary cache
738735
uses: actions/cache@v4
739736
with:
@@ -748,13 +745,13 @@ jobs:
748745
python -VV
749746
750747
- name: Install vcpkg
748+
shell: pwsh
751749
run: |
752-
cd ..
753-
git clone --quiet https://github.com/microsoft/vcpkg.git
754-
cd vcpkg
755-
git -c advice.detachedHead=false checkout %CI_VCPKG_TAG%
756-
.\bootstrap-vcpkg -disableMetrics
757-
echo set(VCPKG_BUILD_TYPE release) >> triplets\x64-windows-static.cmake
750+
git clone --quiet https://github.com/microsoft/vcpkg.git $env:VCPKG_ROOT
751+
cd $env:VCPKG_ROOT
752+
git -c advice.detachedHead=false checkout $env:CI_VCPKG_TAG
753+
.\bootstrap-vcpkg.bat -disableMetrics
754+
Add-Content triplets\x64-windows-static.cmake "set(VCPKG_BUILD_TYPE release)"
758755
.\vcpkg integrate install
759756
.\vcpkg version
760757
@@ -794,7 +791,7 @@ jobs:
794791
env:
795792
PYTHONUTF8: 1
796793
CI_VCPKG_TAG: '2021.05.12'
797-
VCPKG_DOWNLOADS: 'C:\Users\runneradmin\AppData\Local\vcpkg\downloads'
794+
VCPKG_ROOT: 'D:\a\elements\vcpkg'
798795
VCPKG_DEFAULT_BINARY_CACHE: 'C:\Users\runneradmin\AppData\Local\vcpkg\archives'
799796
QT_DOWNLOAD_URL: 'https://download.qt.io/archive/qt/5.15/5.15.3/single/qt-everywhere-opensource-src-5.15.3.zip'
800797
QT_LOCAL_PATH: 'C:\qt-everywhere-opensource-src-5.15.3.zip'
@@ -836,7 +833,7 @@ jobs:
836833
- name: Restore vcpkg tools cache
837834
uses: actions/cache@v4
838835
with:
839-
path: ${{ env.VCPKG_DOWNLOADS }}\tools
836+
path: ${{ env.VCPKG_ROOT }}\downloads\tools
840837
key: vcpkg-tools-${{ env.CI_VCPKG_TAG }}-${{ runner.os }}
841838

842839
- name: Restore vcpkg binary cache
@@ -853,13 +850,13 @@ jobs:
853850
python -VV
854851
855852
- name: Install vcpkg
853+
shell: pwsh
856854
run: |
857-
cd ..
858-
git clone --quiet https://github.com/microsoft/vcpkg.git
859-
cd vcpkg
860-
git -c advice.detachedHead=false checkout %CI_VCPKG_TAG%
861-
.\bootstrap-vcpkg -disableMetrics
862-
echo set(VCPKG_BUILD_TYPE release) >> triplets\x64-windows-static.cmake
855+
git clone --quiet https://github.com/microsoft/vcpkg.git $env:VCPKG_ROOT
856+
cd $env:VCPKG_ROOT
857+
git -c advice.detachedHead=false checkout $env:CI_VCPKG_TAG
858+
.\bootstrap-vcpkg.bat -disableMetrics
859+
Add-Content triplets\x64-windows-static.cmake "set(VCPKG_BUILD_TYPE release)"
863860
.\vcpkg integrate install
864861
.\vcpkg version
865862

0 commit comments

Comments
 (0)