Skip to content

A workflow for building releases on tag push#47

Merged
doodlum merged 1 commit into
community-shaders:mainfrom
ceejbot:ceej/workflows
Aug 22, 2023
Merged

A workflow for building releases on tag push#47
doodlum merged 1 commit into
community-shaders:mainfrom
ceejbot:ceej/workflows

Conversation

@ceejbot
Copy link
Copy Markdown
Contributor

@ceejbot ceejbot commented Aug 22, 2023

This should help automate building test releases for both branches and the mainline. It takes a lot longer than building on a typical programmer PC with fast disks and warm caches, but it will generate reproducible builds and maybe reduce some of the by-hand work CS contributors are doing.

The workflow generates a mod structure identical to the one the bat files generates, then compresses the result into a 7zip archive. The archive is then uploaded as an asset to a draft GitHub release named for the tag. To publish the release on GitHub, a human must edit the release notes and press the publish button.

This workflow caches the cmake build directory. The vcpkg action caches the vcpkg binary artifacts. Most of the build time is currently spent rebuilding CommonLibSSE-NG because it's pulled in as a git submodule. Figuring out how to cache that build artifact on its own would speed this up a lot. (Maybe pulling it in as a vcpkg release instead? But that decision is above my pay grade.)

ETA: GPL is fine by me.

This should help automate building test releases for both branches
and the mainline. It takes a lot longer than building on a typical
programmer PC with fast disks and warm caches, but it will generate
reproducible builds and maybe reduce some of the by-hand work CS
contributors are doing.

The workflow generates a mod structure identical to the one the bat
files generates, then compresses the result into a 7zip archive.
The archive is then uploaded as an asset to a draft GitHub release
named for the tag. To publish the release on GitHub, a human must
edit the release notes and press the publish button.

This workflow caches the cmake `build` directory. The vcpkg
action caches the vcpkg binary artifacts. Most of the build time
is currently spent rebuilding CommonLibSSE-NG because it's
pulled in as a git submodule. Figuring out how to cache that
build artifact on its own would speed this up a lot. (Maybe pulling
it in as a vcpkg release instead? But that decision is above my
pay grade.)
Copy link
Copy Markdown
Collaborator

@alandtse alandtse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are currently planning to change to a GPL license for the repo. Please note your acceptance of that license change by approving that PR or commenting on that PR.

This is a good start but I believe one common use case we will have are features so we should probably address that use case. For example, if we got the PBR branch integrated, that is likely in the /features directory.

Also, while the GitHub action is one way to do the packaging, it may be worthwhile to do the packaging as part of CMake so it's handled on build.

The last two items I mentioned are suggestions and not required. I believe this is a good start regardless.

@ceejbot
Copy link
Copy Markdown
Contributor Author

ceejbot commented Aug 22, 2023

Comment left on the GPL PR.

The features each get built into their own mods, correct? And there is no build step for them because they're shader-only, IIUC. What we can do is look at the paths changed when a PR lands and build mod archives for just those paths. I can absolutely do that as a next step.

I'd normally build to support whatever the existing workflow is, but I haven't seen a release workflow happen with this project yet. All of these things can be done on PRs landing or tags being pushed, whichever the team prefers. The workflow is also triggerable via workflow dispatch, so you can do something like gh workflow run build.yaml --ref feature-branch to cut a test build reliably.

Copy link
Copy Markdown
Collaborator

@alandtse alandtse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I leave it to @doodlum for final merge.

@alandtse
Copy link
Copy Markdown
Collaborator

Oh, forgot to reply. Yah, personally I'd prefer some action to take the submodule to automatically build the port file. I debated manually creating a port, but then it's too much of a hassle to maintain both.

Yah features are just manually dropping the ini, shaders, etc. into the directory as a separate package. I think doodles is still deciding on how to manage the repo; but I'm all for automation. I'm getting frustrated enough with copying files around that I was going to look at Cmake install step.

@doodlum
Copy link
Copy Markdown
Collaborator

doodlum commented Aug 22, 2023

Merging based on approval by @alandtse

@doodlum doodlum merged commit b32b173 into community-shaders:main Aug 22, 2023
alandtse pushed a commit to alandtse/open-shaders that referenced this pull request Jul 20, 2025
A workflow for building releases on tag push
alandtse added a commit to alandtse/open-shaders that referenced this pull request Apr 26, 2026
All D3D11 resources created by Community Shaders now carry a
descriptive debug name via SetPrivateData(WKPDID_D3DDebugObjectName),
so they appear as e.g. "SSGI::Radiance SRV" in RenderDoc instead
of generic indices like "Texture community-shaders#47".

Changes:
- Buffer.h: add optional `name` parameter to all wrapper class
  constructors (ConstantBuffer, StructuredBuffer, Buffer, Texture1D,
  Texture2D, Texture3D); view creation methods (CreateSRV/UAV/RTV/DSV)
  automatically append " SRV" / " UAV" etc. to the base name.
  detail::SetD3DName delegates to Util::SetResourceName via a forward
  declaration, keeping the GUID definition in one place (D3D.cpp).
- Util::SetResourceName used directly for raw device->Create* objects
  (samplers, blend states, depth-stencil states, rasterizer states,
  raw RTVs/SRVs not owned by a wrapper) across: Deferred, CloudShadows,
  DynamicCubemaps, VolumetricShadows, ScreenSpaceGI, ScreenSpaceShadows,
  Skylighting, TerrainBlending, TerrainShadows, LightLimitFix,
  GrassCollision, HairSpecular, HDRDisplay, IBL, VR, VRStereoOpt,
  VR::StereoBlend, VR::InSceneOverlay, BackgroundBlur, IconLoader,
  Utils::UI.
- .claude/CLAUDE.md: add DRY pitfall note for cross-cutting refactors.

No behaviour change; naming calls are init-time only with zero
per-frame overhead.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
alandtse added a commit to alandtse/open-shaders that referenced this pull request Apr 26, 2026
All D3D11 resources created by Community Shaders now carry a
descriptive debug name via SetPrivateData(WKPDID_D3DDebugObjectName),
so they appear as e.g. "SSGI::Radiance SRV" in RenderDoc instead
of generic indices like "Texture community-shaders#47".

Changes:
- Buffer.h: add optional `name` parameter to all wrapper class
  constructors (ConstantBuffer, StructuredBuffer, Buffer, Texture1D,
  Texture2D, Texture3D); view creation methods (CreateSRV/UAV/RTV/DSV)
  automatically append " SRV" / " UAV" etc. to the base name.
  detail::SetD3DName delegates to Util::SetResourceName via a forward
  declaration, keeping the GUID definition in one place (D3D.cpp).
- Util::SetResourceName used directly for raw device->Create* objects
  (samplers, blend states, depth-stencil states, rasterizer states,
  raw RTVs/SRVs not owned by a wrapper) across: Deferred, CloudShadows,
  DynamicCubemaps, VolumetricShadows, ScreenSpaceGI, ScreenSpaceShadows,
  Skylighting, TerrainBlending, TerrainShadows, LightLimitFix,
  GrassCollision, HairSpecular, HDRDisplay, IBL, VR, VRStereoOpt,
  VR::StereoBlend, VR::InSceneOverlay, BackgroundBlur, IconLoader,
  Utils::UI.
- .claude/CLAUDE.md: document D3D resource naming convention and
  add DRY pitfall note for cross-cutting refactors.

No behaviour change; naming calls are init-time only with zero
per-frame overhead.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

3 participants