-
Notifications
You must be signed in to change notification settings - Fork 21
Shaders should be built by CI #688
Description
Build Info
Description
Since we've decoupled the code repo from the binaries, we currently have a kind of clunky system for shaders authoring whereby the shader change requires:
- PR in the code repo for code changes
- PR in the binary repo for the built shader
This is a lot of redundant work both for the PR author and reviewers having to validate & keep both PRs in sync, and is kind of error prone (subtle errors if the wrong version of a shader was committed, producing some kind of nonobvious visual bug, etc).
Ideally, we should have a CI pipeline that triggers for changes in mp/src/materialsystem, builds all the shaders, fails the CI run on error, and finally pushes the built artifacts to the assets repo for an accepted PR. This way, we can just push the code and have the shaders generated automatically.
I have a rough sketch of this in the works, but it could look something like this:
flowchart
AR("neoAssets repo")
CR("neo repo")
L["Linux makefiles"]
C["CMakeLists"]
W["Windows makefiles"]
S["Shaders makefiles"]
CR -->|has| C
AR <-->|downloads assets from| C
C -->|generates| W
C -->|generates| S
C -->|generates| L
W -->|builds| WB["Windows build"]
L -->|builds| LB["Linux build"]
S -->|builds| SB["Shaders build"]
SB -->|pushes| AR2["neoAssets repo commit"]
WB -->|combines into| R["Release"]
AR2 -->|combines into| R
LB -->|combines into| R
To Reproduce
Write some shader code.
Expected behavior
CI attempts to build your shader code. When your PR is accepted, the shader artifacts get automatically added to the assets repo.
Actual behavior
The code/binary have to be manually kept in sync across repos.
Operating System
- Windows
- Linux
Version/Distro
N/A
Additional context and Screenshots
For context, here's one such pair of PRs for a shader change:
using our current workflow of:
- Author commits code PR
- Author builds the shader binary data
- Author commits binary PR
- Reviewers build the shader & review the PR
- Reviewers validate the shader binary works correctly & matches the code PR
when ideally this could be simply:
- Author commits code PR
- Reviewers build the shader (or grab the generated one from CI for convenience) & review the PR
Metadata
Metadata
Assignees
Labels
Type
Projects
Status