Update CMakeLists.txt #14
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: | |
branches: [ master ] | |
pull_request: | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: [ ubuntu-latest, macos-latest, windows-latest ] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: Install CMake & Xorg-dev (Linux) | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
run: sudo apt-get update && sudo apt-get install cmake xorg-dev | |
- name: Install CMake (MacOS) | |
if: ${{ matrix.os == 'macos-latest' }} | |
run: brew install cmake | |
- name: Generate Build Files (Windows) | |
if: ${{ matrix.os == 'windows-latest' }} | |
run: | | |
cmake -S . -B build/ -G "Visual Studio 17 2022" -T "ClangCL" -DCMAKE_BUILD_TYPE=Release | |
- name: Generate Build Files (Non-Windows) | |
if: ${{ matrix.os != 'windows-latest' }} | |
run: | | |
cmake -S . -B build/ -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release | |
- name: Build | |
run: | | |
cmake --build build/ --config Release --parallel 4 | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: ${{ matrix.os }} | |
path: ./build/ | |
if-no-files-found: error | |