Archived
1
Fork 0
This repository has been archived on 2025-04-12. You can view files and clone it, but cannot push or open issues or pull requests.
prism/.github/workflows/ci.yml

45 lines
1.7 KiB
YAML

name: CI
on: [push]
jobs:
job:
name: ${{ matrix.os }}-${{ github.workflow }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
include:
- os: windows-latest
triplet: x64-windows
- os: ubuntu-latest
triplet: x64-linux
- os: macos-latest
triplet: x64-osx
steps:
- uses: actions/checkout@v2
- name: Download SDL2 through Homebrew
if: matrix.os == 'macos-latest'
run: brew install sdl2
- name: Download SDL2 through vcpkg
if: matrix.os == 'windows-latest'
run: vcpkg --triplet=${{ matrix.triplet }} install sdl2
- name: Download LunarG key
if: matrix.os == 'ubuntu-latest'
run: wget -qO - https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo apt-key add -
- name: Add LunarG Vulkan repository
if: matrix.os == 'ubuntu-latest'
run: sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-bionic.list https://packages.lunarg.com/vulkan/lunarg-vulkan-bionic.list
- name: Update package list
if: matrix.os == 'ubuntu-latest'
run: sudo apt update
- name: Install Vulkan SDK
if: matrix.os == 'ubuntu-latest'
run: sudo apt install -f vulkan-sdk libsdl2-dev
- name: Configure
if: matrix.os != 'windows-latest'
run: cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release
- name: Configure (Windows)
if: matrix.os == 'windows-latest'
run: cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake
- name: Build
run: cmake --build build