mirror of
https://github.com/libsdl-org/SDL.git
synced 2024-11-26 21:33:26 +08:00
ci: add NetBSD to test matrix
Co-authored-by: Ozkan Sezer <sezeroz@gmail.com>
This commit is contained in:
parent
dd5b8db3a6
commit
e548044a82
64
.github/workflows/cpactions.yml
vendored
64
.github/workflows/cpactions.yml
vendored
@ -9,53 +9,41 @@ concurrency:
|
||||
jobs:
|
||||
freebsd:
|
||||
runs-on: ubuntu-latest
|
||||
name: FreeBSD
|
||||
name: '${{ matrix.platform.name }} ${{ matrix.platform.os-version }}'
|
||||
timeout-minutes: 30
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform:
|
||||
- { name: FreeBSD, os: freebsd, os-version: 13.2, os-arch: x86-64, artifact: SDL-freebsd-x64,
|
||||
sdl-cmake-configure-arguments: '-DSDL_CHECK_REQUIRED_INCLUDES="/usr/local/include" -DSDL_CHECK_REQUIRED_LINK_OPTIONS="-L/usr/local/lib"',
|
||||
setup-cmd: 'sudo pkg update',
|
||||
install-cmd: 'sudo pkg install -y cmake ninja pkgconf libXcursor libXext libXinerama libXi libXfixes libXrandr libXScrnSaver libXxf86vm wayland wayland-protocols libxkbcommon mesa-libs libglvnd evdev-proto libinotify alsa-lib jackit pipewire pulseaudio sndio dbus zh-fcitx ibus libudev-devd',
|
||||
}
|
||||
- { name: NetBSD, os: netbsd, os-version: 9.3, os-arch: x86-64, artifact: SDL-netbsd-x64,
|
||||
sdl-cmake-configure-arguments: '',
|
||||
setup-cmd: 'export PATH="/usr/pkg/sbin:/usr/pkg/bin:/sbin:$PATH";export PKG_CONFIG_PATH="/usr/pkg/lib/pkgconfig";export PKG_PATH="https://cdn.netBSD.org/pub/pkgsrc/packages/NetBSD/$(uname -p)/$(uname -r|cut -f "1 2" -d.)/All/";echo "PKG_PATH=$PKG_PATH";echo "uname -a -> \"$(uname -a)\"";sudo -E sysctl -w security.pax.aslr.enabled=0;sudo -E sysctl -w security.pax.aslr.global=0;sudo -E pkgin clean;sudo -E pkgin update',
|
||||
install-cmd: 'sudo -E pkgin -y install cmake dbus pkgconf ninja-build pulseaudio libxkbcommon wayland wayland-protocols libinotify libusb1',
|
||||
}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Build
|
||||
uses: cross-platform-actions/action@v0.19.1
|
||||
uses: cross-platform-actions/action@v0.21.1
|
||||
with:
|
||||
operating_system: freebsd
|
||||
version: '13.2'
|
||||
operating_system: ${{ matrix.platform.os }}
|
||||
architecture: ${{ matrix.platform.os-arch }}
|
||||
version: ${{ matrix.platform.os-version }}
|
||||
run: |
|
||||
sudo pkg update
|
||||
sudo pkg install -y \
|
||||
cmake \
|
||||
ninja \
|
||||
pkgconf \
|
||||
libXcursor \
|
||||
libXext \
|
||||
libXinerama \
|
||||
libXi \
|
||||
libXfixes \
|
||||
libXrandr \
|
||||
libXScrnSaver \
|
||||
libXxf86vm \
|
||||
wayland \
|
||||
wayland-protocols \
|
||||
libxkbcommon \
|
||||
mesa-libs \
|
||||
libglvnd \
|
||||
evdev-proto \
|
||||
libinotify \
|
||||
alsa-lib \
|
||||
jackit \
|
||||
pipewire \
|
||||
pulseaudio \
|
||||
sndio \
|
||||
dbus \
|
||||
zh-fcitx \
|
||||
ibus \
|
||||
libudev-devd
|
||||
${{ matrix.platform.setup-cmd }}
|
||||
${{ matrix.platform.install-cmd }}
|
||||
cmake -S . -B build -GNinja \
|
||||
-Wdeprecated -Wdev -Werror \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DSDL_CHECK_REQUIRED_INCLUDES="/usr/local/include" \
|
||||
-DSDL_CHECK_REQUIRED_LINK_OPTIONS="-L/usr/local/lib"
|
||||
cmake --build build/ --config Release --verbose -- -j`sysctl -n hw.ncpu`
|
||||
-DSDL_WERROR=ON \
|
||||
${{ matrix.platform.sdl-cmake-configure-arguments }}
|
||||
cmake --build build/ --config Release --verbose
|
||||
cmake --build build/ --config Release --target package
|
||||
|
||||
|
||||
cmake --build build/ --config Release --target clean
|
||||
rm -rf build/dist/_CPack_Packages
|
||||
rm -rf build/CMakeFiles
|
||||
@ -64,5 +52,5 @@ jobs:
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
if-no-files-found: error
|
||||
name: SDL-freebsd
|
||||
name: ${{ matrix.platform.artifact }}
|
||||
path: build/dist/SDL3*
|
||||
|
@ -1590,7 +1590,7 @@ elseif(UNIX AND NOT APPLE AND NOT RISCOS AND NOT HAIKU)
|
||||
set(SDL_USE_IME 1)
|
||||
endif()
|
||||
|
||||
if(FREEBSD AND NOT HAVE_INOTIFY)
|
||||
if((FREEBSD OR NETBSD) AND NOT HAVE_INOTIFY)
|
||||
set(LibInotify_PKG_CONFIG_SPEC libinotify)
|
||||
pkg_check_modules(PC_LIBINOTIFY IMPORTED_TARGET ${LibInotify_PKG_CONFIG_SPEC})
|
||||
if(PC_LIBINOTIFY_FOUND)
|
||||
|
Loading…
Reference in New Issue
Block a user