-
Notifications
You must be signed in to change notification settings - Fork 0
105 lines (96 loc) · 2.98 KB
/
cmake-sdl2.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
name: Build SDL2 Libraries
on: [workflow_dispatch]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
arch: x86_64
cmake-arch: x64
- os: linux
arch: arm64
cmake-arch: aarch64
runner-label: self-hosted
- os: windows-latest
arch: x86_64
cmake-arch: x64
- os: windows-latest
arch: x86
cmake-arch: win32
- os: windows-latest
arch: arm64
cmake-arch: arm64
- os: macos-latest
arch: x86_64
cmake-arch: x86_64
- os: macos-latest
arch: arm64
cmake-arch: arm64
steps:
- uses: actions/[email protected]
with:
repository: 'libsdl-org/SDL'
ref: 'release-2.30.10'
path: 'SDL'
- name: Install dependencies on Ubuntu
if: matrix.os == 'linux' || matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update && sudo apt-get install -y \
build-essential \
cmake \
libasound2-dev \
libpulse-dev \
libaudio-dev \
libx11-dev \
libxext-dev \
libxrandr-dev \
libxcursor-dev \
libxfixes-dev \
libxi-dev \
libxinerama-dev \
libxss-dev \
libwayland-dev \
libwayland-egl-backend-dev \
libdbus-1-dev \
libudev-dev \
libgles2-mesa-dev \
libegl1-mesa-dev \
libgl1-mesa-dev \
libibus-1.0-dev \
fcitx-libs-dev \
libsamplerate0-dev \
ccache \
libjack-jackd2-dev \
libdrm-dev \
libpipewire-0.3-dev \
libvulkan-dev \
libdecor-0-dev \
qtwayland5 \
libxkbcommon-dev \
libsndio-dev
- name: Configure cimgui with CMake on Linux (x86_64)
if: matrix.os == 'linux' || matrix.os == 'ubuntu-latest'
run: cmake -S SDL -B SDL/build -DSDL_STATIC=OFF -DSDL_SHARED=ON
- name: Configure SDL2 with CMake for macOS ARM64
if: matrix.os == 'macos-latest'
run: cmake -S SDL -B SDL/build -DCMAKE_OSX_ARCHITECTURES=${{ matrix.cmake-arch }} -DSDL_STATIC=OFF -DSDL_SHARED=ON
- name: Configure cimgui with CMake for Windows
if: matrix.os == 'windows-latest'
run: cmake -S SDL -B SDL/build -A ${{ matrix.cmake-arch }} -DSDL_STATIC=OFF -DSDL_SHARED=ON
- name: Build SDL2
run: cmake --build SDL/build --config Release
- name: Move Windows binaries
if: matrix.os == 'windows-latest'
run: |
mv SDL/build/Release/*.dll SDL/build/
- name: Upload Artifacts
uses: actions/[email protected]
with:
name: sdl2-${{ matrix.os }}-${{ matrix.arch }}-artifacts
path: |
SDL/build/*.dll
SDL/build/*.so
SDL/build/*.dylib
if-no-files-found: ignore # 'warn' or 'ignore' or 'error'