Skip to content

ci: validate embedded GLSL shaders with glslangValidator - #16

Merged
kxxoling merged 1 commit into
mainfrom
ci/glsl-validation
Aug 28, 2026
Merged

ci: validate embedded GLSL shaders with glslangValidator#16
kxxoling merged 1 commit into
mainfrom
ci/glsl-validation

Conversation

@kxxoling

Copy link
Copy Markdown
Owner

GLSL syntax errors in Shaders.kt only surface at runtime on device (the wallpaper goes black; the only hint is a shader-compile line in logcat). Extract each Vertex/Fragment triple-quoted string and validate it with glslangValidator.

Runs as a dedicated Shader Validation workflow (.github/workflows/ shader-validation.yml), fully isolated from the main CI job; current action versions (checkout@v7, setup-java@v6, setup-gradle@v6). The validator is a plain Gradle task in Kotlin - no extra interpreter beyond the JVM Gradle already runs on - and is wired into check for local runs, skipping automatically when glslangValidator is missing.

Also switches settings.gradle.kts from FAIL_ON_PROJECT_REPOS to PREFER_SETTINGS: repositories added by local mirror init scripts (e.g. Aliyun mirrors) otherwise fail the build outright.

@kxxoling
kxxoling force-pushed the ci/glsl-validation branch from 142f38c to 717291c Compare August 28, 2026 02:34
GLSL syntax errors in Shaders.kt only surface at runtime on device
(the wallpaper goes black; the only hint is a shader-compile line in
logcat). Extract each Vertex/Fragment triple-quoted string and
validate it with glslangValidator.

Runs as a dedicated Shader Validation workflow (.github/workflows/
shader-validation.yml), fully isolated from the main CI job; current
action versions (checkout@v7, setup-java@v6, setup-gradle@v6). Cache
matching is strict (gradle-home-cache-strict-match), so this workflow
only consumes cache entries it produced itself and stays independent
of the main CI's cache lifecycle.

The validator is a plain Gradle task in Kotlin - no extra interpreter
beyond the JVM Gradle already runs on - and is wired into check for
local runs, skipping automatically when glslangValidator is missing.
@kxxoling
kxxoling force-pushed the ci/glsl-validation branch from 717291c to a18db42 Compare August 28, 2026 02:40
@kxxoling
kxxoling merged commit 839f961 into main Aug 28, 2026
2 checks passed
@kxxoling
kxxoling deleted the ci/glsl-validation branch August 28, 2026 02:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant