Skip to content

github: workflows: Specify OS configs explicitly#11934

Open
cosmo0920 wants to merge 3 commits into
masterfrom
cosmo0920-address-vs2026-18-bump
Open

github: workflows: Specify OS configs explicitly#11934
cosmo0920 wants to merge 3 commits into
masterfrom
cosmo0920-address-vs2026-18-bump

Conversation

@cosmo0920

@cosmo0920 cosmo0920 commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Recently, VS2026 18 bump is occurred so we need to address this incompatibility on GHA.


Enter [N/A] in the box, if an item is not applicable to your change.

Testing
Before we can approve your change; please submit the following in a comment:

  • Example configuration file for the change
  • Debug log output from testing the change
  • Attached Valgrind output that shows no leaks or memory corruption was found

If this is a change to packaging of containers or native binaries then please confirm it works for all targets.

  • Run local packaging test showing all targets (including any new ones) build.
  • Set ok-package-test label to test for all targets (requires maintainer to do).

Documentation

  • Documentation required for this feature

Backporting

  • Backport to latest stable release.

Fluent Bit is licensed under Apache 2.0, by submitting this pull request I understand that this code will be released under the terms of that license.

Summary by CodeRabbit

  • Chores
    • Enhanced Windows packaging pipeline to explicitly support both x64 and Arm64 Windows builds.
    • Build jobs now select the appropriate Windows runner per architecture.
    • Architecture-specific packaging tools are installed only for the Arm64 variant and relevant packaging environment variables are exported for those jobs.

Signed-off-by: Hiroshi Hatake <hiroshi@chronosphere.io>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c43eeeee2d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/call-build-windows.yaml
@coderabbitai

coderabbitai Bot commented Jun 10, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 4efc7b51-ac99-407b-86d2-885861563f62

📥 Commits

Reviewing files that changed from the base of the PR and between 6d32d3b and 4a51f18.

📒 Files selected for processing (1)
  • .github/workflows/call-build-windows.yaml
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/call-build-windows.yaml

📝 Walkthrough

Walkthrough

The Windows packaging workflow now uses runs-on: ${{ matrix.config.os }}, the matrix adds os per variant (windows-latest for x86/x64, windows-11-arm for Arm64), and the Arm64 variant conditionally installs and exports the WiX Toolset location.

Changes

Windows Packaging Runner Matrix Configuration

Layer / File(s) Summary
Matrix-driven runner selection and conditional WiX install
.github/workflows/call-build-windows.yaml
runs-on changed to ${{ matrix.config.os }}; build matrix adds os for x86/x64 (windows-latest) and Arm64 (windows-11-arm); Arm64-only steps install WiX via Chocolatey, verify candle.exe/light.exe, and export WIX and WiX bin to the job environment.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • fluent/fluent-bit#10931: Also switches Windows CI to matrix-driven runs-on and adds windows-11-arm for ARM64 runner selection.

Suggested labels

ok-package-test

Suggested reviewers

  • niedbalski
  • patrick-stephens
  • celalettin1286

Poem

🐰 I nibbled YAML under moonlit beams,
Matrix picked runners and balanced the seams,
x64 and Arm64 now take their place,
WiX hops in only for the Arm64 case,
CI carrots cheer — build, package, and grace!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately reflects the main change: specifying OS configurations explicitly in GitHub Actions workflows for the Windows packaging job, moving from fixed 'windows-latest' to matrix-driven OS selection.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cosmo0920-address-vs2026-18-bump

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

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/call-build-windows.yaml (1)

115-115: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

CMake architecture hardcoded to x86_64 may not be optimal for ARM runners.

The CMake setup downloads the x86_64 version regardless of the runner architecture:

$cmakeArch = "x86_64"

If the ARM64 build runs on a native windows-11-arm runner, using x86_64 CMake relies on emulation, which may cause:

  • Performance degradation during the build
  • Potential compatibility issues with native ARM toolchains
  • Unexpected build failures

Recommendation: Consider making $cmakeArch dynamic based on the target architecture or runner platform.

🔧 Proposed fix to make CMake architecture configurable
       - name: Set up CMake
         run: |
           $cmakeVersion = "${{ matrix.config.cmake_version }}"
-          $cmakeArch = "x86_64"
+          # Use x86_64 CMake for x86/x64 builds and cross-compilation; ARM64 for native ARM builds
+          if ("${{ matrix.config.arch }}" -eq "arm64") {
+            $cmakeArch = "arm64"
+          } else {
+            $cmakeArch = "x86_64"
+          }
           $cmakeUrl = "https://github.com/Kitware/CMake/releases/download/v${cmakeVersion}/cmake-${cmakeVersion}-windows-${cmakeArch}.zip"

Note: This assumes a native ARM build; if cross-compilation is intended, keep x86_64.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/call-build-windows.yaml at line 115, The hardcoded
$cmakeArch = "x86_64" forces x86 downloads on ARM runners; change $cmakeArch to
be computed dynamically (e.g., inspect runner/OS vars such as
$env:PROCESSOR_ARCHITECTURE or $env:RUNNER_ARCH and map values like
"ARM64"/"AARCH64" to "arm64" and default to "x86_64"), allow an explicit
override via an environment input/variable for cross-compilation scenarios, and
update any downstream uses (references to $cmakeArch) to rely on that
computed/overridable value.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/call-build-windows.yaml:
- Around line 95-100: The workflow defines an ARM64 job with an incompatible
cross-compilation setting: change the arch/os pairing so they match the intended
build mode — either make the job native ARM by setting arch to "arm64" when
using os: windows-11-arm, or make it a cross-compile by keeping arch:
"amd64_arm64" and changing os to a x64 runner (e.g., windows-latest); update the
corresponding cmake_additional_opt/cmake_triplet if you switch to native arm64
to remove the cross-toolchain flags currently set in cmake_additional_opt and
ensure vcpkg_triplet matches the chosen mode.

---

Outside diff comments:
In @.github/workflows/call-build-windows.yaml:
- Line 115: The hardcoded $cmakeArch = "x86_64" forces x86 downloads on ARM
runners; change $cmakeArch to be computed dynamically (e.g., inspect runner/OS
vars such as $env:PROCESSOR_ARCHITECTURE or $env:RUNNER_ARCH and map values like
"ARM64"/"AARCH64" to "arm64" and default to "x86_64"), allow an explicit
override via an environment input/variable for cross-compilation scenarios, and
update any downstream uses (references to $cmakeArch) to rely on that
computed/overridable value.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 782e2004-8f5b-4d07-8cfc-3633ce021b68

📥 Commits

Reviewing files that changed from the base of the PR and between 5880717 and c43eeee.

📒 Files selected for processing (1)
  • .github/workflows/call-build-windows.yaml

Comment thread .github/workflows/call-build-windows.yaml
Signed-off-by: Hiroshi Hatake <hiroshi@chronosphere.io>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
.github/workflows/call-build-windows.yaml (1)

210-214: ⚡ Quick win

Condition should check OS, not architecture.

The WiX installation is conditioned on matrix.config.arch == 'amd64_arm64', but the actual intent is to install WiX on windows-11-arm runners where it's not pre-installed (unlike windows-latest runners). Checking the architecture instead of the OS is fragile and obscures the intent.

♻️ Recommended condition refactor
-      - name: Get WiX Toolset w/ chocolatey
-        if: ${{ matrix.config.arch == 'amd64_arm64' }}
+      - name: Get WiX Toolset w/ chocolatey
+        if: matrix.config.os == 'windows-11-arm'
         uses: crazy-max/ghaction-chocolatey@dff3862348493b11fba2fbc49147b6d2dfe09b66 # v4.0.0
         with:
           args: install wixtoolset -y
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/call-build-windows.yaml around lines 210 - 214, The step
named "Get WiX Toolset w/ chocolatey" currently gates WiX installation on
matrix.config.arch == 'amd64_arm64' which checks architecture instead of runner
OS; update the step's if condition to target the Windows ARM runner (for
example: matrix.config.os == 'windows-11-arm' or runner.os == 'Windows' &&
matrix.config.os == 'windows-11-arm' depending on your matrix shape) so the WiX
install runs only on the windows-11-arm runner where WiX is missing.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In @.github/workflows/call-build-windows.yaml:
- Around line 210-214: The step named "Get WiX Toolset w/ chocolatey" currently
gates WiX installation on matrix.config.arch == 'amd64_arm64' which checks
architecture instead of runner OS; update the step's if condition to target the
Windows ARM runner (for example: matrix.config.os == 'windows-11-arm' or
runner.os == 'Windows' && matrix.config.os == 'windows-11-arm' depending on your
matrix shape) so the WiX install runs only on the windows-11-arm runner where
WiX is missing.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 724debae-d4ec-4555-90e8-79c601ba7ddd

📥 Commits

Reviewing files that changed from the base of the PR and between c43eeee and 6d32d3b.

📒 Files selected for processing (1)
  • .github/workflows/call-build-windows.yaml

Signed-off-by: Hiroshi Hatake <hiroshi@chronosphere.io>
@cosmo0920 cosmo0920 added this to the Fluent Bit v5.0.8 milestone Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant