Update LICENSE & README.md #1
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 (Linux) | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
run: sudo apt-get update && sudo apt-get install cmake | |
- name: Install CMake & SDL2 (MacOS) | |
if: ${{ matrix.os == 'macos-latest' }} | |
run: brew install cmake sdl2 | |
- name: Get SDL2 | |
if: ${{ matrix.os != 'macos-latest' }} | |
run: git clone https://github.com/libsdl-org/SDL -b release-2.26.2 | |
- name: Generate Build Files (SDL2 Windows) | |
if: ${{ matrix.os == 'windows-latest' }} | |
run: | | |
cd SDL/ | |
cmake -L -S . -B build/ -G "Visual Studio 17 2022" -DCMAKE_BUILD_TYPE=Release -DSDL2_DISABLE_SDL2MAIN=OFF -DSDL_VIDEO=ON -DSDL_RENDER=ON -DSDL_DIRECTX=ON -DSDL_RENDER_D3D=ON -DSDL_VULKAN=ON -DSDL_XINPUT=ON -DSDL_EVENTS=ON -DSDL_LOADSO=ON -DSDL_THREADS=ON -DSDL_TIMERS=ON -DSDL_ATOMIC=OFF -DSDL_AUDIO=OFF -DSDL_JOYSTICK=OFF -DSDL_HAPTIC=OFF -DSDL_HIDAPI=OFF -DSDL_POWER=OFF -DSDL_FILE=OFF -DSDL_CPUINFO=OFF -DSDL_FILESYSTEM=OFF -DSDL_SENSOR=OFF -DSDL_LOCALE=OFF -DSDL_MISC=OFF -DSDL_DISKAUDIO=OFF -DSDL_DUMMYAUDIO=OFF -DSDL_DUMMYVIDEO=OFF -DSDL_HIDAPI=OFF -DSDL_HIDAPI_JOYSTICK=OFF -DSDL_VIRTUAL_JOYSTICK=OFF -DSDL_WASAPI=OFF | |
- name: Generate Build Files (SDL2 Linux) | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
run: | | |
cd SDL/ | |
cmake -L -S . -B build/ -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DSDL2_DISABLE_SDL2MAIN=OFF -DSDL_VIDEO=ON -DSDL_RENDER=ON -DSDL_DIRECTX=OFF -DSDL_RENDER_D3D=OFF -DSDL_VULKAN=ON -DSDL_XINPUT=OFF -DSDL_EVENTS=ON -DSDL_LOADSO=ON -DSDL_THREADS=ON -DSDL_TIMERS=ON -DSDL_ATOMIC=OFF -DSDL_AUDIO=OFF -DSDL_JOYSTICK=OFF -DSDL_HAPTIC=OFF -DSDL_HIDAPI=OFF -DSDL_POWER=OFF -DSDL_FILE=OFF -DSDL_CPUINFO=OFF -DSDL_FILESYSTEM=OFF -DSDL_SENSOR=OFF -DSDL_LOCALE=OFF -DSDL_MISC=OFF -DSDL_DISKAUDIO=OFF -DSDL_DUMMYAUDIO=OFF -DSDL_DUMMYVIDEO=OFF -DSDL_HIDAPI=OFF -DSDL_HIDAPI_JOYSTICK=OFF -DSDL_VIRTUAL_JOYSTICK=OFF -DSDL_WASAPI=OFF | |
- name: Build (SDL2) | |
if: ${{ matrix.os != 'macos-latest' }} | |
run: | | |
cd SDL/ | |
cmake --build build/ --config Release --parallel 4 | |
- name: Install SDL2 (Linux) | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
run: cd SDL && sudo cmake --install build/ --config Release | |
- name: Install SDL2 (Windows) | |
if: ${{ matrix.os == 'windows-latest' }} | |
run: cd SDL && cmake --install build/ --config Release | |
- 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 |