Skip to content

Commit 00fabdd

Browse files
substringslouken
authored andcommitted
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.
1 parent 6869355 commit 00fabdd

File tree

1 file changed

+51
-41
lines changed

1 file changed

+51
-41
lines changed

.github/workflows/main.yml

Lines changed: 51 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -3,44 +3,54 @@ name: Build
33
on: [push, pull_request]
44

55
jobs:
6-
mac:
7-
runs-on: macos-latest
8-
steps:
9-
- uses: actions/checkout@v1
10-
11-
- name: Build
12-
run: |
13-
mkdir build
14-
cd build
15-
cmake ..
16-
cmake --build .
17-
18-
linux:
19-
runs-on: ubuntu-20.04
20-
steps:
21-
- uses: actions/checkout@v1
22-
23-
- name: Setup
24-
run: |
25-
sudo apt-get update
26-
sudo apt-get install wayland-protocols pkg-config ninja-build
27-
28-
- name: Linux
29-
run: |
30-
mkdir build
31-
cd build
32-
cmake .. -GNinja
33-
cmake --build .
34-
35-
windows:
36-
runs-on: windows-latest
37-
38-
steps:
39-
- uses: actions/checkout@v1
40-
41-
- name: Build
42-
run: |
43-
mkdir build
44-
cd build
45-
cmake ..
46-
cmake --build .
6+
Build:
7+
name: ${{ matrix.platform.name }}
8+
runs-on: ${{ matrix.platform.os }}
9+
strategy:
10+
matrix:
11+
platform:
12+
- { name: Windows, os: windows-latest }
13+
- { name: Linux, os: ubuntu-20.04, flags: -GNinja }
14+
- { name: MacOS, os: macos-latest }
15+
steps:
16+
- name: Setup Linux dependencies
17+
if: runner.os == 'Linux'
18+
run: |
19+
sudo apt-get update
20+
sudo apt-get install wayland-protocols \
21+
pkg-config \
22+
ninja-build \
23+
libasound2-dev \
24+
libdbus-1-dev \
25+
libegl1-mesa-dev \
26+
libgl1-mesa-dev \
27+
libgles2-mesa-dev \
28+
libglu1-mesa-dev \
29+
libibus-1.0-dev \
30+
libpulse-dev \
31+
libsdl2-2.0-0 \
32+
libsndio-dev \
33+
libudev-dev \
34+
libwayland-dev \
35+
libwayland-client++0 \
36+
wayland-scanner++ \
37+
libwayland-cursor++0 \
38+
libx11-dev \
39+
libxcursor-dev \
40+
libxext-dev \
41+
libxi-dev \
42+
libxinerama-dev \
43+
libxkbcommon-dev \
44+
libxrandr-dev \
45+
libxss-dev \
46+
libxt-dev \
47+
libxv-dev \
48+
libxxf86vm-dev \
49+
libdrm-dev \
50+
libgbm-dev\
51+
libpulse-dev
52+
- uses: actions/checkout@v2
53+
- name: Configure CMake
54+
run: cmake -B build ${{ matrix.platform.flags }}
55+
- name: Build
56+
run: cmake --build build/

0 commit comments

Comments
 (0)