Skip to content

Add VCPKG port

Add VCPKG port #9

name: Windows (x64) (VCPKG)
on:
push:
branches:
- "*"
tags:
- "*"
pull_request:
branches:
- "*"
jobs:
build-shared:
name: Shared Library
runs-on: windows-latest
env:
EVENT_CONTEXT: ${{ toJson(github.event) }}
steps:
- uses: actions/checkout@v4
- name: Set GIT_REF (PR)
run: |
echo "${{ github.event.pull_request.head.repo.full_name }}" >> ${{ github.workspace }}/package/vcpkg/GIT_REPO
echo "${{ github.event.pull_request.head.sha }}" >> ${{ github.workspace }}/package/vcpkg/GIT_REF
if: github.event_name == 'pull_request'
- name: Set GIT_REF (Non-PR)
run: |
echo "${{ github.event.repository.full_name }}" >> ${{ github.workspace }}/package/vcpkg/GIT_REPO
echo "${{ github.sha }}" >> ${{ github.workspace }}/package/vcpkg/GIT_REF
if: github.event_name != 'pull_request'
- name: Install
run: |
cd ..
vcpkg install libprojectm:x64-windows --overlay-ports="${{ github.workspace }}/package/vcpkg"
build-static:
name: Static Library
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Set GIT_REF (PR)
run: |
echo "${{ github.event.pull_request.head.repo.full_name }}" >> ${{ github.workspace }}/package/vcpkg/GIT_REPO
echo "${{ github.event.pull_request.head.sha }}" >> ${{ github.workspace }}/package/vcpkg/GIT_REF
if: github.event_name == 'pull_request'
- name: Set GIT_REF (Non-PR)
run: |
echo "${{ github.event.repository.full_name }}" >> ${{ github.workspace }}/package/vcpkg/GIT_REPO
echo "${{ github.sha }}" >> ${{ github.workspace }}/package/vcpkg/GIT_REF
if: github.event_name != 'pull_request'
- name: Install
run: |
cd ..
vcpkg install libprojectm:x64-windows-static --overlay-ports="${{ github.workspace }}/package/vcpkg"