Skip to content

Commit 52caf2a

Browse files
committed
vcpkg: ci job
1 parent 5196e0c commit 52caf2a

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

.github/workflows/ci.yml

+52
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,58 @@ jobs:
282282
filename: '.\nuget\*.nupkg'
283283
api-key: ${{ secrets.NUGET_DOT_ORG_API_KEY }}
284284
if: startsWith(github.ref, 'refs/tags/')
285+
##### vcpkg #####
286+
vcpkg:
287+
strategy:
288+
fail-fast: false
289+
matrix:
290+
include:
291+
- {os: debian, codename: bookworm, image_owner: }
292+
# - {os: debian, codename: bookworm, image_owner: i386/, labels: [i386,docker]}
293+
# - {os: debian, codename: bookworm, image_owner: , labels: [arm32,docker]}
294+
# - {os: debian, codename: bookworm, image_owner: , labels: [arm64,docker]}
295+
runs-on: ${{ (matrix.labels == '' && 'ubuntu-latest') || matrix.labels }}
296+
container: ${{ matrix.image_owner }}${{ matrix.os }}:${{ matrix.codename }}
297+
name: vcpkg - linux | ${{ matrix.labels[0] }}
298+
steps:
299+
- name: add cppfw deb repo
300+
uses: myci-actions/add-deb-repo@main
301+
with:
302+
repo: deb https://gagis.hopto.org/repo/cppfw/${{ matrix.os }} ${{ matrix.codename }} main
303+
repo-name: cppfw
304+
keys-asc: https://gagis.hopto.org/repo/cppfw/pubkey.gpg
305+
install: myci cmake git curl zip unzip tar nodejs pkg-config
306+
- name: git clone
307+
uses: myci-actions/checkout@main
308+
- name: install vcpkg
309+
run: |
310+
git clone https://github.com/microsoft/vcpkg.git vcpkg-installation
311+
(cd vcpkg-installation; ./bootstrap-vcpkg.sh)
312+
- name: set VCPKG_ROOT
313+
uses: myci-actions/export-env-var@main
314+
with: {name: VCPKG_ROOT, value: "$(pwd)/vcpkg-installation"}
315+
- name: add VCPKG_ROOT to PATH
316+
uses: myci-actions/export-env-var@main
317+
with: {name: PATH, value: "$PATH:$VCPKG_ROOT"}
318+
- name: prepare vcpkg port
319+
run: |
320+
myci-vcpkg-prepare.sh --git-ref ${{ github.sha }}
321+
- name: test vcpkg port
322+
run: |
323+
cd vcpkg/test
324+
cmake .
325+
make
326+
./test
327+
- name: upload vcpkg logs to artifacts
328+
if: always() # even if previous steps fail, this one needs to be run
329+
uses: actions/upload-artifact@v4
330+
with:
331+
name: vcpkg_logs
332+
path: vcpkg-installation/buildtrees/${{ env.PACKAGE_NAME }}/
333+
- name: deploy vcpkg port
334+
run: |
335+
myci-deploy-vcpkg.sh --repo cppfw/vcpkg-repo --port-dir vcpkg/overlay/${PACKAGE_NAME}
336+
if: startsWith(github.ref, 'refs/tags/')
285337
##### conan - linux #####
286338
conan-linux:
287339
strategy:

0 commit comments

Comments
 (0)