Skip to content

Commit cdcfc7c

Browse files
committed
vcpkg: update
1 parent a74e548 commit cdcfc7c

5 files changed

Lines changed: 44 additions & 20 deletions

File tree

.github/workflows/ci.yml

Lines changed: 43 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -421,8 +421,8 @@ jobs:
421421
filename: '.\nuget\*.nupkg'
422422
api-key: ${{ secrets.NUGET_DOT_ORG_API_KEY }}
423423
if: startsWith(github.ref, 'refs/tags/')
424-
##### vcpkg #####
425-
vcpkg:
424+
##### vcpkg-linux #####
425+
vcpkg-linux:
426426
strategy:
427427
fail-fast: false
428428
matrix:
@@ -467,14 +467,54 @@ jobs:
467467
if: always() # even if previous steps fail, this one needs to be run
468468
uses: actions/upload-artifact@v4
469469
with:
470-
name: vcpkg_logs
470+
name: vcpkg_linux_logs
471471
path: |
472472
vcpkg-installation/buildtrees/${{ env.PACKAGE_NAME }}/
473473
build/vcpkg/**/*.log
474474
- name: deploy vcpkg port
475475
run: |
476476
myci-deploy-vcpkg.sh --repo cppfw/vcpkg-repo --port-dir build/vcpkg/overlay/${PACKAGE_NAME}
477477
if: startsWith(github.ref, 'refs/tags/')
478+
##### vcpkg-windows #####
479+
vcpkg-windows:
480+
runs-on: windows-latest
481+
defaults:
482+
run:
483+
shell: powershell
484+
name: vcpkg - windows
485+
steps:
486+
- name: git clone
487+
uses: actions/checkout@v4
488+
- name: get myci scripts
489+
uses: actions/checkout@v4
490+
with:
491+
repository: cppfw/myci
492+
ref: latest
493+
path: myci
494+
- name: add myci to PATH
495+
uses: myci-actions/export-env-var-powershell@main
496+
with: {name: PATH, value: "$env:Path;myci/src/powershell"}
497+
- name: set VCPKG_ROOT
498+
uses: myci-actions/export-env-var-powershell@main
499+
# accorging to github actions windows image docs, it should define VCPKG_INSTALLATION_ROOT env var,
500+
# but on practice it is not set, so specify vcpkg root path explicitly
501+
with: {name: VCPKG_ROOT, value: "C:/vcpkg/"}
502+
- name: prepare vcpkg port
503+
run: myci-vcpkg-prepare.ps1 -gitref ${{ github.sha }}
504+
- name: test vcpkg port
505+
run: |
506+
cd build/vcpkg/test
507+
cmake .
508+
cmake --build . --parallel
509+
./Debug/test.exe
510+
- name: upload vcpkg logs to artifacts
511+
if: always() # even if previous steps fail, this one needs to be run
512+
uses: actions/upload-artifact@v4
513+
with:
514+
name: vcpkg_windows_logs
515+
path: |
516+
vcpkg-installation/buildtrees/${{ env.PACKAGE_NAME }}/
517+
build/vcpkg/**/*.log
478518
##### conan - linux #####
479519
conan-linux:
480520
strategy:

build/cmake/CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ project(${name})
77
# Otherwise VCPKG does not set the CMAKE_PREFIX_PATH to find packages.
88
find_package(myci CONFIG REQUIRED)
99

10-
find_package(ZLIB REQUIRED)
11-
1210
set(srcs)
1311
myci_add_source_files(srcs
1412
DIRECTORY
@@ -29,6 +27,4 @@ myci_declare_library(${name}
2927
r4
3028
mikroxml
3129
cssom
32-
EXTERNAL_DEPENDENCIES
33-
ZLIB::ZLIB
3430
)

build/vcpkg/test/CMakeLists.txt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,6 @@ set(CMAKE_TOOLCHAIN_FILE $ENV{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake)
44

55
project(test)
66

7-
find_package(utki CONFIG REQUIRED)
8-
find_package(ZLIB REQUIRED)
9-
find_package(papki CONFIG REQUIRED)
10-
find_package(cssom CONFIG REQUIRED)
11-
find_package(mikroxml CONFIG REQUIRED)
12-
find_package(r4 CONFIG REQUIRED)
137
find_package(svgdom CONFIG REQUIRED)
148

159
add_executable(test main.cpp)

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": "c7ff7bc78fe617434cc09c52b5eb111d568197c1",
11+
"baseline": "f3e91e1cc2383dffb7047fa0dccc2ccd957713b9",
1212
"reference": "main",
1313
"packages": [ "myci", "utki", "papki", "mikroxml", "cssom", "r4" ]
1414
}

build/vcpkg/usage

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

3-
find_package(utki CONFIG REQUIRED)
4-
find_package(ZLIB REQUIRED)
5-
find_package(papki CONFIG REQUIRED)
6-
find_package(cssom CONFIG REQUIRED)
7-
find_package(mikroxml CONFIG REQUIRED)
8-
find_package(r4 CONFIG REQUIRED)
93
find_package(svgdom CONFIG REQUIRED)
104

115
target_link_libraries(main PRIVATE svgdom::svgdom)

0 commit comments

Comments
 (0)