mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-10-02 16:23:57 +08:00
ci: merge all workflows into one
This commit is contained in:
committed by
Anonymous Maarten
parent
3374e57102
commit
da8aa84c1d
@@ -0,0 +1,49 @@
|
||||
name: 'Setup libusb for MSBC'
|
||||
description: 'Greet someone'
|
||||
inputs:
|
||||
version:
|
||||
description: 'LoongArch64 version'
|
||||
default: '2022.09.06'
|
||||
outputs:
|
||||
prefix:
|
||||
description: "LoongArch toolchain prefix"
|
||||
value: ${{ steps.final.outputs.prefix }}
|
||||
cc:
|
||||
description: "LoongArch C compiler"
|
||||
value: ${{ steps.final.outputs.cc }}
|
||||
cxx:
|
||||
description: "LoongArch C++ compiler"
|
||||
value: ${{ steps.final.outputs.cxx }}
|
||||
runs:
|
||||
using: 'composite'
|
||||
steps:
|
||||
- uses: actions/cache/restore@v4
|
||||
id: restore-cache
|
||||
with:
|
||||
path: /opt/cross-tools
|
||||
key: loongarch64-${{ matrix.platform.toolchain-version }}
|
||||
|
||||
- name: 'Download LoongArch64 gcc+glibc toolchain'
|
||||
if: ${{ !steps.restore-cache.outputs.cache-hit }}
|
||||
shell: bash
|
||||
run: |
|
||||
url="https://github.com/loongson/build-tools/releases/download/${{ matrix.platform.toolchain-version }}/loongarch64-clfs-6.3-cross-tools-gcc-glibc.tar.xz"
|
||||
|
||||
wget "$url" -O /tmp/toolchain.tar.xz
|
||||
|
||||
mkdir -p /opt
|
||||
tar -C /opt -x -f /tmp/toolchain.tar.xz
|
||||
|
||||
- uses: actions/cache/save@v4
|
||||
if: ${{ !steps.restore-cache.outputs.cache-hit }}
|
||||
with:
|
||||
path: /opt/cross-tools
|
||||
key: loongarch64-${{ matrix.platform.toolchain-version }}
|
||||
- name: 'Set output vars'
|
||||
id: final
|
||||
shell: bash
|
||||
run: |
|
||||
prefix=/opt/cross-tools
|
||||
echo "prefix=${prefix}" >> $GITHUB_OUTPUT
|
||||
echo "cc=${prefix}/bin/loongarch64-unknown-linux-gnu-gcc" >> $GITHUB_OUTPUT
|
||||
echo "cxx=${prefix}/bin/loongarch64-unknown-linux-gnu-g++" >> $GITHUB_OUTPUT
|
||||
+3
-2
@@ -1,5 +1,5 @@
|
||||
name: 'Setup libusb for MSBC'
|
||||
description: 'Greet someone'
|
||||
name: 'Setup libusb for MSVC'
|
||||
description: 'Setup libusb for MSVC'
|
||||
inputs:
|
||||
version:
|
||||
description: 'libusb version'
|
||||
@@ -68,3 +68,4 @@ runs:
|
||||
exit 1
|
||||
}
|
||||
echo "root=${libusb_incdir};${libusb_libdir}" >> $env:GITHUB_OUTPUT
|
||||
echo "LibUSB_ROOT=${libusb_incdir};${libusb_libdir}" >> $env:GITHUB_ENV
|
||||
@@ -1,147 +0,0 @@
|
||||
name: Build (Android)
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
android:
|
||||
name: ${{ matrix.platform.name }}
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform:
|
||||
- { name: "Android.mk", ndk-build: 1 }
|
||||
- { name: "Gradle", gradle: 1 }
|
||||
- { name: "CMake", cmake: 1, android_abi: "arm64-v8a", android_platform: 23, arch: "aarch64", artifact: "SDL-android-arm64", apk-artifact: "SDL-android-apks-arm64" }
|
||||
- { name: "CMake (lean and mean)", cmake: 1, cppflags: "-DSDL_LEAN_AND_MEAN=1", android_abi: "arm64-v8a", android_platform: 23, arch: "aarch64", artifact: "SDL-lean-android-arm64", apk-artifact: "SDL-lean-android-apks-arm64" }
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: nttld/setup-ndk@v1
|
||||
if: ${{ matrix.platform.cmake || matrix.platform.ndk-build }}
|
||||
id: setup_ndk
|
||||
with:
|
||||
local-cache: true
|
||||
ndk-version: r21e
|
||||
- name: Build (Android.mk)
|
||||
if: ${{ matrix.platform.ndk-build }}
|
||||
run: |
|
||||
./build-scripts/androidbuildlibs.sh
|
||||
- uses: actions/setup-java@v4
|
||||
if: ${{ matrix.platform.cmake || matrix.platform.gradle }}
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: '17'
|
||||
- name: Create Gradle project
|
||||
if: ${{ matrix.platform.gradle }}
|
||||
run: |
|
||||
python build-scripts/create-android-project.py \
|
||||
--output "build" \
|
||||
--variant copy \
|
||||
org.libsdl.testspriteminimal \
|
||||
test/testspriteminimal.c test/icon.h
|
||||
echo ""
|
||||
echo "Project contents:"
|
||||
echo ""
|
||||
find "build/org.libsdl.testspriteminimal"
|
||||
- name: Build app (Gradle & ndk-build)
|
||||
if: ${{ matrix.platform.gradle }}
|
||||
run: |
|
||||
cd build/org.libsdl.testspriteminimal
|
||||
./gradlew -i assembleRelease
|
||||
- name: Build app (Gradle & CMake)
|
||||
if: ${{ matrix.platform.gradle }}
|
||||
run: |
|
||||
cd build/org.libsdl.testspriteminimal
|
||||
./gradlew -i assembleRelease -PBUILD_WITH_CMAKE=1
|
||||
# - name: Build library (Gradle)
|
||||
# if: ${{ matrix.platform.gradle }}
|
||||
# run: |
|
||||
# cd build/org.libsdl.testspriteminimal
|
||||
# ./gradlew -i assembleRelease -PBUILD_AS_LIBRARY=1
|
||||
- name: Setup (CMake)
|
||||
if: ${{ matrix.platform.cmake }}
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install ninja-build pkg-config
|
||||
- name: Configure (CMake)
|
||||
if: ${{ matrix.platform.cmake }}
|
||||
run: |
|
||||
cmake -S . -B build \
|
||||
-DCMAKE_C_FLAGS="${{ matrix.platform.cppflags }}" \
|
||||
-DCMAKE_CXX_FLAGS="${{ matrix.platform.cppflags }}" \
|
||||
-Wdeprecated -Wdev -Werror \
|
||||
-DCMAKE_TOOLCHAIN_FILE=${{ steps.setup_ndk.outputs.ndk-path }}/build/cmake/android.toolchain.cmake \
|
||||
-DSDL_WERROR=ON \
|
||||
-DSDL_TESTS=ON \
|
||||
-DSDL_INSTALL_TESTS=ON \
|
||||
-DSDL_EXAMPLES=ON \
|
||||
-DSDL_CLANG_TIDY=ON \
|
||||
-DSDL_DISABLE_INSTALL_DOCS=OFF \
|
||||
-DANDROID_PLATFORM=${{ matrix.platform.android_platform }} \
|
||||
-DANDROID_ABI=${{ matrix.platform.android_abi }} \
|
||||
-DSDL_SHARED=ON \
|
||||
-DSDL_STATIC=ON \
|
||||
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
|
||||
-DSDL_VENDOR_INFO="Github Workflow" \
|
||||
-DCMAKE_INSTALL_PREFIX=prefix \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-GNinja
|
||||
- name: Build (CMake)
|
||||
if: ${{ matrix.platform.cmake }}
|
||||
run: |
|
||||
cmake --build build --config Release --parallel --verbose
|
||||
- name: Build test apk's (CMake)
|
||||
if: ${{ matrix.platform.cmake }}
|
||||
run: |
|
||||
cmake --build build --config Release --parallel \
|
||||
--target \
|
||||
testaudiorecording-apk \
|
||||
testautomation-apk \
|
||||
testcontroller-apk \
|
||||
testmultiaudio-apk \
|
||||
testsprite-apk \
|
||||
--verbose
|
||||
- name: Install (CMake)
|
||||
if: ${{ matrix.platform.cmake }}
|
||||
run: |
|
||||
cmake --install build --config Release
|
||||
echo "SDL3_DIR=$(pwd)/prefix" >> $GITHUB_ENV
|
||||
( cd prefix; find ) | LC_ALL=C sort -u
|
||||
- name: Package (CPack)
|
||||
if: ${{ matrix.platform.cmake }}
|
||||
run: |
|
||||
cmake --build build/ --config Release --target package
|
||||
- name: Verify CMake configuration files
|
||||
if: ${{ matrix.platform.cmake }}
|
||||
run: |
|
||||
cmake -S cmake/test -B cmake_config_build -G Ninja \
|
||||
-DCMAKE_TOOLCHAIN_FILE=${{ steps.setup_ndk.outputs.ndk-path }}/build/cmake/android.toolchain.cmake \
|
||||
-DANDROID_PLATFORM=${{ matrix.platform.android_platform }} \
|
||||
-DANDROID_ABI=${{ matrix.platform.android_abi }} \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_PREFIX_PATH=${{ env.SDL3_DIR }}
|
||||
cmake --build cmake_config_build --verbose
|
||||
- name: Verify sdl3.pc
|
||||
if: ${{ matrix.platform.cmake }}
|
||||
run: |
|
||||
export CC="${{ steps.setup_ndk.outputs.ndk-path }}/toolchains/llvm/prebuilt/linux-x86_64/bin/clang --target=${{ matrix.platform.arch }}-none-linux-androideabi${{ matrix.platform.android_platform }}"
|
||||
export PKG_CONFIG_PATH=${{ env.SDL3_DIR }}/lib/pkgconfig
|
||||
cmake/test/test_pkgconfig.sh
|
||||
- uses: actions/upload-artifact@v4
|
||||
if: ${{ matrix.platform.cmake }}
|
||||
with:
|
||||
if-no-files-found: error
|
||||
name: ${{ matrix.platform.artifact }}
|
||||
path: build/dist/SDL3*
|
||||
- uses: actions/upload-artifact@v4
|
||||
if: ${{ matrix.platform.cmake }}
|
||||
with:
|
||||
if-no-files-found: error
|
||||
name: ${{ matrix.platform.apk-artifact }}
|
||||
path: build/test/*.apk
|
||||
@@ -0,0 +1,33 @@
|
||||
name: 'Build (All)'
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
controller:
|
||||
name: 'Create test plan'
|
||||
runs-on: 'ubuntu-latest'
|
||||
outputs:
|
||||
platforms: ${{ steps.plan.outputs.platforms }}
|
||||
steps:
|
||||
- uses: actions/setup-python@main
|
||||
with:
|
||||
python-version: 3.x
|
||||
- uses: actions/checkout@main
|
||||
with:
|
||||
sparse-checkout: '.github/workflows/create-test-plan.py'
|
||||
- name: 'Create plan'
|
||||
id: plan
|
||||
run: |
|
||||
python .github/workflows/create-test-plan.py \
|
||||
--github-variable platforms \
|
||||
--github-ci \
|
||||
--verbose
|
||||
level1:
|
||||
needs: [controller]
|
||||
uses: './.github/workflows/generic.yml'
|
||||
with:
|
||||
platforms: ${{ needs.controller.outputs.platforms }}
|
||||
@@ -1,57 +0,0 @@
|
||||
name: Build (C/P Actions)
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
freebsd:
|
||||
runs-on: ubuntu-latest
|
||||
name: '${{ matrix.platform.name }} ${{ matrix.platform.os-version }}'
|
||||
timeout-minutes: 30
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform:
|
||||
- { name: FreeBSD, os: freebsd, os-version: '13.3', 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: '10.0', 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@v4
|
||||
- name: Build
|
||||
uses: cross-platform-actions/action@v0.25.0
|
||||
with:
|
||||
operating_system: ${{ matrix.platform.os }}
|
||||
architecture: ${{ matrix.platform.os-arch }}
|
||||
version: ${{ matrix.platform.os-version }}
|
||||
run: |
|
||||
${{ matrix.platform.setup-cmd }}
|
||||
${{ matrix.platform.install-cmd }}
|
||||
cmake -S . -B build -GNinja \
|
||||
-Wdeprecated -Wdev -Werror \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DSDL_WERROR=ON \
|
||||
-DSDL_DISABLE_INSTALL_DOCS=OFF \
|
||||
${{ 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
|
||||
rm -rf build/docs
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
if-no-files-found: error
|
||||
name: ${{ matrix.platform.artifact }}
|
||||
path: build/dist/SDL3*
|
||||
Executable
+614
File diff suppressed because it is too large
Load Diff
@@ -1,60 +0,0 @@
|
||||
name: Build (Emscripten)
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
emscripten:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: mymindstorm/setup-emsdk@v14
|
||||
with:
|
||||
version: 3.1.35
|
||||
- name: Install ninja
|
||||
run: |
|
||||
sudo apt-get -y update
|
||||
sudo apt-get install -y ninja-build
|
||||
- name: Configure (CMake)
|
||||
run: |
|
||||
emcmake cmake -S . -B build \
|
||||
-Wdeprecated -Wdev -Werror \
|
||||
-DSDL_WERROR=ON \
|
||||
-DSDL_TESTS=ON \
|
||||
-DSDL_INSTALL_TESTS=ON \
|
||||
-DSDL_EXAMPLES=ON \
|
||||
-DCMAKE_BUILD_TYPE=Debug \
|
||||
-DCMAKE_INSTALL_PREFIX=prefix \
|
||||
-GNinja
|
||||
- name: Build (CMake)
|
||||
run: cmake --build build/ --verbose
|
||||
- name: Run build-time tests
|
||||
run: |
|
||||
set -eu
|
||||
export SDL_TESTS_QUICK=1
|
||||
# FIXME: enable Emscripten build time tests
|
||||
# ctest -VV --test-dir build/
|
||||
- name: Install (CMake)
|
||||
run: |
|
||||
echo "SDL3_DIR=$(pwd)/prefix" >> $GITHUB_ENV
|
||||
cmake --install build/
|
||||
- name: Package (CPack)
|
||||
run: |
|
||||
cmake --build build/ --config Debug --target package
|
||||
- name: Verify CMake configuration files
|
||||
run: |
|
||||
emcmake cmake -S cmake/test -B cmake_config_build \
|
||||
-DCMAKE_BUILD_TYPE=Debug \
|
||||
-DSDL_VENDOR_INFO="Github Workflow" \
|
||||
-DTEST_SHARED=FALSE \
|
||||
-DSDL_DISABLE_INSTALL_DOCS=OFF \
|
||||
-DCMAKE_PREFIX_PATH=${{ env.SDL3_DIR }}
|
||||
cmake --build cmake_config_build --verbose
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
if-no-files-found: error
|
||||
name: SDL-emscripten
|
||||
path: build/dist/SDL3*
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,59 +0,0 @@
|
||||
name: Build (Haiku)
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
haiku:
|
||||
runs-on: ubuntu-latest
|
||||
name: Haiku
|
||||
container: haiku/cross-compiler:x86_64-r1beta4
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Setup dependencies
|
||||
run: |
|
||||
apt-get install pkg-config -y
|
||||
- name: Configure Haiku environment variables
|
||||
run: |
|
||||
echo "CC=x86_64-unknown-haiku-gcc" >> $GITHUB_ENV
|
||||
echo "CXX=x86_64-unknown-haiku-g++" >> $GITHUB_ENV
|
||||
- name: Configure (CMake)
|
||||
run: |
|
||||
cmake -S . -B build -GNinja \
|
||||
-Wdeprecated -Wdev -Werror \
|
||||
-DSDL_SHARED=ON \
|
||||
-DSDL_STATIC=ON \
|
||||
-DSDL_WERROR=ON \
|
||||
-DSDL_TESTS=ON \
|
||||
-DSDL_INSTALL_TESTS=ON \
|
||||
-DSDL_EXAMPLES=ON \
|
||||
-DSDL_VENDOR_INFO=Github_Workflow \
|
||||
-DCMAKE_INSTALL_PREFIX=cmake_prefix \
|
||||
-DSDL_DISABLE_INSTALL_DOCS=OFF \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_SYSTEM_NAME=Haiku
|
||||
- name: Build (CMake)
|
||||
run: |
|
||||
cmake --build build/ --config Release --verbose --parallel
|
||||
- name: Install (CMake)
|
||||
run: |
|
||||
echo "SDL3_DIR=$(pwd)/cmake_prefix" >> $GITHUB_ENV
|
||||
cmake --install build/ --config Release
|
||||
- name: Package (CPack)
|
||||
run: |
|
||||
cmake --build build/ --config Release --target package
|
||||
- name: Verify CMake configuration files
|
||||
run: |
|
||||
cmake -S cmake/test -B cmake_config_build -G Ninja \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_PREFIX_PATH=${{ env.SDL3_DIR }} \
|
||||
-DCMAKE_SYSTEM_NAME=Haiku
|
||||
cmake --build ./cmake_config_build --verbose
|
||||
- name: Verify sdl3.pc
|
||||
run: |
|
||||
export PKG_CONFIG_PATH=${{ env.SDL3_DIR }}/lib/pkgconfig
|
||||
cmake/test/test_pkgconfig.sh
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
if-no-files-found: error
|
||||
name: SDL-haiku
|
||||
path: build/dist/SDL3*
|
||||
@@ -1,24 +0,0 @@
|
||||
name: Build (iOS/tvOS)
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
Build:
|
||||
name: ${{ matrix.platform.name }}
|
||||
runs-on: macos-latest
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform:
|
||||
- { name: iOS, target: SDL3, sdk: iphoneos }
|
||||
- { name: tvOS, target: SDL3, sdk: appletvos }
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Build
|
||||
run: xcodebuild -project Xcode/SDL/SDL.xcodeproj -target '${{ matrix.platform.target }}' -configuration Release -sdk ${{ matrix.platform.sdk }} clean build
|
||||
@@ -1,93 +0,0 @@
|
||||
name: Build (LoongArch64)
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
loongarch64:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform:
|
||||
- { toolchain-version: 2022.09.06 }
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install build requirements
|
||||
run: |
|
||||
sudo apt-get update -y
|
||||
sudo apt-get install -y --no-install-recommends cmake ninja-build pkg-config tar wget
|
||||
|
||||
- uses: actions/cache/restore@v4
|
||||
id: restore-cache
|
||||
with:
|
||||
path: /opt/cross-tools
|
||||
key: loongarch64-${{ matrix.platform.toolchain-version }}
|
||||
|
||||
- name: Download LoongArch64 gcc+glibc toolchain
|
||||
if: ${{ !steps.restore-cache.outputs.cache-hit }}
|
||||
run: |
|
||||
url="https://github.com/loongson/build-tools/releases/download/${{ matrix.platform.toolchain-version }}/loongarch64-clfs-6.3-cross-tools-gcc-glibc.tar.xz"
|
||||
|
||||
wget "$url" -O /tmp/toolchain.tar.xz
|
||||
|
||||
mkdir -p /opt
|
||||
tar -C /opt -x -f /tmp/toolchain.tar.xz
|
||||
|
||||
- uses: actions/cache/save@v3
|
||||
if: ${{ !steps.restore-cache.outputs.cache-hit }}
|
||||
with:
|
||||
path: /opt/cross-tools
|
||||
key: loongarch64-${{ matrix.platform.toolchain-version }}
|
||||
|
||||
- name: Set-up Loongarch64 build environment
|
||||
run: |
|
||||
echo "/opt/cross-tools/bin" >> $GITHUB_PATH
|
||||
echo "CC=loongarch64-unknown-linux-gnu-gcc" >> $GITHUB_ENV
|
||||
echo "CXX=loongarch64-unknown-linux-gnu-g++" >> $GITHUB_ENV
|
||||
|
||||
- name: Configure (CMake)
|
||||
run: |
|
||||
cmake -S . -B build -G Ninja \
|
||||
-Wdeprecated -Wdev -Werror \
|
||||
-DSDL_SHARED=ON \
|
||||
-DSDL_STATIC=ON \
|
||||
-DSDL_WERROR=ON \
|
||||
-DSDL_TESTS=ON \
|
||||
-DSDL_INSTALL_TESTS=ON \
|
||||
-DSDL_EXAMPLES=ON \
|
||||
-DSDL_DISABLE_INSTALL_DOCS=OFF \
|
||||
-DSDL_VENDOR_INFO="Github Workflow" \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=prefix
|
||||
- name: Build (CMake)
|
||||
run: |
|
||||
cmake --build build --verbose
|
||||
- name: Install (CMake)
|
||||
run: |
|
||||
echo "SDL3_DIR=$(pwd)/prefix" >> $GITHUB_ENV
|
||||
cmake --install build/
|
||||
( cd prefix; find ) | LC_ALL=C sort -u
|
||||
- name: Package (CPack)
|
||||
run: |
|
||||
cmake --build build/ --config Release --target package
|
||||
- name: Verify CMake configuration files
|
||||
run: |
|
||||
cmake -S cmake/test -B cmake_config_build -G Ninja \
|
||||
-DTEST_SHARED=TRUE \
|
||||
-DTEST_STATIC=TRUE \
|
||||
-DCMAKE_PREFIX_PATH=${{ env.SDL3_DIR }} \
|
||||
-DCMAKE_BUILD_TYPE=Release
|
||||
cmake --build cmake_config_build --verbose
|
||||
- name: Verify sdl3.pc
|
||||
run: |
|
||||
export PKG_CONFIG_PATH=${{ env.SDL3_DIR }}/lib/pkgconfig
|
||||
cmake/test/test_pkgconfig.sh
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
if-no-files-found: error
|
||||
name: SDL-loongarch64
|
||||
path: build/dist/SDL3*
|
||||
@@ -1,188 +0,0 @@
|
||||
name: Build
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
Build:
|
||||
name: ${{ matrix.platform.name }}
|
||||
runs-on: ${{ matrix.platform.os }}
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: ${{ matrix.platform.shell }}
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform:
|
||||
- { name: Windows (mingw32), os: windows-latest, shell: 'msys2 {0}', msystem: mingw32, msys-env: mingw-w64-i686, cmake: '-DSDLTEST_PROCDUMP=ON', artifact: 'SDL-mingw32', no-perl: true }
|
||||
- { name: Windows (mingw64), os: windows-latest, shell: 'msys2 {0}', msystem: mingw64, msys-env: mingw-w64-x86_64, cmake: '-DSDLTEST_PROCDUMP=ON', artifact: 'SDL-mingw64' }
|
||||
- { name: Windows (clang32), os: windows-latest, shell: 'msys2 {0}', msystem: clang32, msys-env: mingw-w64-clang-i686, cmake: '-DSDLTEST_PROCDUMP=ON', artifact: 'SDL-msys2-clang32', no-perl: true }
|
||||
- { name: Windows (clang64), os: windows-latest, shell: 'msys2 {0}', msystem: clang64, msys-env: mingw-w64-clang-x86_64, cmake: '-DSDLTEST_PROCDUMP=ON', artifact: 'SDL-msys2-clang64' }
|
||||
- { name: Windows (ucrt64), os: windows-latest, shell: 'msys2 {0}', msystem: ucrt64, msys-env: mingw-w64-ucrt-x86_64, cmake: '-DSDLTEST_PROCDUMP=ON', artifact: 'SDL-msys2-ucrt64' }
|
||||
- { name: Ubuntu 20.04, os: ubuntu-20.04, shell: sh, artifact: 'SDL-ubuntu20.04' }
|
||||
- { name: Intel oneAPI (Ubuntu 20.04), os: ubuntu-20.04, shell: bash, artifact: 'SDL-ubuntu20.04-oneapi', intel: true,
|
||||
source_cmd: 'source /opt/intel/oneapi/setvars.sh; export CC=icx; export CXX=icx;'}
|
||||
- { name: Intel Compiler (Ubuntu 20.04), os: ubuntu-20.04, shell: bash, artifact: 'SDL-ubuntu20.04-icc', intel: true, cmake: '-DSDL_CLANG_TIDY=OFF',
|
||||
source_cmd: 'source /opt/intel/oneapi/setvars.sh; export CC=icc; export CXX=icpc; export CFLAGS=-diag-disable=10441; export CXXFLAGS=-diag-disable=10441; '}
|
||||
- { name: Ubuntu 22.04, os: ubuntu-22.04, shell: sh, artifact: 'SDL-ubuntu22.04' }
|
||||
- { name: MacOS (Framework) (x86_64), os: macos-12, shell: sh, cmake-platform: '-DCMAKE_OSX_ARCHITECTURES="x86_64;arm64"', cmake: '-DSDL_FRAMEWORK=ON -DSDL_CLANG_TIDY=OFF', skip_test_pkgconfig: true, artifact: 'SDL-macos-framework', no-static: true }
|
||||
- { name: MacOS (Framework) (arm64), os: macos-latest, shell: sh, cmake-platform: '-DCMAKE_OSX_ARCHITECTURES="x86_64;arm64"', cmake: '-DSDL_FRAMEWORK=ON -DSDL_CLANG_TIDY=OFF', skip_test_pkgconfig: true, no-static: true }
|
||||
- { name: MacOS (GNU prefix), os: macos-latest, shell: sh, cmake-platform: '-DCMAKE_OSX_ARCHITECTURES="arm64"', cmake: '-DCLANG_TIDY_BINARY="$(brew --prefix llvm)/bin/clang-tidy"', artifact: 'SDL-macos-arm64-gnu' }
|
||||
- { name: iOS (GNU prefix), os: macos-latest, shell: sh, cmake-platform: '-DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64"', cross-build: true, skip_test_pkgconfig: true, artifact: 'SDL-ios-gnu' }
|
||||
- { name: tvOS (GNU prefix), os: macos-latest, shell: sh, cmake-platform: '-DCMAKE_SYSTEM_NAME=tvOS -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64"', cross-build: true, skip_test_pkgconfig: true, artifact: 'SDL-tvos-gnu' }
|
||||
|
||||
steps:
|
||||
- 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 }}-cc
|
||||
${{ matrix.platform.msys-env }}-cmake
|
||||
${{ matrix.platform.msys-env }}-ninja
|
||||
${{ (!matrix.platform.no-perl && format('{0}-perl', matrix.platform.msys-env)) || '' }}
|
||||
${{ matrix.platform.msys-env }}-pkg-config
|
||||
${{ matrix.platform.msys-env }}-clang-tools-extra
|
||||
|
||||
- name: Setup Linux dependencies
|
||||
if: runner.os == 'Linux'
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install build-essential git \
|
||||
pkg-config cmake ninja-build gnome-desktop-testing libasound2-dev libpulse-dev \
|
||||
libaudio-dev libjack-dev libsndio-dev libusb-1.0-0-dev libx11-dev libxext-dev \
|
||||
libxrandr-dev libxcursor-dev libxfixes-dev libxi-dev libxss-dev libwayland-dev \
|
||||
libxkbcommon-dev libdrm-dev libgbm-dev libgl1-mesa-dev libgles2-mesa-dev \
|
||||
libegl1-mesa-dev libdbus-1-dev libibus-1.0-dev libudev-dev fcitx-libs-dev
|
||||
|
||||
- name: Setup extra Ubuntu 22.04 dependencies
|
||||
if: matrix.platform.os == 'ubuntu-22.04'
|
||||
run: |
|
||||
sudo apt-get install libpipewire-0.3-dev libdecor-0-dev
|
||||
|
||||
- name: Setup Macos dependencies
|
||||
if: runner.os == 'macOS'
|
||||
run: |
|
||||
export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1
|
||||
brew update
|
||||
brew install \
|
||||
ninja \
|
||||
pkg-config \
|
||||
llvm
|
||||
|
||||
- name: Setup Intel oneAPI
|
||||
if: matrix.platform.intel
|
||||
run: |
|
||||
# Download the key to system keyring
|
||||
wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB \
|
||||
| gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null
|
||||
|
||||
# Add signed entry to apt sources and configure the APT client to use Intel repository:
|
||||
echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
|
||||
|
||||
# Update package list
|
||||
sudo apt-get update -y
|
||||
|
||||
# Install oneAPI
|
||||
sudo apt-get install -y intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
- name: Check that versioning is consistent
|
||||
# We only need to run this once: arbitrarily use the Linux/CMake build
|
||||
if: "runner.os == 'Linux'"
|
||||
run: ./build-scripts/test-versioning.sh
|
||||
- name: Configure (CMake)
|
||||
run: |
|
||||
${{ matrix.platform.source_cmd }}
|
||||
cmake -S . -B build -G Ninja \
|
||||
-Wdeprecated -Wdev -Werror \
|
||||
-DSDL_SHARED=ON \
|
||||
-DSDL_STATIC=ON \
|
||||
-DSDL_TESTS=ON \
|
||||
-DSDL_INSTALL_TESTS=ON \
|
||||
-DSDL_WERROR=ON \
|
||||
-DSDL_EXAMPLES=ON \
|
||||
-DSDL_VENDOR_INFO="Github Workflow" \
|
||||
-DSDL_CLANG_TIDY=ON \
|
||||
-DSDL_DISABLE_INSTALL_DOCS=${{ !matrix.platform.no-perl }} \
|
||||
-DCMAKE_INSTALL_PREFIX=cmake_prefix \
|
||||
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
${{ matrix.platform.cmake-platform }} \
|
||||
${{ matrix.platform.cmake }}
|
||||
- name: Build (CMake)
|
||||
id: build
|
||||
run: |
|
||||
${{ matrix.platform.source_cmd }}
|
||||
cmake --build build/ --config Release --verbose --parallel
|
||||
- name: Run build-time tests (CMake)
|
||||
id: tests
|
||||
if: ${{ !matrix.platform.cross-build }}
|
||||
run: |
|
||||
${{ matrix.platform.source_cmd }}
|
||||
set -eu
|
||||
export SDL_TESTS_QUICK=1
|
||||
ctest -VV --test-dir build/ -j2
|
||||
if test "${{ runner.os }}" = "Linux"; then
|
||||
# This should show us the SDL_REVISION
|
||||
strings build/libSDL3.so.0 | grep SDL-
|
||||
fi
|
||||
- name: Install (CMake)
|
||||
run: |
|
||||
${{ matrix.platform.source_cmd }}
|
||||
set -eu
|
||||
cmake --install build/ --config Release
|
||||
( cd cmake_prefix; find . ) | LC_ALL=C sort -u
|
||||
- name: Package (CPack)
|
||||
if: ${{ always() && steps.build.outcome == 'success' }}
|
||||
run: |
|
||||
# DMG creation on macOS occasionally fails, so try multiple times
|
||||
# https://gitlab.kitware.com/cmake/cmake/-/issues/25671
|
||||
success=0
|
||||
max_tries=10
|
||||
for i in $(seq $max_tries); do
|
||||
cmake --build build/ --config Release --target package && success=1
|
||||
if test $success = 1; then
|
||||
break
|
||||
fi
|
||||
echo "Package creation failed. Sleep 1 second and try again."
|
||||
sleep 1
|
||||
done
|
||||
if test $success = 0; then
|
||||
echo "Package creation failed after $max_tries attempts."
|
||||
exit 1
|
||||
fi
|
||||
- name: Verify CMake configuration files
|
||||
run: |
|
||||
${{ matrix.platform.source_cmd }}
|
||||
cmake -S cmake/test -B cmake_config_build -G Ninja \
|
||||
${{ matrix.platform.cmake-platform }} \
|
||||
-DTEST_SHARED=ON \
|
||||
-DTEST_STATIC=${{ !matrix.platform.no-static }} \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_PREFIX_PATH=$(echo "${{ github.workspace }}/cmake_prefix" | sed -e 's#\\#/#g')
|
||||
cmake --build cmake_config_build --verbose
|
||||
- name: Verify sdl3.pc
|
||||
if: ${{ !matrix.platform.skip_test_pkgconfig }}
|
||||
run: |
|
||||
${{ matrix.platform.source_cmd }}
|
||||
export PKG_CONFIG_PATH=$(echo "${{ github.workspace }}/cmake_prefix/lib/pkgconfig" | sed -e 's#\\#/#g')
|
||||
cmake/test/test_pkgconfig.sh
|
||||
- uses: actions/upload-artifact@v4
|
||||
if: ${{ always() && steps.tests.outcome == 'failure' }}
|
||||
with:
|
||||
if-no-files-found: ignore
|
||||
name: '${{ matrix.platform.artifact }}-minidumps'
|
||||
path: build/**/*.dmp
|
||||
- uses: actions/upload-artifact@v4
|
||||
if: ${{ always() && matrix.platform.artifact != '' && steps.build.outcome == 'success' }}
|
||||
with:
|
||||
if-no-files-found: error
|
||||
name: ${{ matrix.platform.artifact }}
|
||||
path: build/dist/SDL3*
|
||||
@@ -1,142 +0,0 @@
|
||||
name: Build (MSVC)
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
Build:
|
||||
name: ${{ matrix.platform.name }}
|
||||
runs-on: windows-latest
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform:
|
||||
- { name: 'Windows (x64)', vcvars: 'x64', artifact: 'SDL-VC-x64', project: 'VisualC/SDL.sln', projectflags: '/p:Platform=x64', }
|
||||
- { name: 'Windows (x86)', vcvars: 'x64_x86', artifact: 'SDL-VC-x86', project: 'VisualC/SDL.sln', projectflags: '/p:Platform=Win32', }
|
||||
- { name: 'Windows (clang-cl x64)', vcvars: 'x64', artifact: 'SDL-clang-cl-x64', cmake-args: '-DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl', cppflags: '/clang:-m64', ldflags: '/MACHINE:X64', }
|
||||
- { name: 'Windows (clang-cl x86)', vcvars: 'x86', artifact: 'SDL-clang-cl-x86', cmake-args: '-DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl', cppflags: '/clang:-m32', ldflags: '/MACHINE:X86', }
|
||||
- { name: 'Windows (ARM)', vcvars: 'x64_arm', artifact: 'SDL-VC-arm32', notests: true, }
|
||||
- { name: 'Windows (ARM64)', vcvars: 'x64_arm64', artifact: 'SDL-VC-arm64', notests: true, }
|
||||
- { name: 'UWP (x64)', vcvars: 'x64', artifact: 'SDL-VC-UWP', notests: true, cmake-args: '-DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION="10.0" -DSDL_TESTS=OFF',
|
||||
project: 'VisualC-WinRT/SDL-UWP.sln', projectflags: '/p:Platform=x64 /p:WindowsTargetPlatformVersion=10.0.17763.0', }
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up ninja
|
||||
uses: ./.github/actions/setup-ninja
|
||||
- uses: ilammy/msvc-dev-cmd@v1
|
||||
with:
|
||||
arch: ${{ matrix.platform.vcvars }}
|
||||
- name: Set up libusb
|
||||
uses: ./.github/actions/setup-msvc-libusb-action
|
||||
if: ${{ matrix.platform.libusb-arch != '' }}
|
||||
id: libusb
|
||||
with:
|
||||
arch: ${{ matrix.platform.libusb-arch }}
|
||||
- name: Create CMake project using SDL as a subproject
|
||||
shell: python
|
||||
run: |
|
||||
import os
|
||||
import textwrap
|
||||
srcdir = r"${{ github.workspace }}".replace("\\", "/")
|
||||
builddir = f"{ srcdir }/build"
|
||||
os.makedirs(builddir)
|
||||
cmakelists_txt = textwrap.dedent(f"""\
|
||||
# MSVC runtime library flags are selected by an abstraction
|
||||
set(CMAKE_POLICY_DEFAULT_CMP0091 "NEW" CACHE STRING "MSVC runtime library flags are selected by an abstraction")
|
||||
# MSVC debug information format flags are selected by an abstraction
|
||||
set(CMAKE_POLICY_DEFAULT_CMP0141 "NEW" CACHE STRING "MSVC debug information format flags are selected by an abstraction")
|
||||
cmake_minimum_required(VERSION 3.0...3.25)
|
||||
project(sdl_user)
|
||||
# Always build .PDB symbol file
|
||||
set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "ProgramDatabase" CACHE STRING "MSVC debug information format" FORCE)
|
||||
set(CMAKE_EXE_LINKER_FLAGS "-DEBUG" CACHE STRING "Linker flags for executables" FORCE)
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "-DEBUG" CACHE STRING "Linker flag for shared libraries" FORCE)
|
||||
if(WINDOWS_STORE) # WINDOWS_STORE is available AFTER project()
|
||||
# UWP only supports dynamic runtime
|
||||
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL" CACHE STRING "MSVC runtime libary" FORCE)
|
||||
else()
|
||||
# Use static runtime library
|
||||
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>" CACHE STRING "MSVC runtime libary" FORCE)
|
||||
endif()
|
||||
enable_testing()
|
||||
add_subdirectory("{ srcdir }" SDL)
|
||||
""")
|
||||
print(cmakelists_txt)
|
||||
with open(f"{ builddir }/CMakeLists.txt", "w") as f:
|
||||
f.write(cmakelists_txt)
|
||||
- name: Configure (CMake)
|
||||
run: cmake -S build -B build -GNinja `
|
||||
-Wdeprecated -Wdev -Werror `
|
||||
-DCMAKE_BUILD_TYPE=Release `
|
||||
-DSDL_WERROR=ON `
|
||||
-DSDL_SHARED=ON `
|
||||
-DSDL_STATIC=ON `
|
||||
-DSDL_TESTS=ON `
|
||||
-DSDL_EXAMPLES=ON \
|
||||
-DCMAKE_C_FLAGS="${{ matrix.platform.cppflags }}" `
|
||||
-DCMAKE_CXX_FLAGS="${{ matrix.platform.cppflags }}" `
|
||||
-DCMAKE_EXE_LINKER_FLAGS="${{ matrix.platform.ldflags }}" `
|
||||
-DCMAKE_SHARED_LINKER_FLAGS="${{ matrix.platform.ldflags }}" `
|
||||
-DCMAKE_STATIC_LINKER_FLAGS="${{ matrix.platform.ldflags }}" `
|
||||
-DSDL_INSTALL_TESTS=ON `
|
||||
-DSDL_VENDOR_INFO="Github Workflow" `
|
||||
-DSDL_DISABLE_INSTALL=OFF `
|
||||
-DSDL_DISABLE_INSTALL_CPACK=OFF `
|
||||
-DSDL_DISABLE_INSTALL_DOCS=OFF `
|
||||
-DSDLTEST_PROCDUMP=ON `
|
||||
-DLibUSB_ROOT="${{ steps.libusb.outputs.root }}" `
|
||||
${{ matrix.platform.cmake-args }} `
|
||||
-DCMAKE_INSTALL_PREFIX=prefix
|
||||
- name: Build (CMake)
|
||||
id: build
|
||||
run: |
|
||||
cmake --build build/ --config Release --verbose --parallel
|
||||
- name: Run build-time tests
|
||||
id: tests
|
||||
if: ${{ !matrix.platform.notests }}
|
||||
run: |
|
||||
$env:SDL_TESTS_QUICK=1
|
||||
ctest -VV --test-dir build/ -C Release -j2
|
||||
- name: Install (CMake)
|
||||
run: |
|
||||
echo "SDL3_DIR=$Env:GITHUB_WORKSPACE/prefix" >> $Env:GITHUB_ENV
|
||||
cmake --install build/
|
||||
- name: Package (CPack)
|
||||
if: ${{ always() && steps.build.outcome == 'success' }}
|
||||
run: |
|
||||
cmake --build build/ --config Release --target package
|
||||
- name: Verify CMake configuration files
|
||||
run: |
|
||||
cmake -S cmake/test -B cmake_config_build -GNinja `
|
||||
-DCMAKE_BUILD_TYPE=Release `
|
||||
-DCMAKE_PREFIX_PATH=${{ env.SDL3_DIR }} `
|
||||
-DCMAKE_C_FLAGS="${{ matrix.platform.cppflags }}" `
|
||||
-DCMAKE_CXX_FLAGS="${{ matrix.platform.cppflags }}" `
|
||||
-DCMAKE_EXE_LINKER_FLAGS="${{ matrix.platform.ldflags }}" `
|
||||
-DCMAKE_SHARED_LINKER_FLAGS="${{ matrix.platform.ldflags }}" `
|
||||
-DCMAKE_STATIC_LINKER_FLAGS="${{ matrix.platform.ldflags }}" `
|
||||
${{ matrix.platform.cmake-args }}
|
||||
cmake --build cmake_config_build --config Release
|
||||
- name: Add msbuild to PATH
|
||||
if: ${{ matrix.platform.project != '' }}
|
||||
uses: microsoft/setup-msbuild@v2
|
||||
- name: Build msbuild
|
||||
if: ${{ matrix.platform.project != '' }}
|
||||
run: msbuild ${{ matrix.platform.project }} /m /p:BuildInParallel=true /p:Configuration=Release ${{ matrix.platform.projectflags }}
|
||||
- uses: actions/upload-artifact@v4
|
||||
if: ${{ always() && steps.tests.outcome == 'failure' }}
|
||||
with:
|
||||
if-no-files-found: ignore
|
||||
name: '${{ matrix.platform.artifact }}-minidumps'
|
||||
path: build/**/*.dmp
|
||||
- uses: actions/upload-artifact@v4
|
||||
if: ${{ always() && steps.build.outcome == 'success' }}
|
||||
with:
|
||||
if-no-files-found: error
|
||||
name: ${{ matrix.platform.artifact }}
|
||||
path: build/dist/SDL3*
|
||||
@@ -1,67 +0,0 @@
|
||||
name: Build (Nintendo 3DS)
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
n3ds:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: devkitpro/devkitarm:latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install build requirements
|
||||
run: |
|
||||
apt update
|
||||
apt install ninja-build
|
||||
- name: Configure (CMake)
|
||||
run: |
|
||||
cmake -S . -B build -G Ninja \
|
||||
-Wdeprecated -Wdev -Werror \
|
||||
-DCMAKE_TOOLCHAIN_FILE=${DEVKITPRO}/cmake/3DS.cmake \
|
||||
-DSDL_WERROR=ON \
|
||||
-DSDL_TESTS=ON \
|
||||
-DSDL_INSTALL_TESTS=ON \
|
||||
-DSDL_EXAMPLES=ON \
|
||||
-DSDL_DISABLE_INSTALL_DOCS=OFF \
|
||||
-DSDL_VENDOR_INFO="Github Workflow" \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=prefix
|
||||
- name: Build (CMake)
|
||||
run: |
|
||||
cmake --build build --verbose
|
||||
- name: Install (CMake)
|
||||
run: |
|
||||
echo "SDL3_DIR=$(pwd)/prefix" >> $GITHUB_ENV
|
||||
cmake --install build/
|
||||
( cd prefix; find ) | LC_ALL=C sort -u
|
||||
- name: Package (CPack)
|
||||
run: |
|
||||
cmake --build build/ --config Release --target package
|
||||
- name: Verify CMake configuration files
|
||||
run: |
|
||||
cmake -S cmake/test -B cmake_config_build -G Ninja \
|
||||
-DCMAKE_TOOLCHAIN_FILE=${DEVKITPRO}/cmake/3DS.cmake \
|
||||
-DTEST_SHARED=FALSE \
|
||||
-DCMAKE_PREFIX_PATH=${{ env.SDL3_DIR }} \
|
||||
-DCMAKE_BUILD_TYPE=Release
|
||||
cmake --build cmake_config_build --verbose
|
||||
- name: Extract CC/CXX/CFLAGS/CXXFLAGS from CMake toolchain
|
||||
run: |
|
||||
cmake -S .github/cmake -B /tmp/cmake_extract \
|
||||
-DCMAKE_TOOLCHAIN_FILE=${DEVKITPRO}/cmake/3DS.cmake \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DVAR_PATH=/tmp/n3ds_env.txt
|
||||
cat /tmp/n3ds_env.txt >> $GITHUB_ENV
|
||||
- name: Verify sdl3.pc
|
||||
run: |
|
||||
export PKG_CONFIG_PATH=${{ env.SDL3_DIR }}/lib/pkgconfig
|
||||
cmake/test/test_pkgconfig.sh
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
if-no-files-found: error
|
||||
name: SDL-n3ds
|
||||
path: build/dist/SDL3*
|
||||
@@ -1,62 +0,0 @@
|
||||
name: Build (PowerPC64)
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
ppc64le:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: dockcross/linux-ppc64le:latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install build requirements
|
||||
run: |
|
||||
apt-get update -y
|
||||
apt-get install -y cmake ninja-build
|
||||
- name: Configure (CMake)
|
||||
run: |
|
||||
# FIXME: Enable SDL_WERROR
|
||||
cmake -S . -B build -G Ninja \
|
||||
-Wdeprecated -Wdev -Werror \
|
||||
-DSDL_SHARED=ON \
|
||||
-DSDL_STATIC=ON \
|
||||
-DSDL_WERROR=OFF \
|
||||
-DSDL_TESTS=ON \
|
||||
-DSDL_INSTALL_TESTS=ON \
|
||||
-DSDL_EXAMPLES=ON \
|
||||
-DSDL_DISABLE_INSTALL_DOCS=OFF \
|
||||
-DSDL_VENDOR_INFO="Github Workflow" \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=prefix
|
||||
- name: Build (CMake)
|
||||
run: |
|
||||
cmake --build build --verbose
|
||||
- name: Install (CMake)
|
||||
run: |
|
||||
echo "SDL3_DIR=$(pwd)/prefix" >> $GITHUB_ENV
|
||||
cmake --install build/
|
||||
( cd prefix; find ) | LC_ALL=C sort -u
|
||||
- name: Package (CPack)
|
||||
run: |
|
||||
cmake --build build/ --config Release --target package
|
||||
- name: Verify CMake configuration files
|
||||
run: |
|
||||
cmake -S cmake/test -B cmake_config_build -G Ninja \
|
||||
-DTEST_SHARED=TRUE \
|
||||
-DTEST_STATIC=TRUE \
|
||||
-DCMAKE_PREFIX_PATH=${{ env.SDL3_DIR }} \
|
||||
-DCMAKE_BUILD_TYPE=Release
|
||||
cmake --build cmake_config_build --verbose
|
||||
- name: Verify sdl3.pc
|
||||
run: |
|
||||
export PKG_CONFIG_PATH=${{ env.SDL3_DIR }}/lib/pkgconfig
|
||||
cmake/test/test_pkgconfig.sh
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
if-no-files-found: error
|
||||
name: SDL-ppc64le
|
||||
path: build/dist/SDL3*
|
||||
@@ -1,62 +0,0 @@
|
||||
name: Build (Sony Playstation 2)
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
ps2:
|
||||
runs-on: ubuntu-latest
|
||||
container: ps2dev/ps2dev:latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Setup dependencies
|
||||
run: |
|
||||
apk update
|
||||
apk add cmake gmp mpc1 mpfr4 ninja pkgconf make git
|
||||
|
||||
- name: Configure (CMake)
|
||||
run: |
|
||||
cmake -S . -B build -G Ninja \
|
||||
-DCMAKE_TOOLCHAIN_FILE=$PS2DEV/ps2sdk/ps2dev.cmake \
|
||||
-DSDL_WERROR=ON \
|
||||
-DSDL_TESTS=ON \
|
||||
-DSDL_INSTALL_TESTS=ON \
|
||||
-DSDL_EXAMPLES=ON \
|
||||
-DSDL_DISABLE_INSTALL_DOCS=OFF \
|
||||
-DCMAKE_INSTALL_PREFIX=cmake_prefix \
|
||||
-DCMAKE_BUILD_TYPE=Release
|
||||
- name: Build (CMake)
|
||||
run: cmake --build build --config Release --verbose
|
||||
- name: Install (CMake)
|
||||
run: |
|
||||
set -eu
|
||||
cmake --install build/ --config Release
|
||||
echo "SDL3_DIR=$(pwd)/cmake_prefix" >> $GITHUB_ENV
|
||||
( cd cmake_prefix; find ) | LC_ALL=C sort -u
|
||||
- name: Package (CPack)
|
||||
run: |
|
||||
cmake --build build/ --config Release --target package
|
||||
|
||||
- name: Verify CMake configuration files
|
||||
run: |
|
||||
cmake -S cmake/test -B cmake_config_build -G Ninja \
|
||||
-Wdeprecated -Wdev -Werror \
|
||||
-DCMAKE_TOOLCHAIN_FILE=$PS2DEV/ps2sdk/ps2dev.cmake \
|
||||
-DTEST_SHARED=FALSE \
|
||||
-DCMAKE_PREFIX_PATH=${{ env.SDL3_DIR }} \
|
||||
-DCMAKE_BUILD_TYPE=Release
|
||||
cmake --build cmake_config_build --verbose
|
||||
- name: Verify sdl3.pc
|
||||
run: |
|
||||
export CC=mips64r5900el-ps2-elf-gcc
|
||||
export LDFLAGS="-L$PS2DEV/ps2sdk/ee/lib -L$PS2DEV/gsKit/lib -L$PS2DEV/ps2sdk/ports/lib"
|
||||
export PKG_CONFIG_PATH=${{ env.SDL3_DIR }}/lib/pkgconfig
|
||||
cmake/test/test_pkgconfig.sh
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
if-no-files-found: error
|
||||
name: SDL-ps2
|
||||
path: build/dist/SDL3*
|
||||
@@ -1,74 +0,0 @@
|
||||
name: Build (Sony Playstation Portable)
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
psp:
|
||||
runs-on: ubuntu-latest
|
||||
container: pspdev/pspdev:latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Setup dependencies
|
||||
run: |
|
||||
apk update
|
||||
apk add cmake gmp mpc1 mpfr4 make pkgconf
|
||||
- name: Pollute PSP SDK with "bad" SDL headers
|
||||
run: |
|
||||
# Create "bad" SDL headers in the PSP SDK.
|
||||
# SDL sources should not use these.
|
||||
infixes=". psp psp/sdk"
|
||||
for infix in $infixes; do
|
||||
directory="$PSPDEV/$infix/include/SDL3"
|
||||
echo "Creating directory $directory"
|
||||
mkdir -p "$directory"
|
||||
for include in include/SDL3/*.h; do
|
||||
dest="$PSPDEV/$infix/include/SDL3/$(basename "$include")"
|
||||
echo "Creating $dest"
|
||||
echo '#error "System SDL headers must not be used by build system"' >"$dest"
|
||||
done
|
||||
done
|
||||
- name: Configure (CMake)
|
||||
run: |
|
||||
cmake -S . -B build \
|
||||
-Wdeprecated -Wdev -Werror \
|
||||
-DCMAKE_TOOLCHAIN_FILE=$PSPDEV/psp/share/pspdev.cmake \
|
||||
-DSDL_WERROR=ON \
|
||||
-DSDL_TESTS=ON \
|
||||
-DSDL_INSTALL_TESTS=ON \
|
||||
-DSDL_EXAMPLES=ON \
|
||||
-DSDL_DISABLE_INSTALL_DOCS=OFF \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=prefix
|
||||
- name: Build (CMake)
|
||||
run: cmake --build build --config Release --verbose
|
||||
- name: Install (CMake)
|
||||
run: |
|
||||
echo "SDL3_DIR=$(pwd)/prefix" >> $GITHUB_ENV
|
||||
cmake --install build --config Release
|
||||
( cd prefix; find ) | LC_ALL=C sort -u
|
||||
- name: Package (CPack)
|
||||
run: |
|
||||
cmake --build build/ --config Release --target package
|
||||
- name: Verify CMake configuration files
|
||||
run: |
|
||||
cmake -S cmake/test -B cmake_config_build \
|
||||
-DCMAKE_TOOLCHAIN_FILE=$PSPDEV/psp/share/pspdev.cmake \
|
||||
-DCMAKE_PREFIX_PATH=${{ env.SDL3_DIR }} \
|
||||
-DTEST_SHARED=FALSE \
|
||||
-DCMAKE_BUILD_TYPE=Release
|
||||
cmake --build cmake_config_build --verbose
|
||||
- name: Verify sdl3.pc
|
||||
run: |
|
||||
export CC=psp-gcc
|
||||
export LDFLAGS="-L$PSPDEV/lib -L$PSPDEV/psp/lib -L$PSPDEV/psp/sdk/lib"
|
||||
export PKG_CONFIG_PATH=${{ env.SDL3_DIR }}/lib/pkgconfig
|
||||
cmake/test/test_pkgconfig.sh
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
if-no-files-found: error
|
||||
name: SDL-psp
|
||||
path: build/dist/SDL3*
|
||||
@@ -561,11 +561,6 @@ jobs:
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.10'
|
||||
- name: 'Setup Android NDK'
|
||||
uses: nttld/setup-ndk@v1
|
||||
with:
|
||||
local-cache: true
|
||||
ndk-version: r21e
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
|
||||
@@ -1,66 +0,0 @@
|
||||
name: Build (RISC OS)
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
Build:
|
||||
name: ${{ matrix.platform.name }}
|
||||
runs-on: ubuntu-latest
|
||||
container: riscosdotinfo/riscos-gccsdk-4.7:latest
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform:
|
||||
- { name: CMake }
|
||||
|
||||
steps:
|
||||
- name: Setup dependencies
|
||||
run: apt-get update && apt-get install -y cmake ninja-build
|
||||
- uses: actions/checkout@v4
|
||||
- name: Configure (CMake)
|
||||
if: ${{ contains(matrix.platform.name, 'CMake') }}
|
||||
run: |
|
||||
cmake -S . -B build -G Ninja \
|
||||
-Wdeprecated -Wdev -Werror \
|
||||
-DCMAKE_TOOLCHAIN_FILE=/home/riscos/env/toolchain-riscos.cmake \
|
||||
-DCMAKE_DISABLE_PRECOMPILE_HEADERS=ON \
|
||||
-DRISCOS:BOOL=ON \
|
||||
-DSDL_GCC_ATOMICS=OFF \
|
||||
-DSDL_TESTS=ON \
|
||||
-DSDL_INSTALL_TESTS=ON \
|
||||
-DSDL_EXAMPLES=ON \
|
||||
-DSDL_DISABLE_INSTALL_DOCS=OFF \
|
||||
-DSDL_VENDOR_INFO="Github Workflow" \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/prefix_cmake
|
||||
- name: Build (CMake)
|
||||
if: ${{ contains(matrix.platform.name, 'CMake') }}
|
||||
run: cmake --build build --verbose
|
||||
- name: Install (CMake)
|
||||
if: ${{ contains(matrix.platform.name, 'CMake') }}
|
||||
run: |
|
||||
echo "SDL3_DIR=${{ github.workspace }}/prefix_cmake" >> $GITHUB_ENV
|
||||
cmake --install build/
|
||||
( cd ${{ github.workspace }}/prefix_cmake; find ) | LC_ALL=C sort -u
|
||||
- name: Package (CPack)
|
||||
run: |
|
||||
cmake --build build/ --config Release --target package
|
||||
- name: Verify CMake configuration files
|
||||
run: |
|
||||
cmake -S cmake/test -B cmake_config_build -G Ninja \
|
||||
-DTEST_SHARED=OFF \
|
||||
-DCMAKE_TOOLCHAIN_FILE=/home/riscos/env/toolchain-riscos.cmake \
|
||||
-DCMAKE_PREFIX_PATH=${{ env.SDL3_DIR }} \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
${{ matrix.platform.test_args }}
|
||||
cmake --build cmake_config_build --verbose
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
if-no-files-found: error
|
||||
name: SDL-riscos
|
||||
path: build/dist/SDL3*
|
||||
@@ -1,22 +0,0 @@
|
||||
name: Build (visionOS)
|
||||
|
||||
# FIXME: Enable this workflow once CMake 3.28 becomes available on GitHub
|
||||
on: [push, pull_request]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
Build:
|
||||
name: visionOS
|
||||
runs-on: macos-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Configure
|
||||
run: |
|
||||
cmake -B build -GXcode -DCMAKE_SYSTEM_NAME=visionOS
|
||||
- name: Build
|
||||
run: |
|
||||
cmake --build build
|
||||
@@ -1,138 +0,0 @@
|
||||
name: Build (Sony Playstation Vita)
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
|
||||
cancel-in-progress: true
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: sh
|
||||
|
||||
jobs:
|
||||
vita:
|
||||
name: ${{ matrix.platform.name }}
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: vitasdk/vitasdk:latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform:
|
||||
- { name: Vita (GLES w/ pib), pib: true, version: 1.1.4, artifact: SDL-vita-pib }
|
||||
- { name: Vita (GLES w/ PVR_PSP2 + gles4vita), pvr: true, version: 3.9, artifact: SDL-vita-pvr }
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install build requirements
|
||||
run: |
|
||||
apk update
|
||||
apk add cmake ninja pkgconf bash tar
|
||||
|
||||
- uses: actions/cache/restore@v4
|
||||
id: restore-cache
|
||||
with:
|
||||
path: /vita/dependencies
|
||||
key: ${{ matrix.platform.artifact }}-${{ matrix.platform.version }}
|
||||
|
||||
- name: Download PVR_PSP2 (GLES)
|
||||
if: ${{ !!matrix.platform.pvr && !steps.restore-cache.outputs.cache-hit }}
|
||||
run: |
|
||||
pvr_psp2_version=${{ matrix.platform.version }}
|
||||
|
||||
mkdir -p /vita/dependencies/include
|
||||
mkdir -p /vita/dependencies/lib
|
||||
|
||||
# Configure PVR_PSP2 headers
|
||||
wget https://github.com/GrapheneCt/PVR_PSP2/archive/refs/tags/v$pvr_psp2_version.zip -P/tmp
|
||||
unzip /tmp/v$pvr_psp2_version.zip -d/tmp
|
||||
cp -r /tmp/PVR_PSP2-$pvr_psp2_version/include/* /vita/dependencies/include
|
||||
rm /tmp/v$pvr_psp2_version.zip
|
||||
|
||||
# include guard of PVR_PSP2's khrplatform.h does not match the usual one
|
||||
sed -i -e s/__drvkhrplatform_h_/__khrplatform_h_/ /vita/dependencies/include/KHR/khrplatform.h
|
||||
|
||||
# Configure PVR_PSP2 stub libraries
|
||||
wget https://github.com/GrapheneCt/PVR_PSP2/releases/download/v$pvr_psp2_version/vitasdk_stubs.zip -P/tmp
|
||||
unzip /tmp/vitasdk_stubs.zip -d/tmp/pvr_psp2_stubs
|
||||
find /tmp/pvr_psp2_stubs -type f -name "*.a" -exec cp {} /vita/dependencies/lib \;
|
||||
rm /tmp/vitasdk_stubs.zip
|
||||
rm -rf /tmp/pvr_psp2_stubs
|
||||
|
||||
- name: Download gl4es4vita (OpenGL)
|
||||
if: ${{ !!matrix.platform.pib && !steps.restore-cache.outputs.cache-hit }}
|
||||
run: |
|
||||
gl4es4vita_version=${{ matrix.platform.version }}
|
||||
|
||||
mkdir -p /vita/dependencies/include
|
||||
mkdir -p /vita/dependencies/lib
|
||||
|
||||
# Configure gl4es4vita headers
|
||||
wget https://github.com/SonicMastr/gl4es4vita/releases/download/v$gl4es4vita_version-vita/include.zip -P/tmp
|
||||
unzip -o /tmp/include.zip -d/vita/dependencies/include
|
||||
rm /tmp/include.zip
|
||||
|
||||
# Configure gl4es4vita stub libraries
|
||||
wget https://github.com/SonicMastr/gl4es4vita/releases/download/v$gl4es4vita_version-vita/vitasdk_stubs.zip -P/tmp
|
||||
unzip /tmp/vitasdk_stubs.zip -d/vita/dependencies/lib
|
||||
|
||||
- uses: actions/cache/save@v4
|
||||
if: ${{ !steps.restore-cache.outputs.cache-hit }}
|
||||
with:
|
||||
path: /vita/dependencies
|
||||
key: ${{ matrix.platform.artifact }}-${{ matrix.platform.version }}
|
||||
|
||||
- name: Copy PVR_PSP2 (GLES) or gl4es4vita (OpenGL) to vita toolchain dir
|
||||
run: |
|
||||
cp -rv /vita/dependencies/* ${VITASDK}/arm-vita-eabi
|
||||
|
||||
- name: Fix vita.toolchain.cmake
|
||||
run: |
|
||||
# cache PKG_CONFIG_PATH
|
||||
sed -i -E 's/set\( PKG_CONFIG_EXECUTABLE "\$\{VITASDK}\/bin\/arm-vita-eabi-pkg-config" )/set( PKG_CONFIG_EXECUTABLE "${VITASDK}\/bin\/arm-vita-eabi-pkg-config" CACHE PATH "Path of pkg-config executable" )/' ${VITASDK}/share/vita.toolchain.cmake
|
||||
|
||||
- name: Configure (CMake)
|
||||
run: |
|
||||
cmake -S . -B build -G Ninja \
|
||||
-Wdeprecated -Wdev -Werror \
|
||||
-DCMAKE_TOOLCHAIN_FILE=${VITASDK}/share/vita.toolchain.cmake \
|
||||
-DVIDEO_VITA_PIB=${{ !!matrix.platform.pib }} \
|
||||
-DVIDEO_VITA_PVR=${{ !!matrix.platform.pvr }} \
|
||||
-DSDL_ARMNEON=ON \
|
||||
-DSDL_ARMSIMD=ON \
|
||||
-DSDL_WERROR=ON \
|
||||
-DSDL_TESTS=ON \
|
||||
-DSDL_INSTALL_TESTS=ON \
|
||||
-DSDL_EXAMPLES=ON \
|
||||
-DSDL_DISABLE_INSTALL_DOCS=OFF \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=prefix
|
||||
- name: Build (CMake)
|
||||
run: cmake --build build --verbose
|
||||
- name: Install (CMake)
|
||||
run: |
|
||||
echo "SDL3_DIR=$(pwd)/prefix" >> $GITHUB_ENV
|
||||
cmake --install build/
|
||||
( cd prefix; find ) | LC_ALL=C sort -u
|
||||
- name: Package (CPack)
|
||||
run: |
|
||||
cmake --build build/ --config Release --target package
|
||||
- name: Verify CMake configuration files
|
||||
run: |
|
||||
cmake -S cmake/test -B cmake_config_build -G Ninja \
|
||||
-DCMAKE_TOOLCHAIN_FILE=${VITASDK}/share/vita.toolchain.cmake \
|
||||
-DTEST_SHARED=FALSE \
|
||||
-DCMAKE_PREFIX_PATH=${{ env.SDL3_DIR }} \
|
||||
-DCMAKE_BUILD_TYPE=Release
|
||||
cmake --build cmake_config_build --verbose
|
||||
- name: Verify sdl3.pc
|
||||
run: |
|
||||
export CC=arm-vita-eabi-gcc
|
||||
export PKG_CONFIG_PATH=${{ env.SDL3_DIR }}/lib/pkgconfig
|
||||
cmake/test/test_pkgconfig.sh
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
if-no-files-found: error
|
||||
name: ${{ matrix.platform.artifact }}
|
||||
path: build/dist/SDL3*
|
||||
@@ -79,6 +79,8 @@ ${src_main}
|
||||
|
||||
include(CMakePushCheckState)
|
||||
|
||||
set(CMAKE_TRY_COMPILE_TARGET_TYPE "STATIC_LIBRARY")
|
||||
|
||||
cmake_push_check_state(RESET)
|
||||
try_compile(SDL_CPU_CHECK_ALL
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/CMakeTmp/SDL_detect_arch"
|
||||
|
||||
Reference in New Issue
Block a user