Skip to content

Commit 6eb185b

Browse files
committed
CI Linux: build SDL3
based on 9eb376e
1 parent 6503b92 commit 6eb185b

File tree

4 files changed

+44
-2
lines changed

4 files changed

+44
-2
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/sh -eu
2+
3+
mkdir -p /var/tmp/sdl
4+
cd /var/tmp/sdl
5+
6+
git clone --depth 1 https://github.com/libsdl-org/SDL
7+
cd SDL
8+
cmake -S . -B build
9+
cmake --build build -j "$(nproc)"
10+
sudo cmake --install build
11+
cd ..
12+
13+
git clone --depth 1 https://github.com/libsdl-org/SDL_ttf
14+
cd SDL_ttf
15+
cmake -S . -B build
16+
cmake --build build -j "$(nproc)"
17+
sudo cmake --install build
18+
cd ..
19+
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/sh -eu
2+
3+
cd /var/tmp/sdl/SDL
4+
sudo cmake --install build
5+
cd ../SDL_ttf
6+
sudo cmake --install build
7+

.github/scripts/Linux/prepare.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ sudo apt install libfluidsynth-dev
2424
sudo apt install libglew-dev libglfw3-dev
2525
sudo apt install libglm-dev
2626
sudo apt install imagemagick libmagickwand-dev
27-
sudo apt install libsdl2-dev libsdl2-ttf-dev
2827
sudo apt install libsoxr-dev libspeexdsp-dev
2928
sudo apt install libssl-dev
3029
sudo apt install libasound-dev libcaca-dev libjack-jackd2-dev libnatpmp-dev libv4l-dev portaudio19-dev
@@ -36,7 +35,12 @@ get_build_deps_excl() { # $2 - pattern to exclude; separate packates with '\|' (
3635
apt-cache showsrc "$1" | sed -n '/^Build-Depends:/{s/Build-Depends://;p;q}' | tr ',' '\n' | cut -f 2 -d\ | grep -v "$2"
3736
}
3837

39-
ffmpeg_build_dep=$(get_build_deps_excl ffmpeg 'nonexistent-placeholder')
38+
sudo apt build-dep libsdl2
39+
sdl2_ttf_build_dep=$(get_build_deps_excl libsdl2-ttf libsdl2-dev)
40+
# shellcheck disable=SC2086 # intentional
41+
sudo apt install $sdl2_ttf_build_dep
42+
43+
ffmpeg_build_dep=$(get_build_deps_excl ffmpeg 'libsdl')
4044
# shellcheck disable=SC2086 # intentional
4145
sudo apt install $ffmpeg_build_dep libdav1d-dev libde265-dev libopenh264-dev
4246
sudo apt-get -y remove 'libavcodec*' 'libavutil*' 'libswscale*' libvpx-dev nginx

.github/workflows/ccpp.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,18 @@ jobs:
9191
- name: Install Cached FFmpeg
9292
if: steps.cache-ffmpeg.outputs.cache-hit == 'true'
9393
run: .github/scripts/Linux/install_ffmpeg.sh
94+
- name: Cache SDL
95+
id: cache-sdl
96+
uses: actions/cache@v3
97+
with:
98+
path: '/var/tmp/sdl'
99+
key: cache-sdl-${{ runner.os }}-${{ hashFiles( '.github/scripts/Linux/prepare.sh', '.github/scripts/Linux/download_build_sdl.sh' ) }}
100+
- name: Build SDL
101+
if: steps.cache-sdl.outputs.cache-hit != 'true'
102+
run: .github/scripts/Linux/download_build_sdl.sh
103+
- name: Install Cached SDL
104+
if: steps.cache-sdl.outputs.cache-hit == 'true'
105+
run: .github/scripts/Linux/install_sdl.sh
94106
- name: configure
95107
run: "./autogen.sh $FEATURES || { RC=$?; cat config.log; exit $RC; }"
96108
- name: make

0 commit comments

Comments
 (0)