Skip to content

fix ci#721

Closed
AlexInLog wants to merge 6 commits into
v2from
fix_ci
Closed

fix ci#721
AlexInLog wants to merge 6 commits into
v2from
fix_ci

Conversation

@AlexInLog

@AlexInLog AlexInLog commented Aug 25, 2025

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • Chores
    • CI updated to ensure the Python templating package (Jinja2) is installed early so dependency tooling can run reliably.
    • SFML dependency bumped from 2.6.1 to 2.6.2 when the SFML option is enabled.
    • Build configuration: added a hidden macOS preset that introduces a new compiler warning flag and updated macOS presets to inherit from it.
    • No other user-facing behavior changes.

@coderabbitai

coderabbitai Bot commented Aug 25, 2025

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

Added a CI step to install Jinja2 for Conan; bumped SFML from 2.6.1 to 2.6.2 in the conan recipe; introduced a hidden macOS configure preset that adds -Wmissing-template-arg-list-after-template-kw and updated macOS presets to inherit from it.

Changes

Cohort / File(s) Summary of Changes
CI workflow update
\.github/workflows/ci v2.yml
Inserted a new step in the cache_deps job named "Ensure Jinja2 available to Conan" running python -m pip install --upgrade "Jinja2>=3.1.5,<3.2", placed after "get conan" and before "check cache".
Conan recipe version bump
conanfile.py
Updated sfml dependency from 2.6.12.6.2 in requirements() when with_sfml is true; options unchanged.
CMake presets (macOS)
CMakePresets.json
Added hidden preset ci-macos (inherits ci-unix) that sets CMAKE_CXX_FLAGS to -Wmissing-template-arg-list-after-template-kw; updated macOS-related presets to inherit from ci-macos instead of ci-unix.

Sequence Diagram(s)

sequenceDiagram
    participant GH as GitHub Actions
    participant Job as cache_deps job
    participant Py as Python env
    participant Conan as Conan
    Note over GH,Job: ci v2 — cache_deps job
    GH->>Job: start
    Job->>Py: setup-python
    Job->>Conan: get conan
    rect rgba(120,180,240,0.12)
    Job->>Py: Ensure Jinja2 available to Conan\n(python -m pip install --upgrade "Jinja2>=3.1.5,<3.2")
    end
    Job->>Job: check cache
    Job->>GH: continue subsequent steps
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • try to speedup cache #663 — Modifies the same cache_deps job in ci v2.yml (step ordering / cache handling); strongly related to the workflow insertion here.

Poem

I hopped into workflows at night,
pip-sprinkled Jinja2 just right,
SFML nudged up a little more,
macOS flags add one small roar,
— a rabbit's nudge to keep builds bright 🐇

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix_ci

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore or @coderabbit ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
.github/workflows/ci v2.yml (1)

43-44: Minor robustness: prefer python -m pip over bare pip.

On Windows runners, pip may not be on PATH; python -m pip reliably targets the interpreter set by actions/setup-python. This avoids PATH quirks and mixed interpreters.
Apply:

-    - run: pip install jinja2
+    - run: python -m pip install jinja2
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 752f108 and 0274ab2.

📒 Files selected for processing (1)
  • .github/workflows/ci v2.yml (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Cache deps on ci-ubuntu-gcc for Release
  • GitHub Check: Cache deps on ci-ubuntu-clang for Debug
🔇 Additional comments (1)
.github/workflows/ci v2.yml (1)

43-44: Ensure Jinja2 is available wherever Conan runs

The cache_deps job in ci v2.yml installs Jinja2 explicitly before calling Conan, but other workflows that invoke Conan do not. If the get-conan action does not pull in Jinja2 as a dependency, those jobs will break at recipe/render time. Please verify and, if necessary, add a pip install jinja2 step in:

  • .github/workflows/analyzers.yml
    – jobs pvs and sonarcloud_and_coverage both use
    uses: turtlebrowser/get-conan@main without installing Jinja2.
  • Any additional jobs across workflows that rely on Conan without first ensuring Jinja2 is present.

Suggested diff for each affected job:

     - uses: actions/setup-python@v5
       with:
         python-version: '3.x'
+    - run: pip install jinja2
     - name: get conan
       uses: turtlebrowser/get-conan@main

Comment thread .github/workflows/ci v2.yml Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
conanfile.py (1)

35-35: Option passthrough (nice-to-have): let consumers decide audio

If you ever need SFML audio in some builds, expose it as a package option instead of hard-disabling.

Apply on this line:

-            self.requires("sfml/2.6.2", options={"audio": False})
+            self.requires("sfml/2.6.2", options={"audio": self.options.sfml_audio})

And add outside this hunk:

# In options:
"sfml_audio": [False, True]
# In default_options:
"sfml_audio": False
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between e2904cd and 9581875.

📒 Files selected for processing (1)
  • conanfile.py (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
  • GitHub Check: Cache deps on ci-ubuntu-gcc for Debug
  • GitHub Check: Cache deps on ci-macos for Debug
  • GitHub Check: Cache deps on ci-windows for Release
  • GitHub Check: Cache deps on ci-macos for Release
  • GitHub Check: Cache deps on ci-ubuntu-clang for Release
  • GitHub Check: Cache deps on ci-windows for Debug
  • GitHub Check: Cache deps on ci-ubuntu-clang for Debug
  • GitHub Check: Cache deps on ci-ubuntu-gcc for Release
🔇 Additional comments (2)
conanfile.py (2)

35-35: SFML bump to 2.6.2 looks good

2.6.2 is available on ConanCenter and is a patch update, so this change is low risk. Keeping audio disabled matches the prior behavior. (conan.io)


35-35: Sanity-check SFML 2.6.2 availability in your CI remote
Conan CLI isn’t available here—please manually verify that sfml/2.6.2 is resolvable in your CI remote (e.g., run conan list "sfml/2.6.2" -r <your_remote> and optionally conan graph info --requires=sfml/2.6.2 -r <your_remote>).

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 9581875 and c84cd76.

📒 Files selected for processing (1)
  • CMakePresets.json (1 hunks)

Comment thread CMakePresets.json Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (1)
CMakePresets.json (1)

62-69: Scope the warning to Clang to avoid future GCC-on-mac surprises.

Even on macOS, users could switch CXX to GCC; unknown -W… with -Werror will fail. Guard via generator expression (see alternative diff above).

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between c84cd76 and 5f6f04f.

📒 Files selected for processing (1)
  • CMakePresets.json (5 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
  • GitHub Check: Cache deps on ci-windows for Release
  • GitHub Check: Cache deps on ci-windows for Debug
  • GitHub Check: Cache deps on ci-ubuntu-gcc for Debug
  • GitHub Check: Cache deps on ci-ubuntu-clang for Release
  • GitHub Check: Cache deps on ci-macos for Release
  • GitHub Check: Cache deps on ci-macos for Debug
  • GitHub Check: Cache deps on ci-ubuntu-clang for Debug
  • GitHub Check: Cache deps on ci-ubuntu-gcc for Release
🔇 Additional comments (4)
CMakePresets.json (4)

230-231: Good isolation of macOS-specific flags via ci-macos.

Switching ci-macos-tests to inherit from ci-macos keeps the warning scoped to macOS as intended.


252-254: Consistent scoping for benchmarks.

ci-macos-benchmarks inheriting ci-macos mirrors tests; looks correct.


270-276: User macOS tests preset update looks good.

Inheriting ci-macos ensures local macOS users get the same flags as CI.


308-313: User macOS benchmarks preset update looks good.

Consistent with tests preset; no issues.

Comment thread CMakePresets.json
Comment on lines +62 to +69
{
"name": "ci-macos",
"hidden": true,
"inherits": ["ci-unix"],
"cacheVariables": {
"CMAKE_CXX_FLAGS": "-Wmissing-template-arg-list-after-template-kw"
}
},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Don’t overwrite inherited CMAKE_CXX_FLAGS in ci-macos (drops -Wall/-Werror/etc.).

Setting CMAKE_CXX_FLAGS here replaces flags from flags-unix. Append instead.

Apply one of these:

-        "CMAKE_CXX_FLAGS": "-Wmissing-template-arg-list-after-template-kw"
+        "CMAKE_CXX_FLAGS": "$cache{CMAKE_CXX_FLAGS} -Wmissing-template-arg-list-after-template-kw"

Or guarded (Clang-only):

-        "CMAKE_CXX_FLAGS": "-Wmissing-template-arg-list-after-template-kw"
+        "CMAKE_CXX_FLAGS": "$cache{CMAKE_CXX_FLAGS} $<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>>:-Wmissing-template-arg-list-after-template-kw>"

Quick check to ensure flags are preserved and the warning is accepted by AppleClang:


🏁 Script executed:

#!/bin/bash
set -euo pipefail
# 1) Confirm effective flags include both the base set and the new warning
cmake --preset ci-macos-tests -LAH | sed -n 's/^CMAKE_CXX_FLAGS:.*=//p'
# 2) Probe AppleClang accepts the flag (should emit no diagnostics)
echo 'int main(){}' | clang++ -std=c++20 -Werror -Wno-unknown-warning-option -Wmissing-template-arg-list-after-template-kw -x c++ -c -

Length of output: 189


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Locate CMakePresets.json
preset_file=$(fd CMakePresets.json -t f | head -1)
echo "Using CMakePresets file: $preset_file"

# Show snippet for ci-unix preset (inherited flags)
echo "---- ci-unix preset snippet ----"
rg -nP '"name"\s*:\s*"ci-unix"' -A6 -B2 "$preset_file"

# Show snippet for ci-macos preset
echo "---- ci-macos preset snippet ----"
rg -nP '"name"\s*:\s*"ci-macos"' -A6 -B2 "$preset_file"

Length of output: 924


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Show flags-unix preset snippet (inherited by ci-unix → ci-macos)
rg -nP '"name"\s*:\s*"flags-unix"' -A8 -B2 CMakePresets.json

# Check for ci-macos-tests preset referenced in the review
rg -nP '"name"\s*:\s*"ci-macos-tests"' -nC1 CMakePresets.json || echo "ci-macos-tests preset not found"

Length of output: 1095


Preserve inherited CMAKE_CXX_FLAGS in the ci-macos preset
Overriding here drops the base flags (-Wall, -Werror, etc.). Change:

-        "CMAKE_CXX_FLAGS": "-Wmissing-template-arg-list-after-template-kw"
+        "CMAKE_CXX_FLAGS": "$cache{CMAKE_CXX_FLAGS} -Wmissing-template-arg-list-after-template-kw"

(or guard with a Clang-only generator expression if preferred)

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
{
"name": "ci-macos",
"hidden": true,
"inherits": ["ci-unix"],
"cacheVariables": {
"CMAKE_CXX_FLAGS": "-Wmissing-template-arg-list-after-template-kw"
}
},
{
"name": "ci-macos",
"hidden": true,
"inherits": ["ci-unix"],
"cacheVariables": {
"CMAKE_CXX_FLAGS": "$cache{CMAKE_CXX_FLAGS} -Wmissing-template-arg-list-after-template-kw"
}
},
🤖 Prompt for AI Agents
In CMakePresets.json around lines 62–69, the ci-macos preset currently replaces
CMAKE_CXX_FLAGS and drops inherited flags like -Wall/-Werror; instead preserve
the base flags by appending the macOS-specific flag rather than overriding, or
conditionally add it only for Clang via a generator expression. Update the
cacheVariables entry so it expands the existing CMAKE_CXX_FLAGS and appends "
-Wmissing-template-arg-list-after-template-kw" (or wrap that flag in a
Clang-only generator expression) to retain inherited warnings and errors.

@AlexInLog AlexInLog closed this Sep 5, 2025
@AlexInLog AlexInLog deleted the fix_ci branch September 5, 2025 06:50
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