Skip to content

Commit 42dd633

Browse files
committed
vcpkg: update
1 parent b2c91f3 commit 42dd633

File tree

5 files changed

+44
-14
lines changed

5 files changed

+44
-14
lines changed

.github/workflows/ci.yml

Lines changed: 43 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -415,8 +415,8 @@ jobs:
415415
filename: '.\nuget\*.nupkg'
416416
api-key: ${{ secrets.NUGET_DOT_ORG_API_KEY }}
417417
if: startsWith(github.ref, 'refs/tags/')
418-
##### vcpkg #####
419-
vcpkg:
418+
##### vcpkg-linux #####
419+
vcpkg-linux:
420420
strategy:
421421
fail-fast: false
422422
matrix:
@@ -461,14 +461,54 @@ jobs:
461461
if: always() # even if previous steps fail, this one needs to be run
462462
uses: actions/upload-artifact@v4
463463
with:
464-
name: vcpkg_logs
464+
name: vcpkg_linux-logs
465465
path: |
466466
vcpkg-installation/buildtrees/${{ env.PACKAGE_NAME }}/
467467
build/vcpkg/**/*.log
468468
- name: deploy vcpkg port
469469
run: |
470470
myci-deploy-vcpkg.sh --repo cppfw/vcpkg-repo --port-dir build/vcpkg/overlay/${PACKAGE_NAME}
471471
if: startsWith(github.ref, 'refs/tags/')
472+
##### vcpkg-windows #####
473+
vcpkg-windows:
474+
runs-on: windows-latest
475+
defaults:
476+
run:
477+
shell: powershell
478+
name: vcpkg - windows
479+
steps:
480+
- name: git clone
481+
uses: actions/checkout@v4
482+
- name: get myci scripts
483+
uses: actions/checkout@v4
484+
with:
485+
repository: cppfw/myci
486+
ref: latest
487+
path: myci
488+
- name: add myci to PATH
489+
uses: myci-actions/export-env-var-powershell@main
490+
with: {name: PATH, value: "$env:Path;myci/src/powershell"}
491+
- name: set VCPKG_ROOT
492+
uses: myci-actions/export-env-var-powershell@main
493+
# accorging to github actions windows image docs, it should define VCPKG_INSTALLATION_ROOT env var,
494+
# but on practice it is not set, so specify vcpkg root path explicitly
495+
with: {name: VCPKG_ROOT, value: "C:/vcpkg/"}
496+
- name: prepare vcpkg port
497+
run: myci-vcpkg-prepare.ps1 -gitref ${{ github.sha }}
498+
- name: test vcpkg port
499+
run: |
500+
cd build/vcpkg/test
501+
cmake .
502+
cmake --build . --parallel
503+
./Debug/test.exe
504+
- name: upload vcpkg logs to artifacts
505+
if: always() # even if previous steps fail, this one needs to be run
506+
uses: actions/upload-artifact@v4
507+
with:
508+
name: vcpkg_windows_logs
509+
path: |
510+
vcpkg-installation/buildtrees/${{ env.PACKAGE_NAME }}/
511+
build/vcpkg/**/*.log
472512
##### conan - linux #####
473513
conan-linux:
474514
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
@@ -26,6 +24,4 @@ myci_declare_library(${name}
2624
DEPENDENCIES
2725
utki
2826
papki
29-
EXTERNAL_DEPENDENCIES
30-
ZLIB::ZLIB
3127
)

build/vcpkg/test/CMakeLists.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +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)
107
find_package(cssom CONFIG REQUIRED)
118

129
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": "35750955e61a13f91147b901b4c23726c80d8b77",
11+
"baseline": "a2e1d4e6bdf94c70be5ebad01b1f07508b04d09c",
1212
"reference": "main",
1313
"packages": [ "myci", "utki", "papki" ]
1414
}

build/vcpkg/usage

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

3-
find_package(utki CONFIG REQUIRED)
4-
find_package(ZLIB REQUIRED)
5-
find_package(papki CONFIG REQUIRED)
63
find_package(cssom CONFIG REQUIRED)
74

85
target_link_libraries(main PRIVATE cssom::cssom)

0 commit comments

Comments
 (0)