Skip to content

Commit 8a5f20f

Browse files
committed
ci: add vcpkg - windows job
1 parent 243da5a commit 8a5f20f

File tree

1 file changed

+43
-3
lines changed

1 file changed

+43
-3
lines changed

.github/workflows/ci.yml

Lines changed: 43 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -445,8 +445,8 @@ jobs:
445445
filename: '.\nuget\*.nupkg'
446446
api-key: ${{ secrets.NUGET_DOT_ORG_API_KEY }}
447447
if: startsWith(github.ref, 'refs/tags/')
448-
##### vcpkg #####
449-
vcpkg:
448+
##### vcpkg-linux #####
449+
vcpkg-linux:
450450
strategy:
451451
fail-fast: false
452452
matrix:
@@ -491,14 +491,54 @@ jobs:
491491
if: always() # even if previous steps fail, this one needs to be run
492492
uses: actions/upload-artifact@v4
493493
with:
494-
name: vcpkg_logs
494+
name: vcpkg_linux_logs
495495
path: |
496496
vcpkg-installation/buildtrees/${{ env.PACKAGE_NAME }}/
497497
build/vcpkg/**/*.log
498498
- name: deploy vcpkg port
499499
run: |
500500
myci-deploy-vcpkg.sh --repo cppfw/vcpkg-repo --port-dir build/vcpkg/overlay/${PACKAGE_NAME}
501501
if: startsWith(github.ref, 'refs/tags/')
502+
##### vcpkg-windows #####
503+
vcpkg-windows:
504+
runs-on: windows-latest
505+
defaults:
506+
run:
507+
shell: powershell
508+
name: vcpkg - windows
509+
steps:
510+
- name: git clone
511+
uses: actions/checkout@v4
512+
- name: get myci scripts
513+
uses: actions/checkout@v4
514+
with:
515+
repository: cppfw/myci
516+
ref: latest
517+
path: myci
518+
- name: add myci to PATH
519+
uses: myci-actions/export-env-var-powershell@main
520+
with: {name: PATH, value: "$env:Path;myci/src/powershell"}
521+
- name: set VCPKG_ROOT
522+
uses: myci-actions/export-env-var-powershell@main
523+
# accorging to github actions windows image docs, it should define VCPKG_INSTALLATION_ROOT env var,
524+
# but on practice it is not set, so specify vcpkg root path explicitly
525+
with: {name: VCPKG_ROOT, value: "C:/vcpkg/"}
526+
- name: prepare vcpkg port
527+
run: myci-vcpkg-prepare.ps1 -gitref ${{ github.sha }}
528+
- name: test vcpkg port
529+
run: |
530+
cd build/vcpkg/test
531+
cmake .
532+
cmake --build . --parallel
533+
./Debug/test.exe
534+
- name: upload vcpkg logs to artifacts
535+
if: always() # even if previous steps fail, this one needs to be run
536+
uses: actions/upload-artifact@v4
537+
with:
538+
name: vcpkg_windows_logs
539+
path: |
540+
vcpkg-installation/buildtrees/${{ env.PACKAGE_NAME }}/
541+
build/vcpkg/**/*.log
502542
##### conan - linux #####
503543
conan-linux:
504544
strategy:

0 commit comments

Comments
 (0)