-
-
Notifications
You must be signed in to change notification settings - Fork 224
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
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?
.github/workflows/cygwin-build.yml
Outdated
| 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?
39dde49 to
2b39c84
Compare
|
please take a look |
I took a look now. Could you please address all the comments? |
|
@ritesh006 did you see the comments? |
2b39c84 to
1f1be5b
Compare
sorry for late comment @jubalh actually i was travelling so didnt got the time but now i have addressed all issue please take a look @jubalh @sjaeckel |
ebb1f69 to
190ef95
Compare
|
@ritesh006 thanks for the update. Currently the CI test fails though. |
Thanks indeed! Looks like at least cmocka is missing!? |
190ef95 to
a071b71
Compare
@jubalh CI success please review. |
|
Unfortunately now there is again a merge commit. Like already mentioned in #2066 (review) we dont like them :) |
144407e to
789de1d
Compare
Please check now is everything ok. |
|
You simply removed the unittests ... I'm not a big fan. Is there no cmocka available or what prevents us from building and running them? |
|
On Cygwin the tests failed earlier because the cmocka dependency is not available in the job. |
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.
789de1d to
60c4dc6
Compare
|
I added libcmocka-devel so the tests can be supported in the future. make: *** No rule to make target 'check'. Stop. So it seems this build configuration does not expose a make check target yet. What would you suggest, should we keep it as a build-only job for now, or look into wiring the tests on Cygwin in a follow-up PR? |
How to test the functionality