Skip to content

fix ci; build sdl3_mixer, sdl3_image, and sdl3_ttf in addition to sdl… #2177

fix ci; build sdl3_mixer, sdl3_image, and sdl3_ttf in addition to sdl…

fix ci; build sdl3_mixer, sdl3_image, and sdl3_ttf in addition to sdl… #2177

Workflow file for this run

name: General CI
on:
push:
paths-ignore:
- "**.md"
pull_request:
paths-ignore:
- "**.md"
jobs:
ubuntu-tcc:
runs-on: ubuntu-latest
timeout-minutes: 30
env:
VFLAGS: -cc tcc -no-retry-compilation
SDL3_VERSION: 3.4.0
SDL3_TTF_VERSION: 3.2.2
SDL3_MIXER_VERSION: 3.1.2
SDL3_IMAGE_VERSION: 3.4.0
steps:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install build-essential git make \
pkg-config cmake ninja-build gnome-desktop-testing libasound2-dev libpulse-dev \
libaudio-dev libjack-dev libsndio-dev libx11-dev libxext-dev libxtst-dev \
libxrandr-dev libxcursor-dev libxfixes-dev libxi-dev libxss-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 \
libpipewire-0.3-dev libwayland-dev libdecor-0-dev liburing-dev
- name: Download and unpack source versions of the SDL3 libs
run: |
curl -L https://www.libsdl.org/release/SDL3-${SDL3_VERSION}.tar.gz -o SDL3.tar.gz
curl -L https://www.libsdl.org/projects/SDL_ttf/release/SDL3_ttf-${SDL3_TTF_VERSION}.tar.gz -o SDL3_ttf.tar.gz
curl -L https://www.libsdl.org/projects/SDL_mixer/release/SDL3_mixer-${SDL3_MIXER_VERSION}.tar.gz -o SDL3_mixer.tar.gz
curl -L https://www.libsdl.org/projects/SDL_image/release/SDL3_image-${SDL3_IMAGE_VERSION}.tar.gz -o SDL3_image.tar.gz
tar -zxvf SDL3.tar.gz
tar -zxvf SDL3_ttf.tar.gz
tar -zxvf SDL3_mixer.tar.gz
tar -zxvf SDL3_image.tar.gz
- name: Build SDL3
run: |
cd SDL3-${SDL3_VERSION}
cmake -S . -B build
cmake --build build
sudo cmake --install build
- name: Build SDL3_TTF
run: |
cd SDL3_${SDL3_TTF_VERSION}
cmake -S . -B build
cmake --build build
sudo cmake --install build
- name: Build SDL3_MIXER
run: |
cd SDL3_${SDL3_MIXER_VERSION}
cmake -S . -B build
cmake --build build
sudo cmake --install build
- name: Build SDL3_IMAGE
run: |
cd SDL3_${SDL3_IMAGE_VERSION}
cmake -S . -B build
cmake --build build
sudo cmake --install build
- name: Install V
uses: vlang/setup-v@v1.4
with:
check-latest: true
- name: Checkout SDL
uses: actions/checkout@v4
with:
path: sdl
- name: Link local SDL folder in ~/.vmodules/sdl
run: |
cd sdl
mkdir -p ~/.vmodules
ln -s $(pwd) ~/.vmodules/sdl
- name: Run ~/.vmodules/sdl/setup.vsh
run: |
v ~/.vmodules/sdl/setup.vsh
- name: Test code formatting
run: |
cd sdl
v test-fmt
v fmt -verify .
- name: Build sdl shared
run: |
v -shared -g sdl
- name: Run tests
run: v test sdl
- name: Build sdl examples
run: |
# v shader sdl/examples/sdl_opengl_and_sokol
v run sdl/examples/versions
v should-compile-all sdl/examples/
- name: Test SDL version
run: |
VER="$(v run sdl/examples/version)"
echo "${SDL3_VERSION} == $VER ?"
test "${SDL3_VERSION}" = "$VER" || exit 1
ubuntu-tcc-no-skip-unused:
runs-on: ubuntu-latest
timeout-minutes: 30
env:
VFLAGS: -cc tcc -no-retry-compilation -no-skip-unused
SDL3_VERSION: 3.4.0
steps:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install build-essential git make \
pkg-config cmake ninja-build gnome-desktop-testing libasound2-dev libpulse-dev \
libaudio-dev libjack-dev libsndio-dev libx11-dev libxext-dev libxtst-dev \
libxrandr-dev libxcursor-dev libxfixes-dev libxi-dev libxss-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 \
libpipewire-0.3-dev libwayland-dev libdecor-0-dev liburing-dev
- name: Download and unpack source versions of the SDL3 libs
run: |
curl -L https://www.libsdl.org/release/SDL3-${SDL3_VERSION}.tar.gz -o SDL3.tar.gz
curl -L https://www.libsdl.org/projects/SDL_ttf/release/SDL3_ttf-${SDL3_TTF_VERSION}.tar.gz -o SDL3_ttf.tar.gz
curl -L https://www.libsdl.org/projects/SDL_mixer/release/SDL3_mixer-${SDL3_MIXER_VERSION}.tar.gz -o SDL3_mixer.tar.gz
curl -L https://www.libsdl.org/projects/SDL_image/release/SDL3_image-${SDL3_IMAGE_VERSION}.tar.gz -o SDL3_image.tar.gz
tar -zxvf SDL3.tar.gz
tar -zxvf SDL3_ttf.tar.gz
tar -zxvf SDL3_mixer.tar.gz
tar -zxvf SDL3_image.tar.gz
- name: Build SDL
run: |
cd SDL3-${SDL3_VERSION}
cmake -S . -B build
cmake --build build
sudo cmake --install build
- name: Build SDL3_TTF
run: |
cd SDL3_${SDL3_TTF_VERSION}
cmake -S . -B build
cmake --build build
sudo cmake --install build
- name: Build SDL3_MIXER
run: |
cd SDL3_${SDL3_MIXER_VERSION}
cmake -S . -B build
cmake --build build
sudo cmake --install build
- name: Build SDL3_IMAGE
run: |
cd SDL3_${SDL3_IMAGE_VERSION}
cmake -S . -B build
cmake --build build
sudo cmake --install build
- name: Install V
uses: vlang/setup-v@v1.4
with:
check-latest: true
- name: Checkout SDL
uses: actions/checkout@v4
with:
path: sdl
- name: Link local SDL folder in ~/.vmodules/sdl
run: |
cd sdl
mkdir -p ~/.vmodules
ln -s $(pwd) ~/.vmodules/sdl
- name: Run ~/.vmodules/sdl/setup.vsh
run: |
v ~/.vmodules/sdl/setup.vsh
- name: Test code formatting
run: |
cd sdl
v test-fmt
v fmt -verify .
- name: Build sdl shared
run: |
v -shared -g sdl
- name: Run tests
run: v test sdl
- name: Build sdl examples
run: |
# v shader sdl/examples/sdl_opengl_and_sokol
v run sdl/examples/versions
v should-compile-all sdl/examples/
- name: Test SDL version
run: |
VER="$(v run sdl/examples/version)"
echo "${SDL3_VERSION} == $VER ?"
test "${SDL3_VERSION}" = "$VER" || exit 1