-
-
Notifications
You must be signed in to change notification settings - Fork 223
ci: add Cygwin build workflow #2066
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
base: master
Are you sure you want to change the base?
Conversation
7c1c710 to
ae479f8
Compare
|
Awesome! This looks like a good start :) You could have set this PR to draft PR and then to regular PR when you want us to review. |
sorry I dont understand what is draft pr? |
|
It's just a way to signal whether your pull request is still work in progress or ready for review by maintainers. |
c9cc0c4 to
178d3f4
Compare
|
cygwin-build build success @jubalh could you please review this |
jubalh
left a comment
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.
Now you need to clean up your history.
The commit Merge branch 'master' into ci/cygwin-build is not needed and just clutters the history. The other 3 commits can be squashed into one.
|
Hi @jubalh due to family loss I am in hometown as soon as I reach to my place would like to work start again. Thank You |
|
My condolences. Take your time! |
f8d1ae0 to
0a47fd4
Compare
Thanks I cleaned up the branch and squashed the changes into a single commit. What I did: added a GitHub Actions workflow to check that Profanity builds on Cygwin (runs on windows-latest). The job installs the needed Cygwin packages and runs autoreconf -fi, ./configure, and make. I also forced the steps to run under Cygwin’s bash and handled temp-script paths and CRLF issues so the job should run more reliably on the runner. Next steps I’m thinking of (if you’re OK with this landing): enable make check later if tests are stable on Cygwin, add a MSYS2/MINGW64 job for native Windows builds, upload build logs/artifacts on failures to make debugging easier. I renamed the workflow to Cygwin to match the other job names. Please take a look and let me know if you want any changes. |
0a47fd4 to
7b2ee66
Compare
|
Sounds good! Regarding:
The tests do not succeed there currently? |
76a621b to
e8c9cc0
Compare
|
I added a Cygwin workflow that installs required Cygwin packages, builds libstrophe, and runs autoreconf -fi, ./configure, and make. |
could you please help me here bacuse its failing at linux stage not at Cygwin I thing Cygwin not even started yet |
So I suggest this:
I think the other CIs don't even run the tests. So these things are optional.
I'll retrigger them or disable them. No need to add commits to retrigger it :) |
``` #11 0.137 --2025-09-18 10:41:06-- https://aur.archlinux.org/cgit/aur.git/snapshot/libstrophe-git.tar.gz ``` This currently blocks us at #2066.
|
I'm not sure why it doesn't use the new workflow file. Can you try cleaning up git history into 1 commit and force push? |
|
When you got rid of the 2 extra commits, please run git rebase. to get the latest changes from master. then the CI should omit Arch. |
9f6f2fe to
c1fc275
Compare
|
Ready for review |
|
BTW there's https://github.com/nektos/act to run GH actions locally while working on them. Not sure how/if it works for Windows runners, but it works great for Linux CI jobs. |
.github/workflows/cygwin-build.yml
Outdated
| cd "$GITHUB_WORKSPACE" | ||
| make -j2 | ||
|
|
||
| # Optional: non-blocking tests + upload logs for inspection (recommended while tests are unstable) |
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.
Everything looks great :)
But I still don't understand what you mean with the tests being unstable. Or what the problem with them is. Is there one?
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.
If everything looks fine, can we merge these changes? After that, we can handle the remaining parts in the next commit
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.
This comment will be on master and even though people in the past often promised to change something in the future, sometimes they didn't do it. So I would like to understand this comment first. Or removing the outcommented part and just adding the whole thing once its working.
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.
Could you please provide me with the definition of done? That will help me understand your expectations better. Since no issue was created for this, I just want to clarify
And I assure you I will give my best
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 am making this pr as draft. let me know you expectations. I would like to work on that.
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.
The comment above mentions that the tests are "unstable". I don't know what you mean by that.
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 called them “unstable” because on Cygwin some make check tests don’t always pass, even though they work fine on Linux. This can be due to line endings, timing, or other Windows/Cygwin differences. To avoid blocking the build, I suggested running the tests in non-blocking mode and just saving the logs.
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 uncommented the test step and it’s passing now. I kept the note so if tests fail in the future we remember why. If you want, I can remove the comment.
d36e5db to
39dde49
Compare
jubalh
left a comment
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.
Thank your for the PR and your patience.
I'll wait for @sjaeckel review as well.
sjaeckel
left a comment
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.
Thanks for the PR! Basically LGTM, just some nitpicks and clarifications missing IMO.
General thing: one doesn't keep code "just in case" "if it's maybe needed in the future". YAGNI. Instead doing that will most likely confuse others in the future.
Also if you've questions regarding some parts of the code you're most likely to go to
git blamethese lines- see that this originates from a PR
- look into the discussions and see what changed and what was the reasoning.
Things like the 4 line comment about the wrapper is good! That comment sounds very reasonable, because I don't get that from the code.
| if [ -x ./bootstrap.sh ]; then | ||
| ./bootstrap.sh | ||
| else | ||
| autoreconf -fi | ||
| fi |
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.
Why should the executable bit change?
| run: | | ||
| cd "$GITHUB_WORKSPACE" | ||
| # don't fail if git is not present inside Cygwin | ||
| git config --global core.autocrlf false || true |
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.
Why is this required? I don't see any Git operations afterwards
.github/workflows/cygwin-build.yml
Outdated
| - name: Check repo state | ||
| run: | | ||
| cd "$GITHUB_WORKSPACE" | ||
| pwd | ||
| ls -la | ||
| test -f configure.ac && echo "configure.ac present" || (echo "configure.ac missing"; exit 1) | ||
|
|
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.
Can't this step be removed?
.github/workflows/cygwin-build.yml
Outdated
| # explicit shell to be extra-safe for this step | ||
| shell: > | ||
| C:\tools\cygwin\bin\bash.EXE --login -eo pipefail -c | ||
| "p=$(/usr/bin/cygpath -au '{0}'); | ||
| w=$(/usr/bin/cygpath -au '${{ github.workspace }}'); | ||
| /usr/bin/sed -i 's/\r$//' \"$p\" || true; | ||
| set -o igncr; | ||
| cd \"$w\" || (/usr/bin/pwd; /usr/bin/ls -la; exit 2); | ||
| /usr/bin/bash -leo pipefail \"$p\"" | ||
|
|
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.
To be extra-safe for what? Shouldn't this be handled by the default: shell in the preamble?
.github/workflows/cygwin-build.yml
Outdated
| cd "$GITHUB_WORKSPACE" | ||
| make -j2 | ||
|
|
||
| # Optional: non-blocking tests + upload logs for inspection (recommended while tests are unstable) |
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.
Please remove that comment, it's lying, since it's not optional.
| shell: > | ||
| C:\tools\cygwin\bin\bash.EXE --login -eo pipefail -c | ||
| "p=$(/usr/bin/cygpath -au '{0}'); | ||
| w=$(/usr/bin/cygpath -au '${{ github.workspace }}'); | ||
| /usr/bin/sed -i 's/\r$//' \"$p\" || true; | ||
| set -o igncr; | ||
| cd \"$w\" || (/usr/bin/pwd; /usr/bin/ls -la; exit 2); | ||
| /usr/bin/bash -leo pipefail \"$p\"" |
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.
Most likely a super stupid question: if I look at [0], it seems to me like this solution is convoluted, but I guess there's a simple reason why this is as it is!? Where does this originate from?
Add a GitHub Actions workflow to build with Cygwin on Windows. Fixes issues by forcing Cygwin bash for all steps, handling temporary script paths, stripping CRLF line endings, and enabling igncr.
39dde49 to
2b39c84
Compare
|
please take a look |
I took a look now. Could you please address all the comments? |
How to test the functionality