Skip to content

Commit 23d83da

Browse files
authored
Merge branch 'main' into br_notification
2 parents 89d7038 + c82cca0 commit 23d83da

File tree

515 files changed

+8336
-4449
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

515 files changed

+8336
-4449
lines changed

.github/workflows/android.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ jobs:
4040
-Wdeprecated -Wdev -Werror \
4141
-DCMAKE_TOOLCHAIN_FILE=${{ steps.setup_ndk.outputs.ndk-path }}/build/cmake/android.toolchain.cmake \
4242
-DSDL_WERROR=ON \
43+
-DSDL_TESTS=ON \
44+
-DSDL_INSTALL_TESTS=ON \
4345
-DSDL_CLANG_TIDY=ON \
4446
-DANDROID_PLATFORM=${{ matrix.platform.android_platform }} \
4547
-DANDROID_ABI=${{ matrix.platform.android_abi }} \

.github/workflows/loongarch64.yml

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
name: Build (LoongArch64)
2+
3+
on: [push, pull_request]
4+
5+
concurrency:
6+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
7+
cancel-in-progress: true
8+
9+
jobs:
10+
loongarch64:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
platform:
16+
- { toolchain-version: 2022.09.06 }
17+
steps:
18+
- uses: actions/checkout@v3
19+
- name: Install build requirements
20+
run: |
21+
sudo apt-get update -y
22+
sudo apt-get install -y --no-install-recommends cmake ninja-build pkg-config tar wget
23+
24+
- uses: actions/cache/restore@v3
25+
id: restore-cache
26+
with:
27+
path: /opt/cross-tools
28+
key: loongarch64-${{ matrix.platform.toolchain-version }}
29+
30+
- name: Download LoongArch64 gcc+glibc toolchain
31+
if: ${{ !steps.restore-cache.outputs.cache-hit }}
32+
run: |
33+
url="https://github.com/loongson/build-tools/releases/download/${{ matrix.platform.toolchain-version }}/loongarch64-clfs-6.3-cross-tools-gcc-glibc.tar.xz"
34+
35+
wget "$url" -O /tmp/toolchain.tar.xz
36+
37+
mkdir -p /opt
38+
tar -C /opt -x -f /tmp/toolchain.tar.xz
39+
40+
- uses: actions/cache/save@v3
41+
if: ${{ !steps.restore-cache.outputs.cache-hit }}
42+
with:
43+
path: /opt/cross-tools
44+
key: loongarch64-${{ matrix.platform.toolchain-version }}
45+
46+
- name: Set-up Loongarch64 build environment
47+
run: |
48+
echo "/opt/cross-tools/bin" >> $GITHUB_PATH
49+
echo "CC=loongarch64-unknown-linux-gnu-gcc" >> $GITHUB_ENV
50+
echo "CXX=loongarch64-unknown-linux-gnu-g++" >> $GITHUB_ENV
51+
52+
- name: Configure (CMake)
53+
run: |
54+
cmake -S . -B build -G Ninja \
55+
-Wdeprecated -Wdev -Werror \
56+
-DSDL_SHARED=ON \
57+
-DSDL_STATIC=ON \
58+
-DSDL_TESTS=ON \
59+
-DSDL_WERROR=ON \
60+
-DSDL_TESTS=ON \
61+
-DSDL_INSTALL_TESTS=ON \
62+
-DSDL_VENDOR_INFO="Github Workflow" \
63+
-DCMAKE_BUILD_TYPE=Release \
64+
-DCMAKE_INSTALL_PREFIX=prefix
65+
- name: Build (CMake)
66+
run: |
67+
cmake --build build --verbose
68+
- name: Install (CMake)
69+
run: |
70+
echo "SDL3_DIR=$(pwd)/prefix" >> $GITHUB_ENV
71+
cmake --install build/
72+
( cd prefix; find ) | LC_ALL=C sort -u
73+
- name: Package (CPack)
74+
run: |
75+
cmake --build build/ --config Release --target package
76+
- name: Verify CMake configuration files
77+
run: |
78+
cmake -S cmake/test -B cmake_config_build -G Ninja \
79+
-DTEST_SHARED=TRUE \
80+
-DTEST_STATIC=TRUE \
81+
-DCMAKE_PREFIX_PATH=${{ env.SDL3_DIR }} \
82+
-DCMAKE_BUILD_TYPE=Release
83+
cmake --build cmake_config_build --verbose
84+
- name: Verify sdl3.pc
85+
run: |
86+
export PKG_CONFIG_PATH=${{ env.SDL3_DIR }}/lib/pkgconfig
87+
cmake/test/test_pkgconfig.sh
88+
- uses: actions/upload-artifact@v3
89+
with:
90+
if-no-files-found: error
91+
name: SDL-loongarch64
92+
path: build/dist/SDL3*

.github/workflows/main.yml

Lines changed: 32 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,19 @@ jobs:
1919
fail-fast: false
2020
matrix:
2121
platform:
22-
- { name: Windows (mingw32), os: windows-latest, shell: 'msys2 {0}', msystem: mingw32, msys-env: mingw-w64-i686, artifact: 'SDL-mingw32' }
23-
- { name: Windows (mingw64), os: windows-latest, shell: 'msys2 {0}', msystem: mingw64, msys-env: mingw-w64-x86_64, artifact: 'SDL-mingw64' }
24-
- { name: Windows (clang32), os: windows-latest, shell: 'msys2 {0}', msystem: clang32, msys-env: mingw-w64-clang-i686, artifact: 'SDL-msys2-clang32' }
25-
- { name: Windows (clang64), os: windows-latest, shell: 'msys2 {0}', msystem: clang64, msys-env: mingw-w64-clang-x86_64, artifact: 'SDL-msys2-clang64' }
26-
- { name: Windows (ucrt64), os: windows-latest, shell: 'msys2 {0}', msystem: ucrt64, msys-env: mingw-w64-ucrt-x86_64, artifact: 'SDL-msys2-ucrt64' }
27-
- { name: Ubuntu 20.04, os: ubuntu-20.04, shell: sh, artifact: 'SDL-ubuntu20.04' }
28-
- { name: Ubuntu 22.04, os: ubuntu-22.04, shell: sh, artifact: 'SDL-ubuntu22.04' }
29-
- { name: MacOS (Framework), os: macos-latest, shell: sh, cmake: '-DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" -DSDL_FRAMEWORK=ON -DSDL_CLANG_TIDY=OFF', skip_test_pkgconfig: true, artifact: 'SDL-macos-framework' }
30-
- { name: MacOS (GNU prefix), os: macos-latest, shell: sh, cmake: '-DCMAKE_OSX_ARCHITECTURES="x86_64" -DCLANG_TIDY_BINARY="$(brew --prefix llvm)/bin/clang-tidy"', artifact: 'SDL-macos-gnu' }
22+
- { name: Windows (mingw32), os: windows-latest, shell: 'msys2 {0}', msystem: mingw32, msys-env: mingw-w64-i686, artifact: 'SDL-mingw32' }
23+
- { name: Windows (mingw64), os: windows-latest, shell: 'msys2 {0}', msystem: mingw64, msys-env: mingw-w64-x86_64, artifact: 'SDL-mingw64' }
24+
- { name: Windows (clang32), os: windows-latest, shell: 'msys2 {0}', msystem: clang32, msys-env: mingw-w64-clang-i686, artifact: 'SDL-msys2-clang32' }
25+
- { name: Windows (clang64), os: windows-latest, shell: 'msys2 {0}', msystem: clang64, msys-env: mingw-w64-clang-x86_64, artifact: 'SDL-msys2-clang64' }
26+
- { name: Windows (ucrt64), os: windows-latest, shell: 'msys2 {0}', msystem: ucrt64, msys-env: mingw-w64-ucrt-x86_64, artifact: 'SDL-msys2-ucrt64' }
27+
- { name: Ubuntu 20.04, os: ubuntu-20.04, shell: sh, artifact: 'SDL-ubuntu20.04' }
28+
- { name: Intel oneAPI (Ubuntu 20.04), os: ubuntu-20.04, shell: bash, artifact: 'SDL-ubuntu20.04-oneapi', intel: true,
29+
source_cmd: 'source /opt/intel/oneapi/setvars.sh; export CC=icx; export CXX=icx;'}
30+
- { name: Intel Compiler (Ubuntu 20.04), os: ubuntu-20.04, shell: bash, artifact: 'SDL-ubuntu20.04-icc', intel: true, cmake: '-DSDL_CLANG_TIDY=OFF',
31+
source_cmd: 'source /opt/intel/oneapi/setvars.sh; export CC=icc; export CXX=icpc; export CFLAGS=-diag-disable=10441; export CXXFLAGS=-diag-disable=10441; '}
32+
- { name: Ubuntu 22.04, os: ubuntu-22.04, shell: sh, artifact: 'SDL-ubuntu22.04' }
33+
- { name: MacOS (Framework), os: macos-latest, shell: sh, cmake: '-DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" -DSDL_FRAMEWORK=ON -DSDL_CLANG_TIDY=OFF', skip_test_pkgconfig: true, artifact: 'SDL-macos-framework' }
34+
- { name: MacOS (GNU prefix), os: macos-latest, shell: sh, cmake: '-DCMAKE_OSX_ARCHITECTURES="x86_64" -DCLANG_TIDY_BINARY="$(brew --prefix llvm)/bin/clang-tidy"', artifact: 'SDL-macos-gnu' }
3135

3236
steps:
3337
- name: Set up MSYS2
@@ -65,13 +69,27 @@ jobs:
6569
ninja \
6670
pkg-config \
6771
llvm
72+
73+
- name: Setup Intel oneAPI
74+
if: matrix.platform.intel
75+
run: |
76+
# Setup oneAPI repo
77+
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
78+
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
79+
sudo echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
80+
sudo apt-get update -y
81+
82+
# Install oneAPI
83+
sudo apt-get install -y intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic
84+
6885
- uses: actions/checkout@v3
6986
- name: Check that versioning is consistent
7087
# We only need to run this once: arbitrarily use the Linux/CMake build
7188
if: "runner.os == 'Linux'"
7289
run: ./build-scripts/test-versioning.sh
7390
- name: Configure (CMake)
7491
run: |
92+
${{ matrix.platform.source_cmd }}
7593
cmake -S . -B build -G Ninja \
7694
-Wdeprecated -Wdev -Werror \
7795
-DSDL_SHARED=ON \
@@ -86,10 +104,12 @@ jobs:
86104
${{ matrix.platform.cmake }}
87105
- name: Build (CMake)
88106
run: |
107+
${{ matrix.platform.source_cmd }}
89108
cmake --build build/ --config Release --verbose --parallel
90109
- name: Run build-time tests (CMake)
91110
run: |
92111
set -eu
112+
${{ matrix.platform.source_cmd }}
93113
export SDL_TESTS_QUICK=1
94114
ctest -VV --test-dir build/
95115
if test "${{ runner.os }}" = "Linux"; then
@@ -99,13 +119,15 @@ jobs:
99119
- name: Install (CMake)
100120
run: |
101121
set -eu
122+
${{ matrix.platform.source_cmd }}
102123
cmake --install build/ --config Release
103124
( cd cmake_prefix; find . ) | LC_ALL=C sort -u
104125
- name: Package (CPack)
105126
run: |
106127
cmake --build build/ --config Release --target package
107128
- name: Verify CMake configuration files
108129
run: |
130+
${{ matrix.platform.source_cmd }}
109131
cmake -S cmake/test -B cmake_config_build -G Ninja \
110132
-DTEST_SHARED=ON \
111133
-DTEST_STATIC=ON \
@@ -115,6 +137,7 @@ jobs:
115137
- name: Verify sdl3.pc
116138
if: ${{ !matrix.platform.skip_test_pkgconfig }}
117139
run: |
140+
${{ matrix.platform.source_cmd }}
118141
export PKG_CONFIG_PATH=$(echo "${{ github.workspace }}/cmake_prefix/lib/pkgconfig" | sed -e 's#\\#/#g')
119142
cmake/test/test_pkgconfig.sh
120143
- uses: actions/upload-artifact@v3

.github/workflows/ppc64le.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Build (PowerPC64)
2+
3+
on: [push, pull_request]
4+
5+
concurrency:
6+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
7+
cancel-in-progress: true
8+
9+
jobs:
10+
ppc64le:
11+
runs-on: ubuntu-latest
12+
container:
13+
image: dockcross/linux-ppc64le:latest
14+
steps:
15+
- uses: actions/checkout@v3
16+
- name: Install build requirements
17+
run: |
18+
apt-get update -y
19+
apt-get install -y cmake ninja-build
20+
- name: Configure (CMake)
21+
run: |
22+
# FIXME: Enable SDL_WERROR
23+
cmake -S . -B build -G Ninja \
24+
-Wdeprecated -Wdev -Werror \
25+
-DSDL_SHARED=ON \
26+
-DSDL_STATIC=ON \
27+
-DSDL_TESTS=ON \
28+
-DSDL_WERROR=OFF \
29+
-DSDL_TESTS=ON \
30+
-DSDL_INSTALL_TESTS=ON \
31+
-DSDL_VENDOR_INFO="Github Workflow" \
32+
-DCMAKE_BUILD_TYPE=Release \
33+
-DCMAKE_INSTALL_PREFIX=prefix
34+
- name: Build (CMake)
35+
run: |
36+
cmake --build build --verbose
37+
- name: Install (CMake)
38+
run: |
39+
echo "SDL3_DIR=$(pwd)/prefix" >> $GITHUB_ENV
40+
cmake --install build/
41+
( cd prefix; find ) | LC_ALL=C sort -u
42+
- name: Package (CPack)
43+
run: |
44+
cmake --build build/ --config Release --target package
45+
- name: Verify CMake configuration files
46+
run: |
47+
cmake -S cmake/test -B cmake_config_build -G Ninja \
48+
-DTEST_SHARED=TRUE \
49+
-DTEST_STATIC=TRUE \
50+
-DCMAKE_PREFIX_PATH=${{ env.SDL3_DIR }} \
51+
-DCMAKE_BUILD_TYPE=Release
52+
cmake --build cmake_config_build --verbose
53+
- name: Verify sdl3.pc
54+
run: |
55+
export PKG_CONFIG_PATH=${{ env.SDL3_DIR }}/lib/pkgconfig
56+
cmake/test/test_pkgconfig.sh
57+
- uses: actions/upload-artifact@v3
58+
with:
59+
if-no-files-found: error
60+
name: SDL-ppc64le
61+
path: build/dist/SDL3*

.github/workflows/ps2.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
-DCMAKE_INSTALL_PREFIX=cmake_prefix \
3737
-DCMAKE_BUILD_TYPE=Release
3838
- name: Build (CMake)
39-
run: cmake --build build --config Release --verbose --parallel
39+
run: cmake --build build --config Release --verbose -- -j 1
4040
- name: Install (CMake)
4141
run: |
4242
set -eu
@@ -45,7 +45,7 @@ jobs:
4545
( cd cmake_prefix; find ) | LC_ALL=C sort -u
4646
- name: Package (CPack)
4747
run: |
48-
cmake --build build/ --config Release --target package
48+
cmake --build build/ --config Release --target package -- -j 1
4949
5050
- name: Verify CMake configuration files
5151
run: |
@@ -55,7 +55,7 @@ jobs:
5555
-DTEST_SHARED=FALSE \
5656
-DCMAKE_PREFIX_PATH=${{ env.SDL3_DIR }} \
5757
-DCMAKE_BUILD_TYPE=Release
58-
cmake --build cmake_config_build --verbose
58+
cmake --build cmake_config_build --verbose -- -j 1
5959
- name: Verify sdl3.pc
6060
run: |
6161
export CC=mips64r5900el-ps2-elf-gcc

.github/workflows/psp.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ jobs:
1616
run: |
1717
apk update
1818
apk add cmake gmp mpc1 mpfr4 make pkgconf
19+
- name: Patch the pspdev toolchain to use -isystem instead of -I
20+
run: |
21+
# https://github.com/pspdev/pspsdk/issues/123
22+
sed -E s/-I/-isystem/g -i $PSPDEV/psp/share/pspdev.cmake
1923
- name: Configure (CMake)
2024
run: |
2125
cmake -S . -B build \

.github/workflows/vita.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ jobs:
2020
fail-fast: false
2121
matrix:
2222
platform:
23-
- { name: Vita (GLES w/ pib), os: windows-latest, pib: true, version: 1.1.4, artifact: SDL-vita-pib }
24-
- { name: Vita (GLES w/ PVR_PSP2 + gles4vita), os: windows-latest, pvr: true, version: 3.9, artifact: SDL-vita-pvr }
23+
- { name: Vita (GLES w/ pib), pib: true, version: 1.1.4, artifact: SDL-vita-pib }
24+
- { name: Vita (GLES w/ PVR_PSP2 + gles4vita), pvr: true, version: 3.9, artifact: SDL-vita-pvr }
2525

2626
steps:
2727
- uses: actions/checkout@v3
@@ -78,6 +78,7 @@ jobs:
7878
unzip /tmp/vitasdk_stubs.zip -d/vita/dependencies/lib
7979
8080
- uses: actions/cache/save@v3
81+
if: ${{ !steps.restore-cache.outputs.cache-hit }}
8182
with:
8283
path: /vita/dependencies
8384
key: ${{ matrix.platform.artifact }}-${{ matrix.platform.version }}
@@ -93,6 +94,8 @@ jobs:
9394
-DCMAKE_TOOLCHAIN_FILE=${VITASDK}/share/vita.toolchain.cmake \
9495
-DVIDEO_VITA_PIB=${{ !!matrix.platform.pib }} \
9596
-DVIDEO_VITA_PVR=${{ !!matrix.platform.pvr }} \
97+
-DSDL_ARMNEON=ON \
98+
-DSDL_ARMSIMD=ON \
9699
-DSDL_WERROR=ON \
97100
-DSDL_TESTS=ON \
98101
-DSDL_INSTALL_TESTS=ON \

.github/workflows/vmactions.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ jobs:
1515
- name: Build
1616
uses: vmactions/freebsd-vm@v0
1717
with:
18+
mem: 8192
1819
usesh: true
1920
prepare: |
2021
pkg install -y \
@@ -55,6 +56,8 @@ jobs:
5556
-DSDL_CHECK_REQUIRED_LINK_OPTIONS="-L/usr/local/lib"
5657
cmake --build build/ --config Release --verbose -- -j`sysctl -n hw.ncpu`
5758
cmake --build build/ --config Release --target package
59+
60+
cmake --build build/ --config Release --target clean
5861
- uses: actions/upload-artifact@v3
5962
with:
6063
if-no-files-found: error

.wikiheaders-options

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ incsubdir = include/SDL3
44
wikisubdir =
55
readmesubdir = docs
66
apiprefixregex = (SDL_|SDLK_|KMOD_|AUDIO_)
7-
mainincludefname = SDL.h
7+
mainincludefname = SDL3/SDL.h
88
versionfname = include/SDL3/SDL_version.h
99
versionmajorregex = \A\#define\s+SDL_MAJOR_VERSION\s+(\d+)\Z
1010
versionminorregex = \A\#define\s+SDL_MINOR_VERSION\s+(\d+)\Z

0 commit comments

Comments
 (0)