Skip to content

Extract cmake action#485

Merged
RandyGaul merged 8 commits intoRandyGaul:masterfrom
pusewicz:extract-cmake-action
Mar 1, 2026
Merged

Extract cmake action#485
RandyGaul merged 8 commits intoRandyGaul:masterfrom
pusewicz:extract-cmake-action

Conversation

@pusewicz
Copy link
Copy Markdown
Contributor

@pusewicz pusewicz commented Mar 1, 2026

This removes the duplicated code and re-uses the same action.

Adds missing dependencies for CMake build in documentation.

Includes #484

pusewicz added 3 commits March 1, 2026 09:37
This removes the duplicated code and re-uses the same action.
Copilot AI review requested due to automatic review settings March 1, 2026 08:42
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR extracts the repeated “install CMake + Ninja” logic into a shared composite GitHub Action and updates workflows to reuse it, while also enabling the documentation workflow to run on pull requests (per #484).

Changes:

  • Add a composite action at .github/actions/setup-cmake to install CMake 4.2.3 + Ninja via lukka/get-cmake.
  • Replace duplicated CMake setup steps in build.yml and documentation.yml with the new local action.
  • Trigger documentation.yml on pull_request in addition to push and workflow_dispatch.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
.github/workflows/documentation.yml Adds PR trigger and reuses the shared CMake setup action.
.github/workflows/build.yml Replaces duplicated CMake setup blocks with the shared action in multiple jobs.
.github/actions/setup-cmake/action.yml Introduces a composite action encapsulating CMake/Ninja setup.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 3 to 7
on:
push:
branches: [master]
pull_request:
workflow_dispatch:
Copy link

Copilot AI Mar 1, 2026

Choose a reason for hiding this comment

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

With the new pull_request trigger, the workflow-level permissions (pages: write, id-token: write) will also apply to PR runs. Consider scoping these elevated permissions more tightly (e.g., job-level permissions only where required), especially since the deploy job already declares pages/id-token explicitly and doesn’t run on PRs.

Copilot uses AI. Check for mistakes.
with:
cmakeVersion: 4.2.3
ninjaVersion: latest
- uses: ./.github/actions/setup-cmake
Copy link

Copilot AI Mar 1, 2026

Choose a reason for hiding this comment

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

This step invokes a local action without a name, so the Actions UI will show a less descriptive default label. Consider adding an explicit name: Setup CMake for clearer logs and easier troubleshooting.

Suggested change
- uses: ./.github/actions/setup-cmake
- name: Setup CMake
uses: ./.github/actions/setup-cmake

Copilot uses AI. Check for mistakes.
- name: Checkout repository
uses: actions/checkout@v4

- uses: ./.github/actions/setup-cmake
Copy link

Copilot AI Mar 1, 2026

Choose a reason for hiding this comment

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

This step invokes a local action without a name, so the Actions UI will show a less descriptive default label. Consider adding an explicit name: Setup CMake for clearer logs and easier troubleshooting.

Suggested change
- uses: ./.github/actions/setup-cmake
- name: Setup CMake
uses: ./.github/actions/setup-cmake

Copilot uses AI. Check for mistakes.
Comment on lines +8 to +11
uses: lukka/get-cmake@latest
with:
cmakeVersion: 4.2.3
ninjaVersion: latest
Copy link

Copilot AI Mar 1, 2026

Choose a reason for hiding this comment

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

uses: lukka/get-cmake@latest makes builds non-reproducible and increases supply-chain risk if the upstream action changes. Prefer pinning to a specific release tag or commit SHA (and consider pinning the Ninja version too) so CI behavior is stable over time.

Suggested change
uses: lukka/get-cmake@latest
with:
cmakeVersion: 4.2.3
ninjaVersion: latest
uses: lukka/get-cmake@v3
with:
cmakeVersion: 4.2.3
ninjaVersion: 1.11.1

Copilot uses AI. Check for mistakes.
pusewicz and others added 5 commits March 1, 2026 09:47
Moves apt-get install earlier (before cmake configure) and adds the
OpenGL packages needed to satisfy find_package(OpenGL). Also consolidates
the two install steps: apt packages up front, pip packages after Python setup.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The native build only produces cute-shaderc (a CLI tool), so all SDL
audio, video, input, and platform backends can be turned off to speed
up configuration and avoid missing-library errors on the CI runner.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add gh_annotation helper with gh_debug, gh_notice, and gh_warn wrappers
that emit ::debug::, ::notice::, and ::warning:: annotations on CI and
fall back to plain puts/warn locally. Paths in messages are relative to pwd.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@RandyGaul RandyGaul merged commit a611d6f into RandyGaul:master Mar 1, 2026
23 checks passed
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