Skip to content

Commit 58150a9

Browse files
committed
vcpkg: update
1 parent de96b9f commit 58150a9

5 files changed

Lines changed: 44 additions & 40 deletions

File tree

.github/workflows/ci.yml

Lines changed: 43 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -429,8 +429,8 @@ jobs:
429429
filename: '.\nuget\*.nupkg'
430430
api-key: ${{ secrets.NUGET_DOT_ORG_API_KEY }}
431431
if: startsWith(github.ref, 'refs/tags/')
432-
##### vcpkg #####
433-
vcpkg:
432+
##### vcpkg-linux #####
433+
vcpkg-linux:
434434
strategy:
435435
fail-fast: false
436436
matrix:
@@ -475,14 +475,54 @@ jobs:
475475
if: always() # even if previous steps fail, this one needs to be run
476476
uses: actions/upload-artifact@v4
477477
with:
478-
name: vcpkg_logs
478+
name: vcpkg_linux_logs
479479
path: |
480480
vcpkg-installation/buildtrees/${{ env.PACKAGE_NAME }}/
481481
build/vcpkg/**/*.log
482482
- name: deploy vcpkg port
483483
run: |
484484
myci-deploy-vcpkg.sh --repo cppfw/vcpkg-repo --port-dir build/vcpkg/overlay/${PACKAGE_NAME}
485485
if: startsWith(github.ref, 'refs/tags/')
486+
##### vcpkg-windows #####
487+
vcpkg-windows:
488+
runs-on: windows-latest
489+
defaults:
490+
run:
491+
shell: powershell
492+
name: vcpkg - windows
493+
steps:
494+
- name: git clone
495+
uses: actions/checkout@v4
496+
- name: get myci scripts
497+
uses: actions/checkout@v4
498+
with:
499+
repository: cppfw/myci
500+
ref: latest
501+
path: myci
502+
- name: add myci to PATH
503+
uses: myci-actions/export-env-var-powershell@main
504+
with: {name: PATH, value: "$env:Path;myci/src/powershell"}
505+
- name: set VCPKG_ROOT
506+
uses: myci-actions/export-env-var-powershell@main
507+
# accorging to github actions windows image docs, it should define VCPKG_INSTALLATION_ROOT env var,
508+
# but on practice it is not set, so specify vcpkg root path explicitly
509+
with: {name: VCPKG_ROOT, value: "C:/vcpkg/"}
510+
- name: prepare vcpkg port
511+
run: myci-vcpkg-prepare.ps1 -gitref ${{ github.sha }}
512+
- name: test vcpkg port
513+
run: |
514+
cd build/vcpkg/test
515+
cmake .
516+
cmake --build . --parallel
517+
./Debug/test.exe
518+
- name: upload vcpkg logs to artifacts
519+
if: always() # even if previous steps fail, this one needs to be run
520+
uses: actions/upload-artifact@v4
521+
with:
522+
name: vcpkg_windows_logs
523+
path: |
524+
vcpkg-installation/buildtrees/${{ env.PACKAGE_NAME }}/
525+
build/vcpkg/**/*.log
486526
##### conan - linux #####
487527
conan-linux:
488528
strategy:

build/cmake/CMakeLists.txt

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +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-
find_package(PNG REQUIRED)
12-
find_package(JPEG REQUIRED)
13-
1410
set(srcs)
1511
myci_add_source_files(srcs
1612
DIRECTORY
@@ -27,16 +23,8 @@ myci_declare_library(${name}
2723
../../src/${name}
2824
DEPENDENCIES
2925
utki
30-
papki
3126
r4
3227
rasterimage
33-
agg
34-
mikroxml
35-
cssom
3628
svgdom
3729
veg
38-
EXTERNAL_DEPENDENCIES
39-
ZLIB::ZLIB
40-
PNG::PNG
41-
JPEG::JPEG
4230
)

build/vcpkg/test/CMakeLists.txt

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +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(papki CONFIG REQUIRED)
9-
find_package(ZLIB REQUIRED)
10-
find_package(PNG REQUIRED)
11-
find_package(JPEG REQUIRED)
12-
find_package(r4 CONFIG REQUIRED)
13-
find_package(rasterimage CONFIG REQUIRED)
14-
find_package(agg CONFIG REQUIRED)
15-
find_package(veg CONFIG REQUIRED)
16-
find_package(svgdom CONFIG REQUIRED)
17-
find_package(mikroxml CONFIG REQUIRED)
18-
find_package(cssom CONFIG REQUIRED)
197
find_package(svgren CONFIG REQUIRED)
208

219
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": "fe66df3b226109c1a474163cb0f72ade285bc49e",
11+
"baseline": "1f2290382f6d31870139666276c1aa04bc925885",
1212
"reference": "main",
1313
"packages": [
1414
"myci",

build/vcpkg/usage

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

3-
find_package(utki CONFIG REQUIRED)
4-
find_package(papki CONFIG REQUIRED)
5-
find_package(ZLIB REQUIRED)
6-
find_package(PNG REQUIRED)
7-
find_package(JPEG REQUIRED)
8-
find_package(r4 CONFIG REQUIRED)
9-
find_package(rasterimage CONFIG REQUIRED)
10-
find_package(agg CONFIG REQUIRED)
11-
find_package(veg CONFIG REQUIRED)
12-
find_package(svgdom CONFIG REQUIRED)
13-
find_package(mikroxml CONFIG REQUIRED)
14-
find_package(cssom CONFIG REQUIRED)
153
find_package(svgren CONFIG REQUIRED)
164

175
target_link_libraries(main PRIVATE svgren::svgren)

0 commit comments

Comments
 (0)