pineapple/externals/SDL/.github/workflows/main.yml

89 lines
2.9 KiB
YAML
Raw Normal View History

2021-05-09 11:30:38 +02:00
name: Build
on: [push, pull_request]
jobs:
Build:
name: ${{ matrix.platform.name }}
runs-on: ${{ matrix.platform.os }}
2021-12-07 02:20:09 +01:00
defaults:
run:
shell: ${{ matrix.platform.shell }}
2021-05-09 11:30:38 +02:00
strategy:
2021-12-07 02:20:09 +01:00
fail-fast: false
2021-05-09 11:30:38 +02:00
matrix:
platform:
2022-07-19 05:48:31 +02:00
- { name: Windows (x64), os: windows-latest, shell: pwsh, flags: -A x64 }
- { name: Windows (x86), os: windows-latest, shell: pwsh, flags: -A Win32 }
- { name: Windows (clang-cl x64), os: windows-latest, shell: pwsh, flags: -T ClangCL -A x64 }
- { name: Windows (clang-cl x86), os: windows-latest, shell: pwsh, flags: -T ClangCL -A Win32 }
- { name: Windows (ARM64), os: windows-latest, shell: pwsh, flags: -A ARM64 }
- { name: Windows (mingw32), os: windows-latest, shell: 'msys2 {0}', msystem: mingw32, msys-env: mingw-w64-i686 }
- { name: Windows (mingw64), os: windows-latest, shell: 'msys2 {0}', msystem: mingw64, msys-env: mingw-w64-x86_64 }
- { name: Linux, os: ubuntu-20.04, shell: sh, flags: -GNinja }
- { name: MacOS, os: macos-latest, shell: sh }
2021-12-07 02:20:09 +01:00
2021-05-09 11:30:38 +02:00
steps:
2021-12-07 02:20:09 +01:00
- name: Set up MSYS2
if: matrix.platform.shell == 'msys2 {0}'
uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.platform.msystem }}
install: >-
2022-07-19 05:48:31 +02:00
${{ matrix.platform.msys-env }}-gcc
2021-12-07 02:20:09 +01:00
${{ matrix.platform.msys-env }}-cmake
${{ matrix.platform.msys-env }}-ninja
${{ matrix.platform.msys-env }}-pkg-config
2021-05-09 11:30:38 +02:00
- name: Setup Linux dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update
2022-07-19 05:48:31 +02:00
sudo apt-get install wayland-protocols \
2021-05-09 11:30:38 +02:00
pkg-config \
ninja-build \
libasound2-dev \
libdbus-1-dev \
libegl1-mesa-dev \
libgl1-mesa-dev \
libgles2-mesa-dev \
libglu1-mesa-dev \
libibus-1.0-dev \
libpulse-dev \
libsdl2-2.0-0 \
libsndio-dev \
libudev-dev \
libwayland-dev \
libwayland-client++0 \
wayland-scanner++ \
libwayland-cursor++0 \
libx11-dev \
libxcursor-dev \
libxext-dev \
libxi-dev \
libxinerama-dev \
libxkbcommon-dev \
libxrandr-dev \
libxss-dev \
libxt-dev \
libxv-dev \
libxxf86vm-dev \
libdrm-dev \
libgbm-dev\
2021-08-12 01:07:27 +02:00
libpulse-dev \
libpango1.0-dev
sudo apt install meson
git clone --depth 1 https://gitlab.gnome.org/jadahl/libdecor.git --branch 0.1.0
cd libdecor
meson build --buildtype release -Ddemo=false -Ddbus=disabled
2022-07-19 05:48:31 +02:00
ninja -C build
2021-08-12 01:07:27 +02:00
sudo meson install -C build
2021-05-09 11:30:38 +02:00
- uses: actions/checkout@v2
2022-07-19 05:48:31 +02:00
- name: Configure CMake
run: cmake -B build -DSDL_TEST=ON ${{ matrix.platform.flags }}
- name: Build
run: cmake --build build/