Skip to content

Commit cd343ed

Browse files
committed
ci: vcpkg win job
1 parent 31efe58 commit cd343ed

File tree

1 file changed

+42
-2
lines changed

1 file changed

+42
-2
lines changed

.github/workflows/ci.yml

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,8 @@ jobs:
202202
filename: '.\nuget\*.nupkg'
203203
api-key: ${{ secrets.NUGET_DOT_ORG_API_KEY }}
204204
if: startsWith(github.ref, 'refs/tags/')
205-
##### vcpkg #####
206-
vcpkg:
205+
##### vcpkg-linux #####
206+
vcpkg-linux:
207207
strategy:
208208
fail-fast: false
209209
matrix:
@@ -256,6 +256,46 @@ jobs:
256256
run: |
257257
myci-deploy-vcpkg.sh --repo cppfw/vcpkg-repo --port-dir build/vcpkg/overlay/${PACKAGE_NAME}
258258
if: startsWith(github.ref, 'refs/tags/')
259+
##### vcpkg-windows #####
260+
vcpkg-windows:
261+
runs-on: windows-latest
262+
defaults:
263+
run:
264+
shell: powershell
265+
name: vcpkg - windows
266+
steps:
267+
- name: git clone
268+
uses: actions/checkout@v4
269+
- name: get myci scripts
270+
uses: actions/checkout@v4
271+
with:
272+
repository: cppfw/myci
273+
ref: latest
274+
path: myci
275+
- name: add myci to PATH
276+
uses: myci-actions/export-env-var-powershell@main
277+
with: {name: PATH, value: "$env:Path;myci/src/powershell"}
278+
- name: set VCPKG_ROOT
279+
uses: myci-actions/export-env-var-powershell@main
280+
# accorging to github actions windows image docs, it should define VCPKG_INSTALLATION_ROOT env var,
281+
# but on practice it is not set, so specify vcpkg root path explicitly
282+
with: {name: VCPKG_ROOT, value: "C:/vcpkg/"}
283+
- name: prepare vcpkg port
284+
run: myci-vcpkg-prepare.ps1 -gitref ${{ github.sha }}
285+
- name: test vcpkg port
286+
run: |
287+
cd build/vcpkg/test
288+
cmake .
289+
cmake --build .
290+
./Debug/test.exe
291+
- name: upload vcpkg logs to artifacts
292+
if: always() # even if previous steps fail, this one needs to be run
293+
uses: actions/upload-artifact@v4
294+
with:
295+
name: vcpkg_windows_logs
296+
path: |
297+
vcpkg-installation/buildtrees/${{ env.PACKAGE_NAME }}/
298+
build/vcpkg/**/*.log
259299
##### conan - linux #####
260300
# conan-linux:
261301
# strategy:

0 commit comments

Comments
 (0)