Use vcpkg Vulkan. #12
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: macOS | |
env: | |
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite" | |
on: | |
push: | |
paths: | |
- '**' | |
- '!README.md' | |
- '!LICENSE.txt' | |
- '!doc/**' | |
- '!.github/workflows/*.yml' | |
- '.github/workflows/macos.yml' | |
jobs: | |
build: | |
runs-on: macOS-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install latest LLVM and Ninja | |
run: brew install llvm ninja | |
- name: Install vcpkg | |
run: | | |
git clone https://github.com/microsoft/vcpkg.git --depth 1 | |
cd vcpkg && ./bootstrap-vcpkg.sh | |
echo "VCPKG_ROOT=${{ github.workspace }}/vcpkg" >> $GITHUB_ENV | |
- name: Export GitHub Actions cache environment variables | |
uses: actions/github-script@v7 | |
with: | |
script: | | |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); | |
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); | |
- name: Workaround for CMake issue that cannot find __CMAKE::CXX23 target | |
run: sed -i '' 's|libc++.modules.json|../../c++/libc++.modules.json|g' /opt/homebrew/opt/cmake/share/cmake/Modules/Compiler/Clang-CXX-CXXImportStd.cmake # https://gitlab.kitware.com/cmake/cmake/-/issues/25965#note_1523575 | |
- name: Configure | |
run: | | |
mv .github/workflows/scripts/* . | |
cmake --preset=macos-clang | |
- name: Build | |
run: cmake --build build --config release |