-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(ci): add windows builds to dev & pr workflows #762
Conversation
👏 Impressive to see the engineering that went into this, but also scary to see how much more complicated the build process is becoming, given it was already quite complex. 😞 Probably the most important requirement is to be able to perform the build on a machine other than a GitHub Actions runner (for example a local laptop, or an EC2). Some documentation would probably be needed for this. |
Agreed with @astencel-sumo - document describing how to build it locally would be a very nice addition here. Ideally this would work outside of Github Actions, eg. with bash script or sth. |
@astencel-sumo @perk-sumo I've started throwing together some notes to document how to build locally on Windows. Should I put it in the otelcolbuilder README.md file or somewhere in the docs directory? I'm working on getting |
Can't thank you enough for your work @amdprophet 🙇
My first thought is CONTRIBUTING.md in the root directory, what do you think?
Hm yeah it doesn't seem that this check makes any sense. It doesn't seem to be testing any functionality of the extension, it's reather an assertion on how the |
fac63e6
to
ecc0491
Compare
@astencel-sumo CONTRIBUTING.md makes sense to me. I've added some documentation to it; please let me know if you think it needs any changes. |
ecc0491
to
4a550cd
Compare
I believe this is ready for review again. There are two tests that are failing intermittently with The two tests are |
88d0879
to
1e8d7ca
Compare
Thanks a lot @amdprophet, this looks much much better. Following the instructions, I was able to build the binary on Windows and it seems to work perfectly fine. 👌 I might have just a few nits for the instructions. Here's a silly question though: I just noticed there's an |
CONTRIBUTING.md
Outdated
setx path "%PATH%;C:\Program Files (x86)\GnuWin32\bin" | ||
``` | ||
|
||
1. (Optional) Install [Windows Terminal][windows-terminal]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think I would bother the user with installing the Windows Terminal. I mean, it's a good app that I use and would recommend to anyone, but it's orthogonal to the instructions on building the binary and it's an additional step, even if optional, which you could argue is even worse, because the user now needs to make a decision, which is the harder to make the more uninformed the user is. 🙂
I'd rather keep the steps as minimal as possible.
CONTRIBUTING.md
Outdated
|
||
1. Open gitbash (or Windows Terminal using gitbash shell). | ||
|
||
1. Clone this repository: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I would assume the user has the repository already cloned, I would skip this step and straight to cd otelcolbuilder
, the assumption being the user is already in the root of the repo. This is what is being done in the How to build
steps below and I think it's enough.
The binary doesn't have to be built on a Windows runner but the MSI packaging will. Rather than setting up a complex pipeline that can pass binaries from one runner to another, I thought it would be best to run everything on a single Windows runner. |
1e8d7ca
to
6c32f67
Compare
Oh I see, so we want to expand this in the future to things that are easier/more feasible on Windows OS (like building the installer). Thanks for the explanation 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@amdprophet We need to prevent the install script tests from running on Windows as well. Right now, unsurprisingly, they fail: https://github.com/SumoLogic/sumologic-otel-collector/actions/runs/3332408749/jobs/5522454895.
I think it's sufficient to add a build tag to the tests module: https://github.com/SumoLogic/sumologic-otel-collector/tree/main/pkg/scripts_test
@swiatekm-sumo I've already added build tags to prevent execution of those tests on Windows. It seems like this is due to the Makefile attempting to run the tests with sudo which doesn't exist on the Windows runner. I've used a variable called |
It seems that the |
Head branch was pushed to by a user without write access
07a60ca
to
ebd260f
Compare
Looks like you've got an extraneous |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Signed-off-by: Justin Kolberg <[email protected]>
Signed-off-by: Justin Kolberg <[email protected]>
Signed-off-by: Justin Kolberg <[email protected]>
7eee2db
to
5da0c47
Compare
Head branch was pushed to by a user without write access
Signed-off-by: Justin Kolberg <[email protected]>
dcd8d9b
to
1bc52d8
Compare
I believe the failing test just needs to be rerun. I saw intermittent failures of that test on both Windows & macOS. |
Signed-off-by: Justin Kolberg [email protected]
Adds Windows builds to the
Dev builds
&PRs checks
GitHub Actions CI workflows.