2023-10-25 16:03:40 -06:00
|
|
|
name: Build (C/P Actions)
|
2022-07-30 06:35:38 -06:00
|
|
|
|
|
|
|
on: [push, pull_request]
|
|
|
|
|
2022-12-04 10:06:06 -07:00
|
|
|
concurrency:
|
2022-12-28 14:06:46 -07:00
|
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
|
2022-12-04 10:06:06 -07:00
|
|
|
cancel-in-progress: true
|
|
|
|
|
2022-07-30 06:35:38 -06:00
|
|
|
jobs:
|
|
|
|
freebsd:
|
2023-10-25 16:03:40 -06:00
|
|
|
runs-on: ubuntu-latest
|
2023-11-11 13:52:07 -07:00
|
|
|
name: '${{ matrix.platform.name }} ${{ matrix.platform.os-version }}'
|
2023-10-10 16:22:30 -06:00
|
|
|
timeout-minutes: 30
|
2023-11-11 13:52:07 -07:00
|
|
|
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',
|
|
|
|
}
|
2022-07-30 06:35:38 -06:00
|
|
|
steps:
|
2024-01-25 18:33:20 -07:00
|
|
|
- uses: actions/checkout@v4
|
2022-07-30 06:35:38 -06:00
|
|
|
- name: Build
|
2023-11-11 13:52:07 -07:00
|
|
|
uses: cross-platform-actions/action@v0.21.1
|
2022-07-30 06:35:38 -06:00
|
|
|
with:
|
2023-11-11 13:52:07 -07:00
|
|
|
operating_system: ${{ matrix.platform.os }}
|
|
|
|
architecture: ${{ matrix.platform.os-arch }}
|
|
|
|
version: ${{ matrix.platform.os-version }}
|
2023-10-25 16:03:40 -06:00
|
|
|
run: |
|
2023-11-11 13:52:07 -07:00
|
|
|
${{ matrix.platform.setup-cmd }}
|
|
|
|
${{ matrix.platform.install-cmd }}
|
2023-10-25 16:03:40 -06:00
|
|
|
cmake -S . -B build -GNinja \
|
2023-01-23 21:30:24 -07:00
|
|
|
-Wdeprecated -Wdev -Werror \
|
2023-01-28 22:12:40 -07:00
|
|
|
-DCMAKE_BUILD_TYPE=Release \
|
2023-11-11 13:52:07 -07:00
|
|
|
-DSDL_WERROR=ON \
|
|
|
|
${{ matrix.platform.sdl-cmake-configure-arguments }}
|
|
|
|
cmake --build build/ --config Release --verbose
|
2023-01-28 22:12:40 -07:00
|
|
|
cmake --build build/ --config Release --target package
|
2023-11-11 13:52:07 -07:00
|
|
|
|
2023-03-21 18:55:02 -06:00
|
|
|
cmake --build build/ --config Release --target clean
|
2023-06-27 05:59:15 -06:00
|
|
|
rm -rf build/dist/_CPack_Packages
|
|
|
|
rm -rf build/CMakeFiles
|
|
|
|
rm -rf build/docs
|
|
|
|
|
2024-01-25 18:33:20 -07:00
|
|
|
- uses: actions/upload-artifact@v4
|
2023-01-28 22:12:40 -07:00
|
|
|
with:
|
|
|
|
if-no-files-found: error
|
2023-11-11 13:52:07 -07:00
|
|
|
name: ${{ matrix.platform.artifact }}
|
2023-01-28 22:12:40 -07:00
|
|
|
path: build/dist/SDL3*
|