2021-02-21 05:57:38 -07:00
|
|
|
name: Build
|
|
|
|
|
|
|
|
on: [push, pull_request]
|
|
|
|
|
|
|
|
jobs:
|
2021-03-03 11:05:47 -07:00
|
|
|
Build:
|
|
|
|
name: ${{ matrix.platform.name }}
|
|
|
|
runs-on: ${{ matrix.platform.os }}
|
2021-09-20 06:22:20 -06:00
|
|
|
|
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
shell: ${{ matrix.platform.shell }}
|
|
|
|
|
2021-03-03 11:05:47 -07:00
|
|
|
strategy:
|
2021-11-08 19:14:08 -07:00
|
|
|
fail-fast: false
|
2021-03-03 11:05:47 -07:00
|
|
|
matrix:
|
|
|
|
platform:
|
2021-11-17 16:04:34 -07:00
|
|
|
- { 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-09-20 06:22:20 -06:00
|
|
|
|
2021-03-03 11:05:47 -07:00
|
|
|
steps:
|
2021-09-20 06:22:20 -06:00
|
|
|
- name: Set up MSYS2
|
|
|
|
if: matrix.platform.shell == 'msys2 {0}'
|
|
|
|
uses: msys2/setup-msys2@v2
|
|
|
|
with:
|
|
|
|
msystem: ${{ matrix.platform.msystem }}
|
|
|
|
install: >-
|
|
|
|
${{ matrix.platform.msys-env }}-gcc
|
|
|
|
${{ matrix.platform.msys-env }}-cmake
|
|
|
|
${{ matrix.platform.msys-env }}-ninja
|
|
|
|
${{ matrix.platform.msys-env }}-pkg-config
|
|
|
|
|
2021-03-03 11:05:47 -07:00
|
|
|
- name: Setup Linux dependencies
|
|
|
|
if: runner.os == 'Linux'
|
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
2022-04-12 07:54:24 -06:00
|
|
|
sudo apt-get install \
|
|
|
|
autoconf \
|
|
|
|
wayland-protocols \
|
2021-03-03 11:05:47 -07: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-03-10 17:40:43 -07: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-05-04 10:45:26 -06:00
|
|
|
ninja -v -C build
|
2021-03-10 17:40:43 -07:00
|
|
|
sudo meson install -C build
|
2021-03-03 11:05:47 -07:00
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Configure CMake
|
2021-10-30 11:10:03 -06:00
|
|
|
run: cmake -B build -DSDL_TEST=ON ${{ matrix.platform.flags }}
|
2021-03-03 11:05:47 -07:00
|
|
|
- name: Build
|
2022-05-04 10:45:26 -06:00
|
|
|
run: cmake -v --build build/ --config Release
|
2022-05-03 13:22:48 -06:00
|
|
|
- name: Install
|
|
|
|
run: |
|
|
|
|
set -eu
|
2022-05-04 10:45:26 -06:00
|
|
|
cmake -v --build build/ --config Release
|
2022-05-03 13:22:48 -06:00
|
|
|
rm -fr DESTDIR-cmake
|
2022-05-04 10:45:26 -06:00
|
|
|
DESTDIR=$(pwd)/DESTDIR-cmake cmake -v --install build/ --config Release
|
2022-05-03 13:22:48 -06:00
|
|
|
( cd DESTDIR-cmake; find ) | LC_ALL=C sort -u
|
2022-04-12 07:54:24 -06:00
|
|
|
- name: Configure Autotools
|
|
|
|
if: runner.os == 'Linux'
|
|
|
|
run: |
|
|
|
|
set -eu
|
|
|
|
rm -fr build-autotools
|
|
|
|
mkdir build-autotools
|
|
|
|
./autogen.sh
|
|
|
|
( cd build-autotools && ../configure )
|
|
|
|
curdir="$(pwd)"
|
|
|
|
multiarch="$(dpkg-architecture -qDEB_HOST_MULTIARCH)"
|
|
|
|
(
|
|
|
|
mkdir -p build-autotools/test
|
|
|
|
cd build-autotools/test
|
|
|
|
../../test/configure \
|
|
|
|
--x-includes=/usr/include \
|
|
|
|
--x-libraries="/usr/lib/${multiarch}" \
|
|
|
|
SDL_CFLAGS="-I${curdir}/include" \
|
|
|
|
SDL_LIBS="-L${curdir}/build-autotools/build/.libs -lSDL2" \
|
|
|
|
ac_cv_lib_SDL2_ttf_TTF_Init=no \
|
|
|
|
${NULL+}
|
|
|
|
)
|
|
|
|
- name: Build with Autotools
|
|
|
|
if: runner.os == 'Linux'
|
|
|
|
run: |
|
|
|
|
set -eu
|
|
|
|
curdir="$(pwd)"
|
|
|
|
parallel="$(getconf _NPROCESSORS_ONLN)"
|
2022-05-04 10:45:26 -06:00
|
|
|
make -j"${parallel}" -C build-autotools V=1
|
|
|
|
make -j"${parallel}" -C build-autotools/test V=1
|
2022-04-12 07:54:24 -06:00
|
|
|
rm -fr DESTDIR-autotools
|
|
|
|
mkdir DESTDIR-autotools
|
2022-05-04 10:45:26 -06:00
|
|
|
make -j"${parallel}" -C build-autotools install DESTDIR="${curdir}/DESTDIR-autotools" V=1
|
2022-04-12 07:54:24 -06:00
|
|
|
( cd DESTDIR-autotools; find ) | LC_ALL=C sort -u
|
2022-05-04 10:45:26 -06:00
|
|
|
make -j"${parallel}" -C build-autotools dist V=1
|