17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-17 08:39:19 +02:00
Files
maszyna/.github/workflows/shaders.yml
2026-10-15 20:26:35 +02:00

52 lines
1.3 KiB
YAML

# .github/workflows/shaders.yml
# UNTRUSTED CONTEXT. This workflow runs fork-authored code and must not reference `secrets.*`.
#
# Checks every shader in shaders/ against GLSL 4.60 (compute stage included) with glslang,
# after the same preprocessing the game does (ci_shadervalidator). No graphics card is needed.
name: Shaders
on:
push:
branches:
- master
paths:
- 'shaders/**'
- 'gl/**'
- 'ci_shadervalidator/**'
- '.github/workflows/shaders.yml'
pull_request:
types: [ opened, reopened, synchronize ]
paths:
- 'shaders/**'
- 'gl/**'
- 'ci_shadervalidator/**'
- '.github/workflows/shaders.yml'
permissions: {}
jobs:
validate:
name: Validate shaders (GLSL 4.60)
runs-on: ubuntu-24.04
permissions:
contents: read
steps:
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0
- name: Install glslang
run: |
sudo apt-get update -y
sudo apt-get install -y glslang-tools
# the validator only needs GLM; the other submodules are not fetched
- name: Fetch GLM
run: git submodule update --init --depth 1 ref/glm
- name: Build the validator
run: ci_shadervalidator/build.sh
- name: Validate shaders
working-directory: ci_shadervalidator
run: ./validateshaders