Skip to content

Commit a8bd78a

Browse files
committed
vcpkg: update
1 parent f621180 commit a8bd78a

File tree

4 files changed

+44
-6
lines changed

4 files changed

+44
-6
lines changed

.github/workflows/ci.yml

Lines changed: 43 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -407,8 +407,8 @@ jobs:
407407
filename: '.\nuget\*.nupkg'
408408
api-key: ${{ secrets.NUGET_DOT_ORG_API_KEY }}
409409
if: startsWith(github.ref, 'refs/tags/')
410-
##### vcpkg #####
411-
vcpkg:
410+
##### vcpkg-linux #####
411+
vcpkg-linux:
412412
strategy:
413413
fail-fast: false
414414
matrix:
@@ -453,14 +453,54 @@ jobs:
453453
if: always() # even if previous steps fail, this one needs to be run
454454
uses: actions/upload-artifact@v4
455455
with:
456-
name: vcpkg_logs
456+
name: vcpkg_linux_logs
457457
path: |
458458
vcpkg-installation/buildtrees/${{ env.PACKAGE_NAME }}/
459459
build/vcpkg/**/*.log
460460
- name: deploy vcpkg port
461461
run: |
462462
myci-deploy-vcpkg.sh --repo cppfw/vcpkg-repo --port-dir build/vcpkg/overlay/${PACKAGE_NAME}
463463
if: startsWith(github.ref, 'refs/tags/')
464+
##### vcpkg-windows #####
465+
vcpkg-windows:
466+
runs-on: windows-latest
467+
defaults:
468+
run:
469+
shell: powershell
470+
name: vcpkg - windows
471+
steps:
472+
- name: git clone
473+
uses: actions/checkout@v4
474+
- name: get myci scripts
475+
uses: actions/checkout@v4
476+
with:
477+
repository: cppfw/myci
478+
ref: latest
479+
path: myci
480+
- name: add myci to PATH
481+
uses: myci-actions/export-env-var-powershell@main
482+
with: {name: PATH, value: "$env:Path;myci/src/powershell"}
483+
- name: set VCPKG_ROOT
484+
uses: myci-actions/export-env-var-powershell@main
485+
# accorging to github actions windows image docs, it should define VCPKG_INSTALLATION_ROOT env var,
486+
# but on practice it is not set, so specify vcpkg root path explicitly
487+
with: {name: VCPKG_ROOT, value: "C:/vcpkg/"}
488+
- name: prepare vcpkg port
489+
run: myci-vcpkg-prepare.ps1 -gitref ${{ github.sha }}
490+
- name: test vcpkg port
491+
run: |
492+
cd build/vcpkg/test
493+
cmake .
494+
cmake --build . --parallel
495+
./Debug/test.exe
496+
- name: upload vcpkg logs to artifacts
497+
if: always() # even if previous steps fail, this one needs to be run
498+
uses: actions/upload-artifact@v4
499+
with:
500+
name: vcpkg_windows_logs
501+
path: |
502+
vcpkg-installation/buildtrees/${{ env.PACKAGE_NAME }}/
503+
build/vcpkg/**/*.log
464504
##### conan - linux #####
465505
conan-linux:
466506
strategy:

build/vcpkg/test/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ set(CMAKE_TOOLCHAIN_FILE $ENV{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake)
55
project(test)
66

77
find_package(r4 CONFIG REQUIRED)
8-
find_package(utki CONFIG REQUIRED)
98

109
add_executable(test main.cpp)
1110

build/vcpkg/test/vcpkg-configuration.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
{
99
"kind": "git",
1010
"repository": "https://github.com/cppfw/vcpkg-repo/",
11-
"baseline": "fc91207f55941fa249ee4e1242cbc2158181dcf0",
11+
"baseline": "4a220de44a396623446bf6f53917585eb1cf2132",
1212
"reference": "main",
1313
"packages": [ "myci", "utki", "papki" , "r4" ]
1414
}

build/vcpkg/usage

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
r4 provides CMake targets:
22

33
find_package(r4 CONFIG REQUIRED)
4-
find_package(utki CONFIG REQUIRED)
54

65
target_link_libraries(main PRIVATE r4::r4)

0 commit comments

Comments
 (0)