examples: add additional comments and use short enum identifiers on `… #1228
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.2.0 | |
steps: | |
- name: Install dependencies | |
run: | | |
curl -L https://www.libsdl.org/release/SDL3-${SDL3_VERSION}.tar.gz -o SDL3.tar.gz | |
tar -zxvf SDL3.tar.gz | |
- name: Build SDL | |
run: | | |
cd SDL3-${SDL3_VERSION} | |
cmake -S . -B build | |
cmake --build build | |
sudo cmake --install build | |
- name: Install V | |
uses: vlang/setup-v@v1 | |
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 | |