summaryrefslogtreecommitdiff
path: root/src/contrib/SDL-2.30.2/.github/workflows
diff options
context:
space:
mode:
author3gg <3gg@shellblade.net>2024-05-04 16:51:29 -0700
committer3gg <3gg@shellblade.net>2024-05-04 16:51:29 -0700
commit8222bfe56d4dabe8d92fc4b25ea1b0163b16f3e1 (patch)
tree763389e42276035ac134d94eb1dc32293b88d807 /src/contrib/SDL-2.30.2/.github/workflows
Initial commit.
Diffstat (limited to 'src/contrib/SDL-2.30.2/.github/workflows')
-rw-r--r--src/contrib/SDL-2.30.2/.github/workflows/android.yml81
-rw-r--r--src/contrib/SDL-2.30.2/.github/workflows/cpactions.yml51
-rw-r--r--src/contrib/SDL-2.30.2/.github/workflows/emscripten.yml45
-rw-r--r--src/contrib/SDL-2.30.2/.github/workflows/ios.yml20
-rw-r--r--src/contrib/SDL-2.30.2/.github/workflows/main.yml240
-rw-r--r--src/contrib/SDL-2.30.2/.github/workflows/msvc.yml80
-rw-r--r--src/contrib/SDL-2.30.2/.github/workflows/n3ds.yml55
-rw-r--r--src/contrib/SDL-2.30.2/.github/workflows/ps2.yaml73
-rw-r--r--src/contrib/SDL-2.30.2/.github/workflows/psp.yaml50
-rw-r--r--src/contrib/SDL-2.30.2/.github/workflows/riscos.yml68
-rw-r--r--src/contrib/SDL-2.30.2/.github/workflows/vita.yaml95
-rw-r--r--src/contrib/SDL-2.30.2/.github/workflows/watcom.yml35
12 files changed, 893 insertions, 0 deletions
diff --git a/src/contrib/SDL-2.30.2/.github/workflows/android.yml b/src/contrib/SDL-2.30.2/.github/workflows/android.yml
new file mode 100644
index 0000000..a2d2b0b
--- /dev/null
+++ b/src/contrib/SDL-2.30.2/.github/workflows/android.yml
@@ -0,0 +1,81 @@
1name: Build (Android)
2
3on: [push, pull_request]
4
5jobs:
6 android:
7 name: ${{ matrix.platform.name }}
8 runs-on: ubuntu-latest
9
10 strategy:
11 fail-fast: false
12 matrix:
13 platform:
14 - { name: Android.mk }
15 - { name: CMake, cmake: 1, android_abi: "arm64-v8a", android_platform: 23, arch: "aarch64" }
16
17 steps:
18 - uses: actions/checkout@v4
19 - uses: nttld/setup-ndk@v1
20 id: setup_ndk
21 with:
22 ndk-version: r21e
23 - name: Build (Android.mk)
24 if: ${{ matrix.platform.name == 'Android.mk' }}
25 run: |
26 ./build-scripts/androidbuildlibs.sh
27 - name: Setup (CMake)
28 if: ${{ matrix.platform.name == 'CMake' }}
29 run: |
30 sudo apt-get update
31 sudo apt-get install ninja-build pkg-config
32 - name: Configure (CMake)
33 if: ${{ matrix.platform.name == 'CMake' }}
34 run: |
35 cmake -B build \
36 -DCMAKE_TOOLCHAIN_FILE=${{ steps.setup_ndk.outputs.ndk-path }}/build/cmake/android.toolchain.cmake \
37 -DSDL_WERROR=ON \
38 -DANDROID_PLATFORM=${{ matrix.platform.android_platform }} \
39 -DANDROID_ABI=${{ matrix.platform.android_abi }} \
40 -DSDL_STATIC_PIC=ON \
41 -DSDL_VENDOR_INFO="Github Workflow" \
42 -DCMAKE_INSTALL_PREFIX=prefix \
43 -DCMAKE_BUILD_TYPE=Release \
44 -GNinja
45 - name: Build (CMake)
46 if: ${{ matrix.platform.name == 'CMake' }}
47 run: |
48 cmake --build build --config Release --parallel --verbose
49 - name: Install (CMake)
50 if: ${{ matrix.platform.name == 'CMake' }}
51 run: |
52 cmake --install build --config Release
53 echo "SDL2_DIR=$(pwd)/prefix" >> $GITHUB_ENV
54 ( cd prefix; find ) | LC_ALL=C sort -u
55 - name: Verify CMake configuration files
56 if: ${{ matrix.platform.name == 'CMake' }}
57 run: |
58 cmake -S cmake/test -B cmake_config_build -G Ninja \
59 -DCMAKE_TOOLCHAIN_FILE=${{ steps.setup_ndk.outputs.ndk-path }}/build/cmake/android.toolchain.cmake \
60 -DANDROID_PLATFORM=${{ matrix.platform.android_platform }} \
61 -DANDROID_ABI=${{ matrix.platform.android_abi }} \
62 -DCMAKE_BUILD_TYPE=Release \
63 -DCMAKE_PREFIX_PATH=${{ env.SDL2_DIR }}
64 cmake --build cmake_config_build --verbose
65 - name: Verify sdl2-config
66 if: ${{ matrix.platform.name == 'CMake' }}
67 run: |
68 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 }}"
69 export PATH=${{ env.SDL2_DIR }}/bin:$PATH
70 cmake/test/test_sdlconfig.sh
71 - name: Verify sdl2.pc
72 if: ${{ matrix.platform.name == 'CMake' }}
73 run: |
74 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 }}"
75 export PKG_CONFIG_PATH=${{ env.SDL2_DIR }}/lib/pkgconfig
76 cmake/test/test_pkgconfig.sh
77 - name: Verify Android.mk
78 if: ${{ matrix.platform.name == 'CMake' }}
79 run: |
80 export NDK_MODULE_PATH=${{ env.SDL2_DIR }}/share/ndk-modules
81 ndk-build -C ${{ github.workspace }}/cmake/test APP_PLATFORM=android-${{ matrix.platform.android_platform }} APP_ABI=${{ matrix.platform.android_abi }} NDK_OUT=$PWD NDK_LIBS_OUT=$PWD V=1
diff --git a/src/contrib/SDL-2.30.2/.github/workflows/cpactions.yml b/src/contrib/SDL-2.30.2/.github/workflows/cpactions.yml
new file mode 100644
index 0000000..a2e676f
--- /dev/null
+++ b/src/contrib/SDL-2.30.2/.github/workflows/cpactions.yml
@@ -0,0 +1,51 @@
1name: Build (C/P Actions)
2
3on: [push, pull_request]
4
5jobs:
6 freebsd:
7 runs-on: ubuntu-latest
8 name: FreeBSD
9 timeout-minutes: 30
10 steps:
11 - uses: actions/checkout@v4
12 - name: Build
13 uses: cross-platform-actions/action@v0.23.0
14 with:
15 operating_system: freebsd
16 version: '13.2'
17 shell: bash
18 run: |
19 sudo pkg update
20 sudo pkg install -y \
21 gmake \
22 pkgconf \
23 libXcursor \
24 libXext \
25 libXinerama \
26 libXi \
27 libXfixes \
28 libXrandr \
29 libXScrnSaver \
30 libXxf86vm \
31 wayland \
32 wayland-protocols \
33 libxkbcommon \
34 mesa-libs \
35 libglvnd \
36 evdev-proto \
37 libinotify \
38 alsa-lib \
39 jackit \
40 pipewire \
41 pulseaudio \
42 sndio \
43 dbus \
44 zh-fcitx \
45 ibus \
46 libudev-devd
47 mkdir build_autotools
48 export CPPFLAGS="-I/usr/local/include"
49 export LDFLAGS="-L/usr/local/lib"
50 (cd build_autotools && ../configure --disable-static)
51 gmake -C build_autotools -j`sysctl -n hw.ncpu` V=1
diff --git a/src/contrib/SDL-2.30.2/.github/workflows/emscripten.yml b/src/contrib/SDL-2.30.2/.github/workflows/emscripten.yml
new file mode 100644
index 0000000..ee7974e
--- /dev/null
+++ b/src/contrib/SDL-2.30.2/.github/workflows/emscripten.yml
@@ -0,0 +1,45 @@
1name: Build (Emscripten)
2
3on: [push, pull_request]
4
5jobs:
6 emscripten:
7 runs-on: ubuntu-latest
8 steps:
9 - uses: actions/checkout@v4
10 - uses: mymindstorm/setup-emsdk@v14
11 with:
12 version: 3.1.35
13 - name: Install ninja
14 run: |
15 sudo apt-get -y update
16 sudo apt-get install -y ninja-build
17 - name: Configure CMake
18 run: |
19 emcmake cmake -S . -B build \
20 -DSDL_WERROR=ON \
21 -DSDL_TESTS=ON \
22 -DSDL_INSTALL_TESTS=ON \
23 -DCMAKE_BUILD_TYPE=Release \
24 -DCMAKE_INSTALL_PREFIX=prefix \
25 -GNinja
26 - name: Build
27 run: cmake --build build/ --verbose
28 - name: Run build-time tests
29 run: |
30 set -eu
31 export SDL_TESTS_QUICK=1
32 # FIXME: enable Emscripten build time tests
33 # ctest -VV --test-dir build/
34 - name: Install
35 run: |
36 echo "SDL2_DIR=$(pwd)/prefix" >> $GITHUB_ENV
37 cmake --install build/
38 - name: Verify CMake configuration files
39 run: |
40 emcmake cmake -S cmake/test -B cmake_config_build \
41 -DCMAKE_BUILD_TYPE=Release \
42 -DSDL_VENDOR_INFO="Github Workflow" \
43 -DTEST_SHARED=FALSE \
44 -DCMAKE_PREFIX_PATH=${{ env.SDL2_DIR }}
45 cmake --build cmake_config_build --verbose
diff --git a/src/contrib/SDL-2.30.2/.github/workflows/ios.yml b/src/contrib/SDL-2.30.2/.github/workflows/ios.yml
new file mode 100644
index 0000000..1eb5735
--- /dev/null
+++ b/src/contrib/SDL-2.30.2/.github/workflows/ios.yml
@@ -0,0 +1,20 @@
1name: Build (iOS/tvOS)
2
3on: [push, pull_request]
4
5jobs:
6 Build:
7 name: ${{ matrix.platform.name }}
8 runs-on: macos-latest
9
10 strategy:
11 fail-fast: false
12 matrix:
13 platform:
14 - { name: iOS, target: Static Library-iOS, sdk: iphoneos }
15 - { name: tvOS, target: Static Library-tvOS, sdk: appletvos }
16
17 steps:
18 - uses: actions/checkout@v4
19 - name: Build
20 run: xcodebuild -project Xcode/SDL/SDL.xcodeproj -target '${{ matrix.platform.target }}' -configuration Release -sdk ${{ matrix.platform.sdk }} clean build \ No newline at end of file
diff --git a/src/contrib/SDL-2.30.2/.github/workflows/main.yml b/src/contrib/SDL-2.30.2/.github/workflows/main.yml
new file mode 100644
index 0000000..223d404
--- /dev/null
+++ b/src/contrib/SDL-2.30.2/.github/workflows/main.yml
@@ -0,0 +1,240 @@
1name: Build
2
3on: [push, pull_request]
4
5jobs:
6 Build:
7 name: ${{ matrix.platform.name }}
8 runs-on: ${{ matrix.platform.os }}
9
10 defaults:
11 run:
12 shell: ${{ matrix.platform.shell }}
13
14 strategy:
15 fail-fast: false
16 matrix:
17 platform:
18 - { name: Windows (mingw32), os: windows-latest, shell: 'msys2 {0}', msystem: mingw32, msys-env: mingw-w64-i686 }
19 - { name: Windows (mingw64), os: windows-latest, shell: 'msys2 {0}', msystem: mingw64, msys-env: mingw-w64-x86_64 }
20 - { name: Windows (clang32), os: windows-latest, shell: 'msys2 {0}', msystem: clang32, msys-env: mingw-w64-clang-i686 }
21 - { name: Windows (clang64), os: windows-latest, shell: 'msys2 {0}', msystem: clang64, msys-env: mingw-w64-clang-x86_64 }
22 - { name: Windows (ucrt64), os: windows-latest, shell: 'msys2 {0}', msystem: ucrt64, msys-env: mingw-w64-ucrt-x86_64 }
23 - { name: Ubuntu 20.04 (CMake), os: ubuntu-20.04, shell: sh }
24 - { name: Ubuntu 20.04 (autotools), os: ubuntu-20.04, shell: sh, autotools: true }
25 - { name: Intel oneAPI (Ubuntu 20.04), os: ubuntu-20.04, shell: bash, artifact: 'SDL-ubuntu20.04-oneapi', intel: true,
26 source_cmd: 'source /opt/intel/oneapi/setvars.sh; export CC=icx; export CXX=icx;'}
27 - { name: Intel Compiler (Ubuntu 20.04), os: ubuntu-20.04, shell: bash, artifact: 'SDL-ubuntu20.04-icc', intel: true, cmake: '-DSDL_CLANG_TIDY=OFF',
28 source_cmd: 'source /opt/intel/oneapi/setvars.sh; export CC=icc; export CXX=icpc; export CFLAGS=-diag-disable=10441; export CXXFLAGS=-diag-disable=10441; '}
29
30 - { name: Ubuntu 22.04 (CMake), os: ubuntu-22.04, shell: sh }
31 - { name: Ubuntu 22.04 (autotools), os: ubuntu-22.04, shell: sh, autotools: true }
32 - { name: MacOS (CMake), os: macos-latest, shell: sh, cmake: '-DCMAKE_OSX_ARCHITECTURES="x86_64;arm64"' }
33 - { name: MacOS (autotools), os: macos-latest, shell: sh, autotools: true }
34
35 steps:
36 - name: Set up MSYS2
37 if: matrix.platform.shell == 'msys2 {0}'
38 uses: msys2/setup-msys2@v2
39 with:
40 msystem: ${{ matrix.platform.msystem }}
41 install: >-
42 ${{ matrix.platform.msys-env }}-cc
43 ${{ matrix.platform.msys-env }}-cmake
44 ${{ matrix.platform.msys-env }}-ninja
45 ${{ matrix.platform.msys-env }}-pkg-config
46
47 - name: Setup Linux dependencies
48 if: runner.os == 'Linux'
49 run: |
50 sudo apt-get update
51 sudo apt-get install build-essential git make autoconf automake libtool \
52 pkg-config cmake ninja-build gnome-desktop-testing libasound2-dev libpulse-dev \
53 libaudio-dev libjack-dev libsndio-dev libsamplerate0-dev libx11-dev libxext-dev \
54 libxrandr-dev libxcursor-dev libxfixes-dev libxi-dev libxss-dev libwayland-dev \
55 libxkbcommon-dev libdrm-dev libgbm-dev libgl1-mesa-dev libgles2-mesa-dev \
56 libegl1-mesa-dev libdbus-1-dev libibus-1.0-dev libudev-dev fcitx-libs-dev
57
58 - name: Setup extra Ubuntu 22.04 dependencies
59 if: matrix.platform.os == 'ubuntu-22.04'
60 run: |
61 sudo apt-get install libpipewire-0.3-dev libdecor-0-dev
62
63 - name: Setup Macos dependencies
64 if: runner.os == 'macOS'
65 run: |
66 brew install \
67 ninja \
68 pkg-config
69
70 - name: Setup Intel oneAPI
71 if: matrix.platform.intel
72 run: |
73 # Download the key to system keyring
74 wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB \
75 | gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null
76
77 # Add signed entry to apt sources and configure the APT client to use Intel repository:
78 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
79
80 # Update package list
81 sudo apt-get update -y
82
83 # Install oneAPI
84 sudo apt-get install -y intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic
85
86 - uses: actions/checkout@v4
87 - name: Check that versioning is consistent
88 # We only need to run this once: arbitrarily use the Linux/CMake build
89 if: "runner.os == 'Linux' && ! matrix.platform.autotools"
90 run: ./build-scripts/test-versioning.sh
91 - name: Configure (CMake)
92 if: "! matrix.platform.autotools"
93 run: |
94 ${{ matrix.platform.source_cmd }}
95 cmake -S . -B build -G Ninja \
96 -DSDL_TESTS=ON \
97 -DSDL_WERROR=ON \
98 -DSDL_INSTALL_TESTS=ON \
99 -DSDL_VENDOR_INFO="Github Workflow" \
100 -DCMAKE_INSTALL_PREFIX=cmake_prefix \
101 -DCMAKE_BUILD_TYPE=Release \
102 ${{ matrix.platform.cmake }}
103 - name: Build (CMake)
104 if: "! matrix.platform.autotools"
105 run: |
106 ${{ matrix.platform.source_cmd }}
107 cmake --build build/ --config Release --verbose --parallel
108 - name: Run build-time tests (CMake)
109 if: "! matrix.platform.autotools"
110 run: |
111 ${{ matrix.platform.source_cmd }}
112 set -eu
113 export SDL_TESTS_QUICK=1
114 ctest -VV --test-dir build/ -j2
115 if test "${{ runner.os }}" = "Linux"; then
116 # This should show us the SDL_REVISION
117 strings build/libSDL2-2.0.so.0 | grep SDL-
118 fi
119 - name: Install (CMake)
120 if: "! matrix.platform.autotools"
121 run: |
122 set -eu
123 cmake --install build/ --config Release
124 echo "SDL2_DIR=$(pwd)/cmake_prefix" >> $GITHUB_ENV
125 ( cd cmake_prefix; find ) | LC_ALL=C sort -u
126 - name: Configure (Autotools)
127 if: matrix.platform.autotools
128 run: |
129 ${{ matrix.platform.source_cmd }}
130 set -eu
131 rm -fr build-autotools
132 mkdir build-autotools
133 ./autogen.sh
134 (
135 cd build-autotools
136 ${{ github.workspace }}/configure \
137 --enable-vendor-info="Github Workflow" \
138 --enable-werror \
139 --prefix=${{ github.workspace }}/autotools_prefix \
140 )
141 if test "${{ runner.os }}" != "macOS" ; then
142 curdir="$(pwd)"
143 multiarch="$(dpkg-architecture -qDEB_HOST_MULTIARCH)"
144 (
145 mkdir -p build-autotools/test
146 cd build-autotools/test
147 ${{ github.workspace }}/test/configure \
148 --enable-werror \
149 --x-includes=/usr/include \
150 --x-libraries="/usr/lib/${multiarch}" \
151 --prefix=${{ github.workspace }}/autotools_prefix \
152 SDL_CFLAGS="-I${curdir}/include" \
153 SDL_LIBS="-L${curdir}/build-autotools/build/.libs -lSDL2" \
154 ac_cv_lib_SDL2_ttf_TTF_Init=no \
155 ${NULL+}
156 )
157 fi
158 - name: Build (Autotools)
159 if: matrix.platform.autotools
160 run: |
161 ${{ matrix.platform.source_cmd }}
162 set -eu
163 parallel="$(getconf _NPROCESSORS_ONLN)"
164 make -j"${parallel}" -C build-autotools V=1
165 if test "${{ runner.os }}" != "macOS" ; then
166 make -j"${parallel}" -C build-autotools/test V=1
167 fi
168 - name: Run build-time tests (Autotools)
169 if: ${{ matrix.platform.autotools && (runner.os != 'macOS') }}
170 run: |
171 ${{ matrix.platform.source_cmd }}
172 set -eu
173 curdir="$(pwd)"
174 parallel="$(getconf _NPROCESSORS_ONLN)"
175 export SDL_TESTS_QUICK=1
176 make -j"${parallel}" -C build-autotools/test check LD_LIBRARY_PATH="${curdir}/build-autotools/build/.libs"
177 if test "${{ runner.os }}" = "Linux"; then
178 # This should show us the SDL_REVISION
179 strings "${curdir}/build-autotools/build/.libs/libSDL2-2.0.so.0" | grep SDL-
180 fi
181 - name: Install (Autotools)
182 if: matrix.platform.autotools
183 run: |
184 ${{ matrix.platform.source_cmd }}
185 set -eu
186 curdir="$(pwd)"
187 parallel="$(getconf _NPROCESSORS_ONLN)"
188 make -j"${parallel}" -C build-autotools install V=1
189 if test "${{ runner.os }}" != "macOS" ; then
190 make -j"${parallel}" -C build-autotools/test install V=1
191 fi
192 ( cd autotools_prefix; find . ) | LC_ALL=C sort -u
193 echo "SDL2_DIR=$(pwd)/autotools_prefix" >> $GITHUB_ENV
194 - name: Verify CMake configuration files
195 run: |
196 ${{ matrix.platform.source_cmd }}
197 cmake -S cmake/test -B cmake_config_build -G Ninja \
198 -DCMAKE_BUILD_TYPE=Release \
199 -DCMAKE_PREFIX_PATH=${{ env.SDL2_DIR }}
200 cmake --build cmake_config_build --verbose
201 - name: Verify sdl2-config
202 run: |
203 ${{ matrix.platform.source_cmd }}
204 export PATH=${{ env.SDL2_DIR }}/bin:$PATH
205 cmake/test/test_sdlconfig.sh
206 - name: Verify sdl2.pc
207 run: |
208 ${{ matrix.platform.source_cmd }}
209 export PKG_CONFIG_PATH=${{ env.SDL2_DIR }}/lib/pkgconfig
210 cmake/test/test_pkgconfig.sh
211 - name: Distcheck (Autotools)
212 if: matrix.platform.autotools
213 run: |
214 set -eu
215 parallel="$(getconf _NPROCESSORS_ONLN)"
216 make -j"${parallel}" -C build-autotools dist V=1
217 # Similar to Automake `make distcheck`: check that the tarball
218 # release is sufficient to do a new build
219 mkdir distcheck
220 tar -C distcheck -zxf build-autotools/SDL2-*.tar.gz
221 ( cd distcheck/SDL2-* && ./configure )
222 make -j"${parallel}" -C distcheck/SDL2-*
223 - name: Run installed-tests (Autotools)
224 if: "runner.os == 'Linux' && matrix.platform.autotools"
225 run: |
226 ${{ matrix.platform.source_cmd }}
227 set -eu
228 parallel="$(getconf _NPROCESSORS_ONLN)"
229 sudo make -j"${parallel}" -C build-autotools install
230 sudo make -j"${parallel}" -C build-autotools/test install
231 export SDL_TESTS_QUICK=1
232 # We need to set LD_LIBRARY_PATH because it isn't in the default
233 # linker search path. We don't need to set XDG_DATA_DIRS for
234 # ginsttest-runner, because /usr/local/share *is* in the default
235 # search path for that.
236 env --chdir=/ \
237 LD_LIBRARY_PATH=/usr/local/lib \
238 SDL_AUDIODRIVER=dummy \
239 SDL_VIDEODRIVER=dummy \
240 ginsttest-runner --tap SDL2
diff --git a/src/contrib/SDL-2.30.2/.github/workflows/msvc.yml b/src/contrib/SDL-2.30.2/.github/workflows/msvc.yml
new file mode 100644
index 0000000..241cc55
--- /dev/null
+++ b/src/contrib/SDL-2.30.2/.github/workflows/msvc.yml
@@ -0,0 +1,80 @@
1name: Build (MSVC)
2
3on: [push, pull_request]
4
5jobs:
6 Build:
7 name: ${{ matrix.platform.name }}
8 runs-on: windows-latest
9
10 strategy:
11 fail-fast: false
12 matrix:
13 platform:
14 - { name: Windows (x64), flags: -A x64, project: VisualC/SDL.sln, projectflags: '/p:Platform=x64' }
15 - { name: Windows (x86), flags: -A Win32, project: VisualC/SDL.sln, projectflags: '/p:Platform=Win32' }
16 - { name: Windows static VCRT (x64), flags: -A x64 -DSDL_FORCE_STATIC_VCRT=ON }
17 - { name: Windows static VCRT (x86), flags: -A Win32 -DSDL_FORCE_STATIC_VCRT=ON }
18 - { name: Windows (clang-cl x64), flags: -T ClangCL -A x64 }
19 - { name: Windows (clang-cl x86), flags: -T ClangCL -A Win32 }
20 - { name: Windows (ARM), flags: -A ARM }
21 - { name: Windows (ARM64), flags: -A ARM64 }
22 - { name: UWP (x64), flags: -A x64 -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION="10.0" -DSDL_TESTS=OFF, nowerror: true,
23 project: VisualC-WinRT/SDL-UWP.sln, projectflags: '/p:Platform=x64 /p:WindowsTargetPlatformVersion=10.0.17763.0' }
24
25 steps:
26 - uses: actions/checkout@v4
27 - name: Create CMake project using SDL as a subproject
28 shell: python
29 run: |
30 import os
31 import textwrap
32 srcdir = r"${{ github.workspace }}".replace("\\", "/")
33 builddir = f"{ srcdir }/build"
34 os.makedirs(builddir)
35 with open(f"{ builddir }/CMakeLists.txt", "w") as f:
36 f.write(textwrap.dedent(f"""\
37 # Always build .PDB symbol file
38 set(CMAKE_POLICY_DEFAULT_CMP0141 "NEW" CACHE STRING "MSVC debug information format flags are selected by an abstraction")
39 set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "ProgramDatabase" CACHE STRING "MSVC debug information format")
40 set(CMAKE_EXE_LINKER_FLAGS "-DEBUG" CACHE STRING "Linker flags for executables")
41 set(CMAKE_SHARED_LINKER_FLAGS "-DEBUG" CACHE STRING "Linker flag for shared libraries")
42 cmake_minimum_required(VERSION 3.0...3.25)
43 project(sdl_user)
44 enable_testing()
45 add_subdirectory("{ srcdir }" SDL)
46 """))
47 - name: Configure (CMake)
48 run: cmake -S build -B build `
49 -DSDL_WERROR=${{ !matrix.platform.nowerror }} `
50 -DSDL_TESTS=ON `
51 -DSDL_INSTALL_TESTS=ON `
52 -DSDL_VENDOR_INFO="Github Workflow" `
53 -DSDL2_DISABLE_INSTALL=OFF `
54 ${{ matrix.platform.flags }} `
55 -DCMAKE_INSTALL_PREFIX=prefix
56 - name: Build (CMake)
57 run: cmake --build build/ --config Release --parallel
58 - name: Run build-time tests
59 if: "! contains(matrix.platform.name, 'ARM')"
60 run: |
61 $env:SDL_TESTS_QUICK=1
62 ctest -VV --test-dir build/ -C Release -j2
63 - name: Install (CMake)
64 run: |
65 echo "SDL2_DIR=$Env:GITHUB_WORKSPACE/prefix" >> $Env:GITHUB_ENV
66 cmake --install build/
67 - name: Verify CMake configuration files
68 if: ${{ !contains(matrix.platform.name, 'UWP') }} # FIXME: cmake/test/CMakeLists.txt should support UWP
69 run: |
70 cmake -S cmake/test -B cmake_config_build `
71 -DCMAKE_PREFIX_PATH=${{ env.SDL2_DIR }} `
72 ${{ matrix.platform.flags }}
73 cmake --build cmake_config_build --config Release
74
75 - name: Add msbuild to PATH
76 if: ${{ matrix.platform.project != '' }}
77 uses: microsoft/setup-msbuild@v2
78 - name: Build msbuild
79 if: ${{ matrix.platform.project != '' }}
80 run: msbuild ${{ matrix.platform.project }} /m /p:BuildInParallel=true /p:Configuration=Release ${{ matrix.platform.projectflags }}
diff --git a/src/contrib/SDL-2.30.2/.github/workflows/n3ds.yml b/src/contrib/SDL-2.30.2/.github/workflows/n3ds.yml
new file mode 100644
index 0000000..c7a135a
--- /dev/null
+++ b/src/contrib/SDL-2.30.2/.github/workflows/n3ds.yml
@@ -0,0 +1,55 @@
1name: Build (Nintendo 3DS)
2
3on: [push, pull_request]
4
5jobs:
6 n3ds:
7 runs-on: ubuntu-latest
8 container:
9 image: devkitpro/devkitarm:latest
10 steps:
11 - uses: actions/checkout@v4
12 - name: Install build requirements
13 run: |
14 apt update
15 apt install ninja-build
16 - name: Configure CMake
17 run: |
18 cmake -S . -B build -G Ninja \
19 -DCMAKE_TOOLCHAIN_FILE=${DEVKITPRO}/cmake/3DS.cmake \
20 -DSDL_WERROR=ON \
21 -DSDL_TESTS=ON \
22 -DSDL_INSTALL_TESTS=ON \
23 -DSDL_VENDOR_INFO="Github Workflow" \
24 -DCMAKE_BUILD_TYPE=Release \
25 -DCMAKE_INSTALL_PREFIX=prefix
26 - name: Build
27 run: cmake --build build --verbose
28 - name: Install CMake
29 run: |
30 echo "SDL2_DIR=$(pwd)/prefix" >> $GITHUB_ENV
31 cmake --install build/
32 ( cd prefix; find ) | LC_ALL=C sort -u
33 - name: Verify CMake configuration files
34 run: |
35 cmake -S cmake/test -B cmake_config_build -G Ninja \
36 -DCMAKE_TOOLCHAIN_FILE=${DEVKITPRO}/cmake/3DS.cmake \
37 -DTEST_SHARED=FALSE \
38 -DCMAKE_PREFIX_PATH=${{ env.SDL2_DIR }} \
39 -DCMAKE_BUILD_TYPE=Release
40 cmake --build cmake_config_build --verbose
41 - name: Extract CC/CXX/CFLAGS/CXXFLAGS from CMake toolchain
42 run: |
43 cmake -S .github/cmake -B /tmp/cmake_extract \
44 -DCMAKE_TOOLCHAIN_FILE=${DEVKITPRO}/cmake/3DS.cmake \
45 -DCMAKE_BUILD_TYPE=Release \
46 -DVAR_PATH=/tmp/n3ds_env.txt
47 cat /tmp/n3ds_env.txt >> $GITHUB_ENV
48 - name: Verify sdl2-config
49 run: |
50 export PATH=${{ env.SDL2_DIR }}/bin:$PATH
51 cmake/test/test_sdlconfig.sh
52 - name: Verify sdl2.pc
53 run: |
54 export PKG_CONFIG_PATH=${{ env.SDL2_DIR }}/lib/pkgconfig
55 cmake/test/test_pkgconfig.sh
diff --git a/src/contrib/SDL-2.30.2/.github/workflows/ps2.yaml b/src/contrib/SDL-2.30.2/.github/workflows/ps2.yaml
new file mode 100644
index 0000000..2fb97f2
--- /dev/null
+++ b/src/contrib/SDL-2.30.2/.github/workflows/ps2.yaml
@@ -0,0 +1,73 @@
1name: Build (Sony Playstation 2)
2
3on: [push, pull_request]
4
5jobs:
6 ps2:
7 runs-on: ubuntu-latest
8 container: ps2dev/ps2dev:latest
9 steps:
10 - uses: actions/checkout@v4
11 - name: Setup dependencies
12 run: |
13 apk update
14 apk add cmake gmp mpc1 mpfr4 ninja pkgconf make git
15
16 # To be removed once ps2_drivers is part of PS2DEV
17 - name: Install ps2_drivers lib
18 run: |
19 git clone https://github.com/fjtrujy/ps2_drivers.git
20 cd ps2_drivers
21 make -j $(getconf _NPROCESSORS_ONLN) clean
22 make -j $(getconf _NPROCESSORS_ONLN)
23 make -j $(getconf _NPROCESSORS_ONLN) install
24
25 - name: Configure (CMake)
26 run: |
27 cmake -S . -B build -G Ninja \
28 -DCMAKE_TOOLCHAIN_FILE=$PS2DEV/ps2sdk/ps2dev.cmake \
29 -DSDL_WERROR=ON \
30 -DSDL_TESTS=ON \
31 -DCMAKE_INSTALL_PREFIX=cmake_prefix \
32 -DCMAKE_BUILD_TYPE=Release
33 - name: Build
34 run: cmake --build build --config Release --verbose --parallel
35 - name: Install (CMake)
36 run: |
37 set -eu
38 cmake --install build/ --config Release
39 echo "SDL2_DIR=$(pwd)/cmake_prefix" >> $GITHUB_ENV
40 ( cd cmake_prefix; find ) | LC_ALL=C sort -u
41
42 - name: Verify CMake configuration files
43 run: |
44 cmake -S cmake/test -B cmake_config_build -G Ninja \
45 -DCMAKE_TOOLCHAIN_FILE=$PS2DEV/ps2sdk/ps2dev.cmake \
46 -DTEST_SHARED=FALSE \
47 -DCMAKE_PREFIX_PATH=${{ env.SDL2_DIR }} \
48 -DCMAKE_BUILD_TYPE=Release
49 cmake --build cmake_config_build --verbose
50 - name: Verify sdl2-config
51 run: |
52 export CC=mips64r5900el-ps2-elf-gcc
53 export LDFLAGS="-L$PS2DEV/ps2sdk/ee/lib -L$PS2DEV/gsKit/lib -L$PS2DEV/ps2sdk/ports/lib"
54 export PATH=${{ env.SDL2_DIR }}/bin:$PATH
55 cmake/test/test_sdlconfig.sh
56 - name: Verify sdl2.pc
57 run: |
58 export CC=mips64r5900el-ps2-elf-gcc
59 export LDFLAGS="-L$PS2DEV/ps2sdk/ee/lib -L$PS2DEV/gsKit/lib -L$PS2DEV/ps2sdk/ports/lib"
60 export PKG_CONFIG_PATH=${{ env.SDL2_DIR }}/lib/pkgconfig
61 cmake/test/test_pkgconfig.sh
62
63 - name: Get short SHA
64 id: slug
65 run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"
66
67 - name: Upload artifacts
68 if: ${{ success() }}
69 uses: actions/upload-artifact@v3
70 with:
71 name: tests-${{ steps.slug.outputs.sha8 }}
72 path: |
73 build/test
diff --git a/src/contrib/SDL-2.30.2/.github/workflows/psp.yaml b/src/contrib/SDL-2.30.2/.github/workflows/psp.yaml
new file mode 100644
index 0000000..83e5dc3
--- /dev/null
+++ b/src/contrib/SDL-2.30.2/.github/workflows/psp.yaml
@@ -0,0 +1,50 @@
1name: Build (Sony Playstation Portable)
2
3on: [push, pull_request]
4
5jobs:
6 psp:
7 runs-on: ubuntu-latest
8 container: pspdev/pspdev:latest
9 steps:
10 - uses: actions/checkout@v4
11 - name: Setup dependencies
12 run: |
13 apk update
14 apk add cmake gmp mpc1 mpfr4 make pkgconf
15 - name: Configure CMake
16 run: |
17 cmake -S . -B build \
18 -DCMAKE_TOOLCHAIN_FILE=$PSPDEV/psp/share/pspdev.cmake \
19 -DSDL_WERROR=ON \
20 -DSDL_TESTS=ON \
21 -DSDL_INSTALL_TESTS=ON \
22 -DCMAKE_BUILD_TYPE=Release \
23 -DCMAKE_INSTALL_PREFIX=prefix
24 - name: Build
25 run: cmake --build build --config Release
26 - name: Install
27 run: |
28 echo "SDL2_DIR=$(pwd)/prefix" >> $GITHUB_ENV
29 cmake --install build --config Release
30 ( cd prefix; find ) | LC_ALL=C sort -u
31 - name: Verify CMake configuration files
32 run: |
33 cmake -S cmake/test -B cmake_config_build \
34 -DCMAKE_TOOLCHAIN_FILE=$PSPDEV/psp/share/pspdev.cmake \
35 -DCMAKE_PREFIX_PATH=${{ env.SDL2_DIR }} \
36 -DTEST_SHARED=FALSE \
37 -DCMAKE_BUILD_TYPE=Release
38 cmake --build cmake_config_build --verbose
39 - name: Verify sdl2-config
40 run: |
41 export CC=psp-gcc
42 export LDFLAGS="-L$PSPDEV/lib -L$PSPDEV/psp/lib -L$PSPDEV/psp/sdk/lib"
43 export PATH=${{ env.SDL2_DIR }}/bin:$PATH
44 cmake/test/test_sdlconfig.sh
45 - name: Verify sdl2.pc
46 run: |
47 export CC=psp-gcc
48 export LDFLAGS="-L$PSPDEV/lib -L$PSPDEV/psp/lib -L$PSPDEV/psp/sdk/lib"
49 export PKG_CONFIG_PATH=${{ env.SDL2_DIR }}/lib/pkgconfig
50 cmake/test/test_pkgconfig.sh
diff --git a/src/contrib/SDL-2.30.2/.github/workflows/riscos.yml b/src/contrib/SDL-2.30.2/.github/workflows/riscos.yml
new file mode 100644
index 0000000..9f4c140
--- /dev/null
+++ b/src/contrib/SDL-2.30.2/.github/workflows/riscos.yml
@@ -0,0 +1,68 @@
1name: Build (RISC OS)
2
3on: [push, pull_request]
4
5jobs:
6 Build:
7 name: ${{ matrix.platform.name }}
8 runs-on: ubuntu-latest
9 container: riscosdotinfo/riscos-gccsdk-4.7:latest
10
11 strategy:
12 fail-fast: false
13 matrix:
14 platform:
15 - { name: autotools, test_args: '-DTEST_SHARED=FALSE' } # FIXME: autotools should build and install shared libraries
16 - { name: CMake }
17
18 steps:
19 - name: Setup dependencies
20 run: apt-get update && apt-get install -y cmake ninja-build
21 - uses: actions/checkout@v4
22 - name: Configure (autotools)
23 if: ${{ contains(matrix.platform.name, 'autotools') }}
24 run: |
25 mkdir build_autotools
26 cd build_autotools
27 ../configure \
28 --host=arm-unknown-riscos \
29 --disable-gcc-atomics \
30 --prefix=${{ github.workspace }}/prefix_autotools
31 - name: Build (autotools)
32 if: ${{ contains(matrix.platform.name, 'autotools') }}
33 run: make -C build_autotools -j`nproc` V=1
34 - name: Install (autotools)
35 if: ${{ contains(matrix.platform.name, 'autotools') }}
36 run: |
37 echo "SDL2_DIR=${{ github.workspace }}/prefix_autotools" >> $GITHUB_ENV
38 make -C build_autotools install
39 ( cd ${{ github.workspace }}/prefix_autotools; find ) | LC_ALL=C sort -u
40 - name: Configure (CMake)
41 if: ${{ contains(matrix.platform.name, 'CMake') }}
42 run: |
43 cmake -S . -B build -G Ninja \
44 -DCMAKE_TOOLCHAIN_FILE=/home/riscos/env/toolchain-riscos.cmake \
45 -DRISCOS=ON \
46 -DSDL_GCC_ATOMICS=OFF \
47 -DSDL_TESTS=ON \
48 -DSDL_INSTALL_TESTS=ON \
49 -DSDL_VENDOR_INFO="Github Workflow" \
50 -DCMAKE_BUILD_TYPE=Release \
51 -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/prefix_cmake
52 - name: Build (CMake)
53 if: ${{ contains(matrix.platform.name, 'CMake') }}
54 run: cmake --build build --verbose
55 - name: Install (CMake)
56 if: ${{ contains(matrix.platform.name, 'CMake') }}
57 run: |
58 echo "SDL2_DIR=${{ github.workspace }}/prefix_cmake" >> $GITHUB_ENV
59 cmake --install build/
60 ( cd ${{ github.workspace }}/prefix_cmake; find ) | LC_ALL=C sort -u
61 - name: Verify CMake configuration files
62 run: |
63 cmake -S cmake/test -B cmake_config_build -G Ninja \
64 -DCMAKE_TOOLCHAIN_FILE=/home/riscos/env/toolchain-riscos.cmake \
65 -DCMAKE_PREFIX_PATH=${{ env.SDL2_DIR }} \
66 -DCMAKE_BUILD_TYPE=Release \
67 ${{ matrix.platform.test_args }}
68 cmake --build cmake_config_build --verbose
diff --git a/src/contrib/SDL-2.30.2/.github/workflows/vita.yaml b/src/contrib/SDL-2.30.2/.github/workflows/vita.yaml
new file mode 100644
index 0000000..8089408
--- /dev/null
+++ b/src/contrib/SDL-2.30.2/.github/workflows/vita.yaml
@@ -0,0 +1,95 @@
1name: Build (Sony Playstation Vita)
2
3on: [push, pull_request]
4
5defaults:
6 run:
7 shell: sh
8
9jobs:
10 vita:
11 name: ${{ matrix.platform.name }}
12 runs-on: ubuntu-latest
13 container:
14 image: vitasdk/vitasdk:latest
15 strategy:
16 fail-fast: false
17 matrix:
18 platform:
19 - { name: GLES (pib), os: windows-latest, pib: true }
20 - { name: GLES (PVR_PSP2 + gl4es4vita), os: windows-latest, pvr: true }
21 steps:
22 - uses: actions/checkout@v4
23 - name: Install build requirements
24 run: |
25 apk update
26 apk add cmake ninja pkgconf bash
27
28 - name: Configure PVR_PSP2 (GLES)
29 if: ${{ !!matrix.platform.pvr }}
30 run: |
31 pvr_psp2_version=3.9
32
33 # Configure PVR_PSP2 headers
34 wget https://github.com/GrapheneCt/PVR_PSP2/archive/refs/tags/v$pvr_psp2_version.zip -P/tmp
35 unzip /tmp/v$pvr_psp2_version.zip -d/tmp
36 cp -r /tmp/PVR_PSP2-$pvr_psp2_version/include/* ${VITASDK}/arm-vita-eabi/include
37 rm /tmp/v$pvr_psp2_version.zip
38
39 # Configure PVR_PSP2 stub libraries
40 wget https://github.com/GrapheneCt/PVR_PSP2/releases/download/v$pvr_psp2_version/vitasdk_stubs.zip -P/tmp
41 unzip /tmp/vitasdk_stubs.zip -d/tmp/pvr_psp2_stubs
42 find /tmp/pvr_psp2_stubs -type f -name "*.a" -exec cp {} ${VITASDK}/arm-vita-eabi/lib \;
43 rm /tmp/vitasdk_stubs.zip
44 rm -rf /tmp/pvr_psp2_stubs
45
46 - name: Configure gl4es4vita (OpenGL)
47 if: ${{ !!matrix.platform.pvr }}
48 run: |
49 gl4es4vita_version=1.1.4
50
51 # Configure gl4es4vita headers
52 wget https://github.com/SonicMastr/gl4es4vita/releases/download/v$gl4es4vita_version-vita/include.zip -P/tmp
53 unzip -o /tmp/include.zip -d${VITASDK}/arm-vita-eabi/include
54 rm /tmp/include.zip
55
56 # Configure gl4es4vita stub libraries
57 wget https://github.com/SonicMastr/gl4es4vita/releases/download/v$gl4es4vita_version-vita/vitasdk_stubs.zip -P/tmp
58 unzip /tmp/vitasdk_stubs.zip -d${VITASDK}/arm-vita-eabi/lib
59
60 - name: Configure CMake
61 run: |
62 cmake -S . -B build -G Ninja \
63 -DCMAKE_TOOLCHAIN_FILE=${VITASDK}/share/vita.toolchain.cmake \
64 -DVIDEO_VITA_PIB=${{ !!matrix.platform.pib }} \
65 -DVIDEO_VITA_PVR=${{ !!matrix.platform.pvr }} \
66 -DSDL_WERROR=ON \
67 -DSDL_TESTS=ON \
68 -DSDL_INSTALL_TESTS=ON \
69 -DCMAKE_BUILD_TYPE=Release \
70 -DCMAKE_INSTALL_PREFIX=prefix
71 - name: Build
72 run: cmake --build build --verbose
73 - name: Install CMake
74 run: |
75 echo "SDL2_DIR=$(pwd)/prefix" >> $GITHUB_ENV
76 cmake --install build/
77 ( cd prefix; find ) | LC_ALL=C sort -u
78 - name: Verify CMake configuration files
79 run: |
80 cmake -S cmake/test -B cmake_config_build -G Ninja \
81 -DCMAKE_TOOLCHAIN_FILE=${VITASDK}/share/vita.toolchain.cmake \
82 -DTEST_SHARED=FALSE \
83 -DCMAKE_PREFIX_PATH=${{ env.SDL2_DIR }} \
84 -DCMAKE_BUILD_TYPE=Release
85 cmake --build cmake_config_build --verbose
86 - name: Verify sdl2-config
87 run: |
88 export CC=arm-vita-eabi-gcc
89 export PATH=${{ env.SDL2_DIR }}/bin:$PATH
90 cmake/test/test_sdlconfig.sh
91 - name: Verify sdl2.pc
92 run: |
93 export CC=arm-vita-eabi-gcc
94 export PKG_CONFIG_PATH=${{ env.SDL2_DIR }}/lib/pkgconfig
95 cmake/test/test_pkgconfig.sh
diff --git a/src/contrib/SDL-2.30.2/.github/workflows/watcom.yml b/src/contrib/SDL-2.30.2/.github/workflows/watcom.yml
new file mode 100644
index 0000000..a79cc96
--- /dev/null
+++ b/src/contrib/SDL-2.30.2/.github/workflows/watcom.yml
@@ -0,0 +1,35 @@
1name: Build (OpenWatcom)
2
3on: [push, pull_request]
4
5jobs:
6 os2:
7 name: ${{ matrix.platform.name }}
8 runs-on: windows-latest
9
10 strategy:
11 matrix:
12 platform:
13 - { name: Windows, makefile: Makefile.w32 }
14 - { name: OS/2, makefile: Makefile.os2 }
15
16 steps:
17 - uses: actions/checkout@v4
18 - uses: open-watcom/setup-watcom@v0
19 - name: Build SDL2
20 run: |
21 wmake -f ${{ matrix.platform.makefile }} ENABLE_WERROR=1
22 - name: Build tests
23 run: |
24 cd test && wmake -f ${{ matrix.platform.makefile }} ENABLE_WERROR=1
25 cd ..
26 - name: Run tests
27 if: "matrix.platform.makefile == 'Makefile.w32'"
28 run: |
29 cd test && wmake -f ${{ matrix.platform.makefile }} check-quick
30 cd ..
31 - name: distclean
32 run: |
33 wmake -f ${{ matrix.platform.makefile }} distclean
34 cd test && wmake -f ${{ matrix.platform.makefile }} distclean
35 cd ..