Skip to content

Conversation

ExceptionalHandler
Copy link
Contributor

@ExceptionalHandler ExceptionalHandler commented Apr 10, 2025

Description

This PR adds a CI step to cross compile tetragon.exe for Windows on Linux.

@ExceptionalHandler ExceptionalHandler requested a review from a team as a code owner April 10, 2025 20:24
@ExceptionalHandler ExceptionalHandler added the release-note/misc This PR makes changes that have no direct user impact. label Apr 10, 2025
@ExceptionalHandler ExceptionalHandler force-pushed the v/ci/windows/cross-compile branch from 8eb0c76 to 9f2d5f5 Compare April 10, 2025 20:38
Makefile.windows Outdated
Copy link
Member

Choose a reason for hiding this comment

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

hey, why don't you use the existing facilities with a new GOOS (like with GOARCH) or something like that? I'm not sure to understand why we need a whole new Makefile.

Copy link
Contributor Author

@ExceptionalHandler ExceptionalHandler Apr 11, 2025

Choose a reason for hiding this comment

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

Of course that is the easy change.
I am following precedent set by how tetra.exe is built for Windows and Darwin.
Also, a new make file lets us add packaging and ebpf building targets later without disrupting other makefiles.

uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Build tetragon Windows binaries
run: make tetragon-windows
Copy link
Member

Choose a reason for hiding this comment

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

just doing GOOS=windows make tetragon should build tetragon for windows

Copy link
Member

@mtardy mtardy left a comment

Choose a reason for hiding this comment

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

I see that you got inspired by the CLI thing. I would favor the existing build target we have for tetragon. wdyt?

uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Build tetragon Windows binaries
run: make tetragon-windows
Copy link
Member

Choose a reason for hiding this comment

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

I would suggest this instead of creating a new Makefile, please also add ./tetragon.exe just after ./tetragon in the clean: target.

Suggested change
run: make tetragon-windows
run: |
GOOS=windows GOARCH=amd64 make tetragon
GOOS=windows GOARCH=arm64 make tetragon

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have made this change.

@mtardy mtardy added release-note/ci This PR makes changes to the CI. and removed release-note/misc This PR makes changes that have no direct user impact. labels Apr 11, 2025
@ExceptionalHandler ExceptionalHandler force-pushed the v/ci/windows/cross-compile branch from 9f2d5f5 to 596020a Compare April 14, 2025 18:54
This PR adds a CI step to cross compile tetragon.exe for Windows on Linux.

Signed-off-by: Anadi Anadi<[email protected]>
@ExceptionalHandler ExceptionalHandler force-pushed the v/ci/windows/cross-compile branch from 596020a to 810c26f Compare April 14, 2025 19:05
Copy link
Member

@mtardy mtardy left a comment

Choose a reason for hiding this comment

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

Thank you, also:

please also add ./tetragon.exe just after ./tetragon in the clean: target

I imagine you can do as a followup, no big deal

@mtardy mtardy merged commit 5158ac9 into cilium:main Apr 15, 2025
38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note/ci This PR makes changes to the CI.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants