PrismLauncher/.github/actions/setup-dependencies/macos/action.yml
Seth Flynn 4614d683b3
ci(macos): use vcpkg
Signed-off-by: Seth Flynn <getchoo@tuta.io>
2025-07-13 16:33:35 -04:00

48 lines
1.4 KiB
YAML

name: Setup macOS dependencies
inputs:
build-type:
description: Type for the build
required: true
default: Debug
runs:
using: composite
steps:
- name: Install dependencies
shell: bash
run: |
brew update
brew install ninja extra-cmake-modules temurin@17
- name: Set JAVA_HOME
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"