mirror of https://github.com/libsdl-org/SDL
Make github CI great again
The current CI doesn't work and can be fixed. To steps, use a matrix to build on various OS + allow platform specific flags. The linux build should cover a wider case of video backends.
This commit is contained in:
parent
686935542e
commit
00fabdde18
|
@ -3,44 +3,54 @@ name: Build
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
mac:
|
Build:
|
||||||
runs-on: macos-latest
|
name: ${{ matrix.platform.name }}
|
||||||
steps:
|
runs-on: ${{ matrix.platform.os }}
|
||||||
- uses: actions/checkout@v1
|
strategy:
|
||||||
|
matrix:
|
||||||
- name: Build
|
platform:
|
||||||
run: |
|
- { name: Windows, os: windows-latest }
|
||||||
mkdir build
|
- { name: Linux, os: ubuntu-20.04, flags: -GNinja }
|
||||||
cd build
|
- { name: MacOS, os: macos-latest }
|
||||||
cmake ..
|
steps:
|
||||||
cmake --build .
|
- name: Setup Linux dependencies
|
||||||
|
if: runner.os == 'Linux'
|
||||||
linux:
|
run: |
|
||||||
runs-on: ubuntu-20.04
|
sudo apt-get update
|
||||||
steps:
|
sudo apt-get install wayland-protocols \
|
||||||
- uses: actions/checkout@v1
|
pkg-config \
|
||||||
|
ninja-build \
|
||||||
- name: Setup
|
libasound2-dev \
|
||||||
run: |
|
libdbus-1-dev \
|
||||||
sudo apt-get update
|
libegl1-mesa-dev \
|
||||||
sudo apt-get install wayland-protocols pkg-config ninja-build
|
libgl1-mesa-dev \
|
||||||
|
libgles2-mesa-dev \
|
||||||
- name: Linux
|
libglu1-mesa-dev \
|
||||||
run: |
|
libibus-1.0-dev \
|
||||||
mkdir build
|
libpulse-dev \
|
||||||
cd build
|
libsdl2-2.0-0 \
|
||||||
cmake .. -GNinja
|
libsndio-dev \
|
||||||
cmake --build .
|
libudev-dev \
|
||||||
|
libwayland-dev \
|
||||||
windows:
|
libwayland-client++0 \
|
||||||
runs-on: windows-latest
|
wayland-scanner++ \
|
||||||
|
libwayland-cursor++0 \
|
||||||
steps:
|
libx11-dev \
|
||||||
- uses: actions/checkout@v1
|
libxcursor-dev \
|
||||||
|
libxext-dev \
|
||||||
- name: Build
|
libxi-dev \
|
||||||
run: |
|
libxinerama-dev \
|
||||||
mkdir build
|
libxkbcommon-dev \
|
||||||
cd build
|
libxrandr-dev \
|
||||||
cmake ..
|
libxss-dev \
|
||||||
cmake --build .
|
libxt-dev \
|
||||||
|
libxv-dev \
|
||||||
|
libxxf86vm-dev \
|
||||||
|
libdrm-dev \
|
||||||
|
libgbm-dev\
|
||||||
|
libpulse-dev
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Configure CMake
|
||||||
|
run: cmake -B build ${{ matrix.platform.flags }}
|
||||||
|
- name: Build
|
||||||
|
run: cmake --build build/
|
||||||
|
|
Loading…
Reference in New Issue