Skip to content

Commit 775a6be

Browse files
committed
vcpkg: update
1 parent c2b249d commit 775a6be

File tree

4 files changed

+44
-12
lines changed

4 files changed

+44
-12
lines changed

.github/workflows/ci.yml

Lines changed: 43 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -313,8 +313,8 @@ jobs:
313313
filename: '.\nuget\*.nupkg'
314314
api-key: ${{ secrets.NUGET_DOT_ORG_API_KEY }}
315315
if: startsWith(github.ref, 'refs/tags/')
316-
##### vcpkg #####
317-
vcpkg:
316+
##### vcpkg-linux #####
317+
vcpkg-linux:
318318
strategy:
319319
fail-fast: false
320320
matrix:
@@ -359,14 +359,54 @@ jobs:
359359
if: always() # even if previous steps fail, this one needs to be run
360360
uses: actions/upload-artifact@v4
361361
with:
362-
name: vcpkg_logs
362+
name: vcpkg_linux_logs
363363
path: |
364364
vcpkg-installation/buildtrees/${{ env.PACKAGE_NAME }}/
365365
build/vcpkg/**/*.log
366366
- name: deploy vcpkg port
367367
run: |
368368
myci-deploy-vcpkg.sh --repo cppfw/vcpkg-repo --port-dir build/vcpkg/overlay/${PACKAGE_NAME}
369369
if: startsWith(github.ref, 'refs/tags/')
370+
##### vcpkg-windows #####
371+
vcpkg-windows:
372+
runs-on: windows-latest
373+
defaults:
374+
run:
375+
shell: powershell
376+
name: vcpkg - windows
377+
steps:
378+
- name: git clone
379+
uses: actions/checkout@v4
380+
- name: get myci scripts
381+
uses: actions/checkout@v4
382+
with:
383+
repository: cppfw/myci
384+
ref: latest
385+
path: myci
386+
- name: add myci to PATH
387+
uses: myci-actions/export-env-var-powershell@main
388+
with: {name: PATH, value: "$env:Path;myci/src/powershell"}
389+
- name: set VCPKG_ROOT
390+
uses: myci-actions/export-env-var-powershell@main
391+
# accorging to github actions windows image docs, it should define VCPKG_INSTALLATION_ROOT env var,
392+
# but on practice it is not set, so specify vcpkg root path explicitly
393+
with: {name: VCPKG_ROOT, value: "C:/vcpkg/"}
394+
- name: prepare vcpkg port
395+
run: myci-vcpkg-prepare.ps1 -gitref ${{ github.sha }}
396+
- name: test vcpkg port
397+
run: |
398+
cd build/vcpkg/test
399+
cmake .
400+
cmake --build . --parallel
401+
./Debug/test.exe
402+
- name: upload vcpkg logs to artifacts
403+
if: always() # even if previous steps fail, this one needs to be run
404+
uses: actions/upload-artifact@v4
405+
with:
406+
name: vcpkg_windows_logs
407+
path: |
408+
vcpkg-installation/buildtrees/${{ env.PACKAGE_NAME }}/
409+
build/vcpkg/**/*.log
370410
##### conan - linux #####
371411
conan-linux:
372412
strategy:

build/vcpkg/test/CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +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(clargs CONFIG REQUIRED)
9-
find_package(opros CONFIG REQUIRED)
10-
find_package(nitki CONFIG REQUIRED)
117
find_package(tst CONFIG REQUIRED)
128

139
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": "412f8ee0bb8bad56269668ffa00a91a8ddb5e7d3",
11+
"baseline": "3b85fc9d0bfd1b78f7a1fff77a825b850df61606",
1212
"reference": "main",
1313
"packages": [ "myci", "utki", "clargs", "opros", "nitki" ]
1414
}

build/vcpkg/usage

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

3-
find_package(utki CONFIG REQUIRED)
4-
find_package(clargs CONFIG REQUIRED)
5-
find_package(opros CONFIG REQUIRED)
6-
find_package(nitki CONFIG REQUIRED)
73
find_package(tst CONFIG REQUIRED)
84

95
target_link_libraries(main PRIVATE tst::tst)

0 commit comments

Comments
 (0)