sdl (master post 3.1 preview) Merge commit 'e4f454091a943345938608570b104400f62fd625'

This commit is contained in:
2024-03-28 16:27:42 +01:00
862 changed files with 204894 additions and 45662 deletions

View File

@ -15,34 +15,37 @@ jobs:
fail-fast: false
matrix:
platform:
- { name: Android.mk }
- { name: CMake, cmake: 1, android_abi: "arm64-v8a", android_platform: 23, arch: "aarch64", artifact: "SDL-android-arm64", apk-artifact: "SDL-android-apks-arm64" }
- { name: "Android.mk" }
- { 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@v3
- uses: actions/checkout@v4
- uses: nttld/setup-ndk@v1
id: setup_ndk
with:
local-cache: true
ndk-version: r21e
- name: Build (Android.mk)
if: ${{ matrix.platform.name == 'Android.mk' }}
if: ${{ contains(matrix.platform.name, 'Android.mk') }}
run: |
./build-scripts/androidbuildlibs.sh
- uses: actions/setup-java@v3
if: ${{ matrix.platform.name == 'CMake' }}
- uses: actions/setup-java@v4
if: ${{ contains(matrix.platform.name, 'CMake') }}
with:
distribution: 'temurin'
java-version: '11'
- name: Setup (CMake)
if: ${{ matrix.platform.name == 'CMake' }}
if: ${{ contains(matrix.platform.name, 'CMake') }}
run: |
sudo apt-get update
sudo apt-get install ninja-build pkg-config
- name: Configure (CMake)
if: ${{ matrix.platform.name == 'CMake' }}
if: ${{ contains(matrix.platform.name, '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 \
@ -59,25 +62,25 @@ jobs:
-DCMAKE_BUILD_TYPE=Release \
-GNinja
- name: Build (CMake)
if: ${{ matrix.platform.name == 'CMake' }}
if: ${{ contains(matrix.platform.name, 'CMake') }}
run: |
cmake --build build --config Release --parallel --verbose
- name: Build test apk's (CMake)
if: ${{ matrix.platform.name == 'CMake' }}
if: ${{ contains(matrix.platform.name, 'CMake') }}
run: |
cmake --build build --config Release --parallel --verbose --target testaudiocapture-apk testcontroller-apk testmultiaudio-apk testsprite-apk
- name: Install (CMake)
if: ${{ matrix.platform.name == 'CMake' }}
if: ${{ contains(matrix.platform.name, '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.name == 'CMake' }}
if: ${{ contains(matrix.platform.name, 'CMake') }}
run: |
cmake --build build/ --config Release --target package
- name: Verify CMake configuration files
if: ${{ matrix.platform.name == 'CMake' }}
if: ${{ contains(matrix.platform.name, '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 \
@ -87,19 +90,19 @@ jobs:
-DCMAKE_PREFIX_PATH=${{ env.SDL3_DIR }}
cmake --build cmake_config_build --verbose
- name: Verify sdl3.pc
if: ${{ matrix.platform.name == 'CMake' }}
if: ${{ contains(matrix.platform.name, '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@v3
if: ${{ matrix.platform.name == 'CMake' }}
- uses: actions/upload-artifact@v4
if: ${{ contains(matrix.platform.name, 'CMake') }}
with:
if-no-files-found: error
name: ${{ matrix.platform.artifact }}
path: build/dist/SDL3*
- uses: actions/upload-artifact@v3
if: ${{ matrix.platform.name == 'CMake' }}
- uses: actions/upload-artifact@v4
if: ${{ contains(matrix.platform.name, 'CMake') }}
with:
if-no-files-found: error
name: ${{ matrix.platform.apk-artifact }}

View File

@ -26,9 +26,9 @@ jobs:
install-cmd: 'sudo -E pkgin -y install cmake dbus pkgconf ninja-build pulseaudio libxkbcommon wayland wayland-protocols libinotify libusb1',
}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Build
uses: cross-platform-actions/action@v0.21.1
uses: cross-platform-actions/action@v0.23.0
with:
operating_system: ${{ matrix.platform.os }}
architecture: ${{ matrix.platform.os-arch }}
@ -49,7 +49,7 @@ jobs:
rm -rf build/CMakeFiles
rm -rf build/docs
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
if-no-files-found: error
name: ${{ matrix.platform.artifact }}

View File

@ -10,8 +10,8 @@ jobs:
emscripten:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: mymindstorm/setup-emsdk@v12
- uses: actions/checkout@v4
- uses: mymindstorm/setup-emsdk@v14
with:
version: 3.1.35
- name: Install ninja
@ -51,7 +51,7 @@ jobs:
-DTEST_SHARED=FALSE \
-DCMAKE_PREFIX_PATH=${{ env.SDL3_DIR }}
cmake --build cmake_config_build --verbose
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
if-no-files-found: error
name: SDL-emscripten

View File

@ -8,7 +8,7 @@ jobs:
name: Haiku
container: haiku/cross-compiler:x86_64-r1beta4
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup dependencies
run: |
apt-get install pkg-config -y
@ -50,7 +50,7 @@ jobs:
run: |
export PKG_CONFIG_PATH=${{ env.SDL3_DIR }}/lib/pkgconfig
cmake/test/test_pkgconfig.sh
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
if-no-files-found: error
name: SDL-haiku

View File

@ -19,6 +19,6 @@ jobs:
- { name: tvOS, target: SDL3, sdk: appletvos }
steps:
- uses: actions/checkout@v3
- 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

View File

@ -15,13 +15,13 @@ jobs:
platform:
- { toolchain-version: 2022.09.06 }
steps:
- uses: actions/checkout@v3
- 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@v3
- uses: actions/cache/restore@v4
id: restore-cache
with:
path: /opt/cross-tools
@ -85,7 +85,7 @@ jobs:
run: |
export PKG_CONFIG_PATH=${{ env.SDL3_DIR }}/lib/pkgconfig
cmake/test/test_pkgconfig.sh
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
if-no-files-found: error
name: SDL-loongarch64

View File

@ -89,7 +89,7 @@ jobs:
# Install oneAPI
sudo apt-get install -y intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic
- uses: actions/checkout@v3
- 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'"
@ -149,7 +149,7 @@ jobs:
${{ 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@v3
- uses: actions/upload-artifact@v4
if: ${{ always() && steps.build.outcome == 'success' }}
with:
if-no-files-found: error

View File

@ -17,8 +17,6 @@ jobs:
platform:
- { name: Windows (x64), flags: -A x64, project: VisualC/SDL.sln, projectflags: '/p:Platform=x64', artifact: 'SDL-VC-x64' }
- { name: Windows (x86), flags: -A Win32, project: VisualC/SDL.sln, projectflags: '/p:Platform=Win32', artifact: 'SDL-VC-x86' }
- { name: Windows static VCRT (x64), flags: -A x64 -DSDL_FORCE_STATIC_VCRT=ON, artifact: 'SDL-VC-static-VCRT-x64' }
- { name: Windows static VCRT (x86), flags: -A Win32 -DSDL_FORCE_STATIC_VCRT=ON, artifact: 'SDL-VC-static-VCRT-x86' }
- { name: Windows (clang-cl x64), flags: -T ClangCL -A x64, artifact: 'SDL-clang-cl-x64' }
- { name: Windows (clang-cl x86), flags: -T ClangCL -A Win32, artifact: 'SDL-clang-cl-x86' }
- { name: Windows (ARM), flags: -A ARM, artifact: 'SDL-VC-arm32', notests: true }
@ -27,7 +25,7 @@ jobs:
project: VisualC-WinRT/SDL-UWP.sln, projectflags: '/p:Platform=x64 /p:WindowsTargetPlatformVersion=10.0.17763.0', artifact: 'SDL-VC-UWP' }
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Create CMake project using SDL as a subproject
shell: python
run: |
@ -90,11 +88,11 @@ jobs:
- name: Add msbuild to PATH
if: ${{ matrix.platform.project != '' }}
uses: microsoft/setup-msbuild@v1.1.3
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@v3
- uses: actions/upload-artifact@v4
if: ${{ always() && steps.build.outcome == 'success' }}
with:
if-no-files-found: error

View File

@ -12,7 +12,7 @@ jobs:
container:
image: devkitpro/devkitarm:latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install build requirements
run: |
apt update
@ -58,7 +58,7 @@ jobs:
run: |
export PKG_CONFIG_PATH=${{ env.SDL3_DIR }}/lib/pkgconfig
cmake/test/test_pkgconfig.sh
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
if-no-files-found: error
name: SDL-n3ds

View File

@ -12,7 +12,7 @@ jobs:
container:
image: dockcross/linux-ppc64le:latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install build requirements
run: |
apt-get update -y
@ -54,7 +54,7 @@ jobs:
run: |
export PKG_CONFIG_PATH=${{ env.SDL3_DIR }}/lib/pkgconfig
cmake/test/test_pkgconfig.sh
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
if-no-files-found: error
name: SDL-ppc64le

View File

@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
container: ps2dev/ps2dev:latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup dependencies
run: |
apk update
@ -53,7 +53,7 @@ jobs:
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@v3
- uses: actions/upload-artifact@v4
with:
if-no-files-found: error
name: SDL-ps2

View File

@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
container: pspdev/pspdev:latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup dependencies
run: |
apk update
@ -54,7 +54,7 @@ jobs:
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@v3
- uses: actions/upload-artifact@v4
with:
if-no-files-found: error
name: SDL-psp

View File

@ -0,0 +1,425 @@
name: 'release'
run-name: 'Create SDL release artifacts for ${{ inputs.commit }}'
on:
workflow_dispatch:
inputs:
commit:
description: 'Commit of SDL'
required: true
jobs:
src:
runs-on: ubuntu-latest
outputs:
project: ${{ steps.releaser.outputs.project }}
version: ${{ steps.releaser.outputs.version }}
src-tar-gz: ${{ steps.releaser.outputs.src-tar-gz }}
src-tar-xz: ${{ steps.releaser.outputs.src-tar-xz }}
src-zip: ${{ steps.releaser.outputs.src-zip }}
steps:
- name: 'Set up Python'
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: 'Fetch build-release.py'
uses: actions/checkout@v4
with:
sparse-checkout: 'build-scripts/build-release.py'
- name: 'Set up SDL sources'
uses: actions/checkout@v4
with:
path: 'SDL'
fetch-depth: 0
- name: 'Build Source archive'
id: releaser
shell: bash
run: |
python build-scripts/build-release.py \
--create source \
--commit ${{ inputs.commit }} \
--project SDL3 \
--root "${{ github.workspace }}/SDL" \
--github \
--debug
- name: 'Store source archives'
uses: actions/upload-artifact@v4
with:
name: sources
path: '${{ github.workspace}}/dist'
linux-verify:
needs: [src]
runs-on: ubuntu-latest
steps:
- name: 'Download source archives'
uses: actions/download-artifact@v4
with:
name: sources
path: '${{ github.workspace }}'
- name: 'Unzip ${{ needs.src.outputs.src-zip }}'
id: zip
run: |
mkdir /tmp/zipdir
cd /tmp/zipdir
unzip "${{ github.workspace }}/${{ needs.src.outputs.src-zip }}"
echo "path=/tmp/zipdir/${{ needs.src.outputs.project }}-${{ needs.src.outputs.version }}" >>$GITHUB_OUTPUT
- name: 'Untar ${{ needs.src.outputs.src-tar-gz }}'
id: tar
run: |
mkdir -p /tmp/tardir
tar -C /tmp/tardir -v -x -f "${{ github.workspace }}/${{ needs.src.outputs.src-tar-gz }}"
echo "path=/tmp/tardir/${{ needs.src.outputs.project }}-${{ needs.src.outputs.version }}" >>$GITHUB_OUTPUT
- name: 'Compare contents of ${{ needs.src.outputs.src-zip }} and ${{ needs.src.outputs.src-tar-gz }}'
run: |
diff /tmp/zipdir /tmp/tardir
- name: 'Test versioning'
shell: bash
run: |
${{ steps.tar.outputs.path }}/build-scripts/test-versioning.sh
- name: 'CMake (configure + build + tests)'
run: |
cmake -S ${{ steps.tar.outputs.path }} -B /tmp/build -DSDL_TEST_LIBRARY=TRUE -DSDL_TESTS=TRUE
cmake --build /tmp/build --verbose
ctest --test-dir /tmp/build --no-tests=error --output-on-failure
dmg:
needs: [src]
runs-on: macos-latest
outputs:
dmg: ${{ steps.releaser.outputs.dmg }}
steps:
- name: 'Set up Python'
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: 'Fetch build-release.py'
uses: actions/checkout@v4
with:
sparse-checkout: 'build-scripts/build-release.py'
- name: 'Download source archives'
uses: actions/download-artifact@v4
with:
name: sources
path: '${{ github.workspace }}'
- name: 'Untar ${{ needs.src.outputs.src-tar-gz }}'
id: tar
run: |
mkdir -p /tmp/tardir
tar -C /tmp/tardir -v -x -f "${{ github.workspace }}/${{ needs.src.outputs.src-tar-gz }}"
echo "path=/tmp/tardir/${{ needs.src.outputs.project }}-${{ needs.src.outputs.version }}" >>$GITHUB_OUTPUT
- name: 'Build SDL3.dmg'
id: releaser
shell: bash
run: |
python build-scripts/build-release.py \
--create xcframework \
--commit ${{ inputs.commit }} \
--project SDL3 \
--root "${{ steps.tar.outputs.path }}" \
--github \
--debug
- name: 'Store DMG image file'
uses: actions/upload-artifact@v4
with:
name: dmg
path: '${{ github.workspace }}/dist'
dmg-verify:
needs: [dmg, src]
runs-on: macos-latest
steps:
- name: 'Download source archives'
uses: actions/download-artifact@v4
with:
name: sources
path: '${{ github.workspace }}'
- name: 'Download ${{ needs.dmg.outputs.dmg }}'
uses: actions/download-artifact@v4
with:
name: dmg
path: '${{ github.workspace }}'
- name: 'Untar ${{ needs.src.outputs.src-tar-gz }}'
id: src
run: |
mkdir -p /tmp/tardir
tar -C /tmp/tardir -v -x -f "${{ github.workspace }}/${{ needs.src.outputs.src-tar-gz }}"
echo "path=/tmp/tardir/${{ needs.src.outputs.project }}-${{ needs.src.outputs.version }}" >>$GITHUB_OUTPUT
- name: 'Mount ${{ needs.dmg.outputs.dmg }}'
id: mount
run: |
hdiutil attach '${{ github.workspace }}/${{ needs.dmg.outputs.dmg }}'
mount_point="/Volumes/${{ needs.src.outputs.project }}"
if [ ! -d "$mount_point/${{ needs.src.outputs.project }}.xcframework" ]; then
echo "Cannot find ${{ needs.src.outputs.project }}.xcframework!"
exit 1
fi
echo "mount_point=$mount_point">>$GITHUB_OUTPUT
- name: 'CMake (configure + build) Darwin'
run: |
cmake -S "${{ steps.src.outputs.path }}/cmake/test" \
-DTEST_FULL=FALSE \
-DTEST_STATIC=FALSE \
-DTEST_TEST=FALSE \
-DCMAKE_PREFIX_PATH="${{ steps.mount.outputs.mount_point }}" \
-DCMAKE_SYSTEM_NAME=Darwin \
-DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" \
-Werror=dev \
-B build_darwin
cmake --build build_darwin --config Release --verbose
- name: 'CMake (configure + build) iOS'
run: |
cmake -S "${{ steps.src.outputs.path }}/cmake/test" \
-DTEST_FULL=FALSE \
-DTEST_STATIC=FALSE \
-DTEST_TEST=FALSE \
-DCMAKE_PREFIX_PATH="${{ steps.mount.outputs.mount_point }}" \
-DCMAKE_SYSTEM_NAME=iOS \
-DCMAKE_OSX_ARCHITECTURES="arm64" \
-Werror=dev \
-B build_ios
cmake --build build_ios --config Release --verbose
- name: 'CMake (configure + build) tvOS'
run: |
cmake -S "${{ steps.src.outputs.path }}/cmake/test" \
-DTEST_FULL=FALSE \
-DTEST_STATIC=FALSE \
-DTEST_TEST=FALSE \
-DCMAKE_PREFIX_PATH="${{ steps.mount.outputs.mount_point }}" \
-DCMAKE_SYSTEM_NAME=tvOS \
-DCMAKE_OSX_ARCHITECTURES="arm64" \
-Werror=dev \
-B build_tvos
cmake --build build_tvos --config Release --verbose
- name: 'CMake (configure + build) iOS simulator'
run: |
sysroot=$(xcodebuild -version -sdk iphonesimulator Path)
echo "sysroot=$sysroot"
cmake -S "${{ steps.src.outputs.path }}/cmake/test" \
-DTEST_FULL=FALSE \
-DTEST_STATIC=FALSE \
-DTEST_TEST=FALSE \
-DCMAKE_PREFIX_PATH="${{ steps.mount.outputs.mount_point }}" \
-DCMAKE_SYSTEM_NAME=iOS \
-DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" \
-DCMAKE_OSX_SYSROOT="${sysroot}" \
-Werror=dev \
-B build_ios_simulator
cmake --build build_ios_simulator --config Release --verbose
- name: 'CMake (configure + build) tvOS simulator'
run: |
sysroot=$(xcodebuild -version -sdk appletvsimulator Path)
echo "sysroot=$sysroot"
cmake -S "${{ steps.src.outputs.path }}/cmake/test" \
-DTEST_FULL=FALSE \
-DTEST_STATIC=FALSE \
-DTEST_TEST=FALSE \
-DCMAKE_PREFIX_PATH="${{ steps.mount.outputs.mount_point }}" \
-DCMAKE_SYSTEM_NAME=tvOS \
-DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" \
-DCMAKE_OSX_SYSROOT="${sysroot}" \
-Werror=dev \
-B build_tvos_simulator
cmake --build build_tvos_simulator --config Release --verbose
msvc:
needs: [src]
runs-on: windows-2019
outputs:
VC-x86: ${{ steps.releaser.outputs.VC-x86 }}
VC-x64: ${{ steps.releaser.outputs.VC-x64 }}
VC-devel: ${{ steps.releaser.outputs.VC-devel }}
steps:
- name: 'Set up Python'
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: 'Fetch build-release.py'
uses: actions/checkout@v4
with:
sparse-checkout: 'build-scripts/build-release.py'
- name: 'Download source archives'
uses: actions/download-artifact@v4
with:
name: sources
path: '${{ github.workspace }}'
- name: 'Unzip ${{ needs.src.outputs.src-zip }}'
id: zip
run: |
mkdir C:\zipdir
cd C:\zipdir
unzip "${{ github.workspace }}/${{ needs.src.outputs.src-zip }}"
echo "path=C:\zipdir\${{ needs.src.outputs.project }}-${{ needs.src.outputs.version }}" >>$Env:GITHUB_OUTPUT
- name: 'Build MSVC binary archives'
id: releaser
run: |
python build-scripts/build-release.py `
--create win32 `
--commit ${{ inputs.commit }} `
--project SDL3 `
--root "${{ steps.zip.outputs.path }}" `
--github `
--debug
- name: 'Store MSVC archives'
uses: actions/upload-artifact@v4
with:
name: win32
path: '${{ github.workspace }}/dist'
msvc-verify:
needs: [msvc, src]
runs-on: windows-latest
steps:
- name: 'Download source archives'
uses: actions/download-artifact@v4
with:
name: sources
path: '${{ github.workspace }}'
- name: 'Download MSVC binaries'
uses: actions/download-artifact@v4
with:
name: win32
path: '${{ github.workspace }}'
- name: 'Unzip ${{ needs.src.outputs.src-zip }}'
id: src
run: |
mkdir '${{ github.workspace }}/sources'
cd '${{ github.workspace }}/sources'
unzip "${{ github.workspace }}/${{ needs.src.outputs.src-zip }}"
echo "path=${{ github.workspace }}/sources/${{ needs.src.outputs.project }}-${{ needs.src.outputs.version }}" >>$env:GITHUB_OUTPUT
- name: 'Unzip ${{ needs.msvc.outputs.VC-devel }}'
id: bin
run: |
mkdir '${{ github.workspace }}/vc'
cd '${{ github.workspace }}/vc'
unzip "${{ github.workspace }}/${{ needs.msvc.outputs.VC-devel }}"
echo "path=${{ github.workspace }}/vc/${{ needs.src.outputs.project }}-${{ needs.src.outputs.version }}" >>$env:GITHUB_OUTPUT
- name: 'CMake (configure + build + tests) x86'
run: |
$env:PATH += ";${{ steps.bin.outputs.path }}/x86"
cmake -S "${{ steps.src.outputs.path }}/cmake/test" `
-DTEST_FULL=TRUE `
-DTEST_STATIC=FALSE `
-DTEST_TEST=TRUE `
-DCMAKE_PREFIX_PATH="${{ steps.bin.outputs.path }}" `
-Werror=dev `
-B build_x86 -A win32
cmake --build build_x86 --config Release --verbose
ctest --test-dir build_x86 --no-tests=error -C Release --output-on-failure
- name: 'CMake (configure + build + tests) x64'
run: |
$env:PATH += ";${{ steps.bin.outputs.path }}/x86"
cmake -S "${{ steps.src.outputs.path }}/cmake/test" `
-DTEST_FULL=TRUE `
-DTEST_STATIC=FALSE `
-DTEST_TEST=TRUE `
-DCMAKE_PREFIX_PATH="${{ steps.bin.outputs.path }}" `
-Werror=dev `
-B build_x64 -A x64
cmake --build build_x64 --config Release --verbose
ctest --test-dir build_x64 --no-tests=error -C Release --output-on-failure
mingw:
needs: [src]
runs-on: ubuntu-latest
outputs:
mingw-devel-tar-gz: ${{ steps.releaser.outputs.mingw-devel-tar-gz }}
mingw-devel-tar-xz: ${{ steps.releaser.outputs.mingw-devel-tar-xz }}
steps:
- name: 'Set up Python'
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: 'Fetch build-release.py'
uses: actions/checkout@v4
with:
sparse-checkout: 'build-scripts/build-release.py'
- name: 'Install Mingw toolchain'
run: |
sudo apt-get update -y
sudo apt-get install -y gcc-mingw-w64 g++-mingw-w64 ninja-build
- name: 'Download source archives'
uses: actions/download-artifact@v4
with:
name: sources
path: '${{ github.workspace }}'
- name: 'Untar ${{ needs.src.outputs.src-tar-gz }}'
id: tar
run: |
mkdir -p /tmp/tardir
tar -C /tmp/tardir -v -x -f "${{ github.workspace }}/${{ needs.src.outputs.src-tar-gz }}"
echo "path=/tmp/tardir/${{ needs.src.outputs.project }}-${{ needs.src.outputs.version }}" >>$GITHUB_OUTPUT
- name: 'Build MinGW binary archives'
id: releaser
run: |
python build-scripts/build-release.py \
--create mingw \
--commit ${{ inputs.commit }} \
--project SDL3 \
--root "${{ steps.tar.outputs.path }}" \
--github \
--debug
- name: 'Store MinGW archives'
uses: actions/upload-artifact@v4
with:
name: mingw
path: '${{ github.workspace }}/dist'
mingw-verify:
needs: [mingw, src]
runs-on: ubuntu-latest
steps:
- name: 'Install Mingw toolchain'
run: |
sudo apt-get update -y
sudo apt-get install -y gcc-mingw-w64 g++-mingw-w64 ninja-build
- name: 'Download source archives'
uses: actions/download-artifact@v4
with:
name: sources
path: '${{ github.workspace }}'
- name: 'Download MinGW binaries'
uses: actions/download-artifact@v4
with:
name: mingw
path: '${{ github.workspace }}'
- name: 'Untar ${{ needs.src.outputs.src-tar-gz }}'
id: src
run: |
mkdir -p /tmp/tardir
tar -C /tmp/tardir -v -x -f "${{ github.workspace }}/${{ needs.src.outputs.src-tar-gz }}"
echo "path=/tmp/tardir/${{ needs.src.outputs.project }}-${{ needs.src.outputs.version }}" >>$GITHUB_OUTPUT
- name: 'Untar ${{ needs.mingw.outputs.mingw-devel-tar-gz }}'
id: bin
run: |
mkdir -p /tmp/mingw-tardir
tar -C /tmp/mingw-tardir -v -x -f "${{ github.workspace }}/${{ needs.mingw.outputs.mingw-devel-tar-gz }}"
echo "path=/tmp/mingw-tardir/${{ needs.src.outputs.project }}-${{ needs.src.outputs.version }}" >>$GITHUB_OUTPUT
- name: 'CMake (configure + build) i686'
run: |
cmake -S "${{ steps.src.outputs.path }}/cmake/test" \
-DCMAKE_BUILD_TYPE="Release" \
-DTEST_FULL=TRUE \
-DTEST_STATIC=TRUE \
-DTEST_TEST=TRUE \
-DCMAKE_PREFIX_PATH="${{ steps.bin.outputs.path }}" \
-DCMAKE_TOOLCHAIN_FILE="${{ steps.src.outputs.path }}/build-scripts/cmake-toolchain-mingw64-i686.cmake" \
-DCMAKE_C_FLAGS="-DSDL_DISABLE_SSE4_2" \
-Werror=dev \
-B build_x86
cmake --build build_x86 --config Release --verbose
- name: 'CMake (configure + build) x86_64'
run: |
cmake -S "${{ steps.src.outputs.path }}/cmake/test" \
-DCMAKE_BUILD_TYPE="Release" \
-DTEST_FULL=TRUE \
-DTEST_STATIC=TRUE \
-DTEST_TEST=TRUE \
-DCMAKE_PREFIX_PATH="${{ steps.bin.outputs.path }}" \
-DCMAKE_TOOLCHAIN_FILE="${{ steps.src.outputs.path }}/build-scripts/cmake-toolchain-mingw64-x86_64.cmake" \
-DCMAKE_C_FLAGS="-DSDL_DISABLE_SSE4_2" \
-Werror=dev \
-B build_x64
cmake --build build_x64 --config Release --verbose

View File

@ -21,7 +21,7 @@ jobs:
steps:
- name: Setup dependencies
run: apt-get update && apt-get install -y cmake ninja-build
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Configure (CMake)
if: ${{ contains(matrix.platform.name, 'CMake') }}
run: |
@ -57,7 +57,7 @@ jobs:
-DCMAKE_BUILD_TYPE=Release \
${{ matrix.platform.test_args }}
cmake --build cmake_config_build --verbose
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
if-no-files-found: error
name: SDL-riscos

View File

@ -13,7 +13,7 @@ jobs:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Configure
run: |
cmake -B build -GXcode -DCMAKE_SYSTEM_NAME=visionOS

View File

@ -24,13 +24,13 @@ jobs:
- { name: Vita (GLES w/ PVR_PSP2 + gles4vita), pvr: true, version: 3.9, artifact: SDL-vita-pvr }
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install build requirements
run: |
apk update
apk add cmake ninja pkgconf bash tar
- uses: actions/cache/restore@v3
- uses: actions/cache/restore@v4
id: restore-cache
with:
path: /vita/dependencies
@ -77,7 +77,7 @@ jobs:
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@v3
- uses: actions/cache/save@v4
if: ${{ !steps.restore-cache.outputs.cache-hit }}
with:
path: /vita/dependencies
@ -129,7 +129,7 @@ jobs:
export CC=arm-vita-eabi-gcc
export PKG_CONFIG_PATH=${{ env.SDL3_DIR }}/lib/pkgconfig
cmake/test/test_pkgconfig.sh
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
if-no-files-found: error
name: ${{ matrix.platform.artifact }}