Build SDL3 Libraries #3
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: Build SDL3 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: 'preview-3.1.3' | |
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 SDL3 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 SDL3 | |
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: sdl3-${{ 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' |