Update CI.yml #6
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: CI | |
on: [push, pull_request] | |
jobs: | |
windows: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: 'recursive' | |
- name: cache-vulkansdk | |
id: cache-vulkansdk | |
uses: actions/cache@v1 | |
with: | |
path: "VulkanSDK" | |
key: VulkanSDK-1.3.261.1-Installer | |
- name: vulkansdk | |
if: steps.cache-vulkansdk.outputs.cache-hit != 'true' | |
run: | | |
Invoke-WebRequest -Uri https://sdk.lunarg.com/sdk/download/1.3.261.1/windows/VulkanSDK-1.3.261.1-Installer.exe?Human=true -OutFile VulkanSDK-1.3.261.1-Installer.exe | |
7z x -aoa ./VulkanSDK-1.3.261.1-Installer.exe -oVulkanSDK | |
- name: build | |
run: | | |
$env:VULKAN_SDK="$(pwd)/VulkanSDK" | |
mkdir build; cd build | |
cmake -A x64 ../src | |
cmake --build . --config Release -j 2 | |
ubuntu: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: 'recursive' | |
- name: cache-vulkansdk | |
id: cache-vulkansdk | |
uses: actions/cache@v1 | |
with: | |
path: "1.3.261.1" | |
key: vulkansdk-linux-x86_64-1.3.261.1 | |
- name: vulkansdk | |
if: steps.cache-vulkansdk.outputs.cache-hit != 'true' | |
run: | | |
wget https://sdk.lunarg.com/sdk/download/1.3.261.1/linux/vulkansdk-linux-x86_64-1.3.261.1.tar.xz?Human=true -O vulkansdk-linux-x86_64-1.3.261.1.tar.xz | |
tar -xf vulkansdk-linux-x86_64-1.3.261.1.tar.xz | |
rm -rf 1.3.261.1/source 1.3.261.1/samples | |
find 1.3.261.1 -type f | grep -v -E 'vulkan|glslang' | xargs rm | |
- name: build | |
run: | | |
export VULKAN_SDK=`pwd`/1.3.261.1/x86_64 | |
mkdir build && cd build | |
cmake ../src | |
cmake --build . -j 2 | |
macos: | |
runs-on: macos-latest | |
env: | |
DEVELOPER_DIR: /Applications/Xcode_12.4.app/Contents/Developer | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: 'recursive' | |
- name: cache-vulkansdk | |
id: cache-vulkansdk | |
uses: actions/cache@v1 | |
with: | |
path: "vulkansdk-macos-1.3.261.1" | |
key: vulkansdk-macos-1.3.261.1 | |
- name: vulkansdk | |
if: steps.cache-vulkansdk.outputs.cache-hit != 'true' | |
run: | | |
wget https://sdk.lunarg.com/sdk/download/1.3.261.1/mac/vulkansdk-macos-1.3.261.1.dmg?Human=true -O vulkansdk-macos-1.3.261.1.dmg | |
hdiutil attach vulkansdk-macos-1.3.261.1.dmg | |
cp -r /Volumes/vulkansdk-macos-1.3.261.1 . | |
rm -rf vulkansdk-macos-1.3.261.1/Applications | |
find vulkansdk-macos-1.3.261.1 -type f | grep -v -E 'vulkan|glslang|MoltenVK' | xargs rm | |
hdiutil detach /Volumes/vulkansdk-macos-1.3.261.1 | |
- name: build-x86_64 | |
run: | | |
export VULKAN_SDK=`pwd`/vulkansdk-macos-1.3.261.1/macOS | |
mkdir build-x86_64 && cd build-x86_64 | |
cmake -DUSE_STATIC_MOLTENVK=ON -DCMAKE_OSX_ARCHITECTURES="x86_64" \ | |
-DVulkan_INCLUDE_DIR=`pwd`/../vulkansdk-macos-1.3.261.1/MoltenVK/include \ | |
-DVulkan_LIBRARY=`pwd`/../vulkansdk-macos-1.3.261.1/MoltenVK/MoltenVK.xcframework/macos-arm64_x86_64/libMoltenVK.a \ | |
../src | |
cmake --build . -j 3 | |
- name: build-arm64 | |
run: | | |
export VULKAN_SDK=`pwd`/vulkansdk-macos-1.3.261.1/macOS | |
sudo xcode-select --reset | |
mkdir build-arm64 && cd build-arm64 | |
cmake -DUSE_STATIC_MOLTENVK=ON -DCMAKE_OSX_ARCHITECTURES="arm64" \ | |
-DVulkan_INCLUDE_DIR=`pwd`/../vulkansdk-macos-1.3.261.1/MoltenVK/include \ | |
-DVulkan_LIBRARY=`pwd`/../vulkansdk-macos-1.3.261.1/MoltenVK/MoltenVK.xcframework/macos-arm64_x86_64/libMoltenVK.a \ | |
../src | |
cmake --build . -j 3 |