ci(macos): use vcpkg

Signed-off-by: Seth Flynn <getchoo@tuta.io>
This commit is contained in:
Seth Flynn 2025-07-13 15:30:55 -04:00
parent 9210d68ed1
commit 4614d683b3
No known key found for this signature in database
GPG key ID: D31BD0D494BBEE86
2 changed files with 34 additions and 0 deletions

View file

@ -42,6 +42,8 @@ runs:
- name: Setup macOS dependencies
if: ${{ runner.os == 'macOS' }}
uses: ./.github/actions/setup-dependencies/macos
with:
build-type: ${{ inputs.build-type }}
- name: Setup Windows dependencies
if: ${{ runner.os == 'Windows' }}

View file

@ -1,5 +1,11 @@
name: Setup macOS dependencies
inputs:
build-type:
description: Type for the build
required: true
default: Debug
runs:
using: composite
@ -14,3 +20,29 @@ runs:
shell: bash
run: |
echo "JAVA_HOME=$(/usr/libexec/java_home -v 17)" >> "$GITHUB_ENV"
- name: Setup vcpkg cache
if: ${{ inputs.build-type == 'Debug' }}
shell: bash
env:
USERNAME: ${{ github.repository_owner }}
GITHUB_TOKEN: ${{ github.token }}
FEED_URL: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json
run: |
mono `vcpkg fetch nuget | tail -n 1` \
sources add \
-Source "$FEED_URL" \
-StorePasswordInClearText \
-Name GitHubPackages \
-UserName "$USERNAME" \
-Password "$GITHUB_TOKEN"
mono `vcpkg fetch nuget | tail -n 1` \
setapikey "$GITHUB_TOKEN" \
-Source "$FEED_URL"
echo "VCPKG_BINARY_SOURCES=clear;nuget,$FEED_URL,readwrite" >> "$GITHUB_ENV"
- name: Setup vcpkg environment
if: ${{ inputs.build-type == 'Debug' }}
shell: bash
run: |
echo "CMAKE_TOOLCHAIN_FILE=$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" >> "$GITHUB_ENV"