Skip to content

Conversation

Caio99BR
Copy link
Contributor

@Caio99BR Caio99BR commented Apr 25, 2025

With this all builds can be tested after a new commit and be easily released, we can also have Nightly builds to test with latest changes

I didn't implemented the run of test cause (at least for me) they aren't working as intended

For this to work, needs #2824

@Caio99BR
Copy link
Contributor Author

@Caio99BR
Copy link
Contributor Author

Caio99BR commented May 8, 2025

@PaulBoersma any chance to this get merged?

@PaulBoersma
Copy link
Member

Can you explain a bit more about why this would be useful? We run all our tests on all our editions at every release (except the trivial ones), and as we do continuous integration we have many more commits than releases. The releases are for many more platforms than Ubuntu and Windows, e.g. Mac, Raspberry Pi and s390x. Also, multiple editions will have to be signed with certificates from the Praat organization, so I see no automation on GitHub there.

@Caio99BR Caio99BR marked this pull request as ready for review May 9, 2025 12:25
@Caio99BR
Copy link
Contributor Author

Caio99BR commented May 9, 2025

Well I said some things without explaining:

  • this is an initial implementation
  • the continuous integration means every commit pushed don't have a build error (like on sys: Include correct header files for mingw #2824)
  • the nightly builds are only for test, I don't think they should be signed
  • even without the nightly build from your repo, we can clone/sync and grab the executable build from Github Artifacts, but it will be private to the repo owner
  • it's possible to sign all the builds with (SECRETS in Github Actions, but i don't have the knowledge to do it
  • the building for Mac, Raspberry Pi and s390x is possible but the README only explain it from the standpoint from "MacOS device", and I simple don't know what toolchain is being used or the commands to do it
  • the Github Actions do have a MacOS image (and possible many others) but I don't know how to implement it
  • the command for tests should be implemented after all the builds are building on Github Actons

I think this explains a bit, this is an initial implementation, and can help people test their commits before pulling a PR and ensure everything is working properly without need to set up many VMs, and (with CCache) reduce significantly building times

@PaulBoersma
Copy link
Member

Well, we agree that every commit should be buildable, but with "testing" I meant the quite extensive automated integration tests that every release will have to go through (which is not feasible for every commit; we tests most commits on two of the 13 editions only).

You say that you don't know how to build automatically on the Mac. Well, the Praat team doesn't know either! On the Mac we use an Xcode project instead, so we build directly from the IDE; the turn-around time of this cannot be beaten.

I also saw that you changed two makefiles. I have reverted one of them, with some explanation written in the makefile itself (we get warnings on all three editions). You are invited to add to this makefile a justification of why you want -static-libstdc++ to be added on the link line. Perhaps you have a different MSYS, one that runs GCC instead of LLVM? In that case we may want to split up into two makefiles called ...-msys-clang-gcc and ...-msys-clang-llvm or so (or whatever the difference between your and my set-up could be).

@Caio99BR
Copy link
Contributor Author

Caio99BR commented May 9, 2025

I also saw that you changed two makefiles.

I think it produced an error on first builds when I started implementation and I forgot to revert it, sorry

I meant the quite extensive automated integration tests that every release will have to go through (which is not feasible for every commit; we tests most commits on two of the 13 editions only).

Well we can make it run all tests on all builds without problem, I will make the change later today and commit

@Caio99BR Caio99BR marked this pull request as draft May 9, 2025 23:26
@Caio99BR Caio99BR force-pushed the github_actions branch 3 times, most recently from d1e209a to 1fc7709 Compare May 10, 2025 02:17
@Caio99BR
Copy link
Contributor Author

Finally https://github.com/Caio99BR/praat/actions/runs/14940920492

But, the test on windows is not working properly, the test on linux is working fine

I will investigate again (tomorrow) how to compile the macOS binary

@Caio99BR Caio99BR marked this pull request as ready for review May 10, 2025 03:31
@Caio99BR
Copy link
Contributor Author

Caio99BR commented May 10, 2025

@PaulBoersma now all the files are compiled and tested, i will work on other versions on the next PR, with this one we can ensure at least 4/13 versions are built and tested

@Caio99BR Caio99BR force-pushed the github_actions branch 2 times, most recently from 98cd2cc to 2be96e1 Compare May 10, 2025 03:44
@Caio99BR
Copy link
Contributor Author

It's giving this erro, on my PC it's the same

https://github.com/Caio99BR/praat/actions/runs/14941569690/job/41979447600#step:5:75

@Caio99BR Caio99BR marked this pull request as draft May 10, 2025 03:51
@PaulBoersma
Copy link
Member

PaulBoersma commented May 10, 2025 via email

@Caio99BR
Copy link
Contributor Author

Finally it's fixed with 7c71c8e

All builds passed on https://github.com/Caio99BR/praat/actions/runs/14949700416

I will be marking this as Ready for review

@Caio99BR Caio99BR marked this pull request as ready for review May 10, 2025 22:38
@Caio99BR
Copy link
Contributor Author

Maybe it's good to run git add --renormalize ., but it's not necessary to do it

@Caio99BR Caio99BR marked this pull request as draft May 11, 2025 03:10
@Caio99BR Caio99BR marked this pull request as ready for review May 11, 2025 03:16
@Caio99BR
Copy link
Contributor Author

https://github.com/Caio99BR/praat/actions/runs/14951624294

@PaulBoersma - Ready to merge, it still need to implement CCache on MacOS13 to reduce consecutive builds, but it's good for now

Copy link
Member

Choose a reason for hiding this comment

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

Good that you found the location where this can be handled. However * text=auto eol=lf will probably change several text files. It's better to leave the files alone, perhaps with * -text, so that we can continue to test whether various line separators are handled correctly on all systems.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well it was the only option I found for not needing to use git config core.autocrlf input, and the files will only but changed for the next stage/commits or if git add --renormalize . is used (and don't looks like many text files are using crlf anyway)

@Caio99BR
Copy link
Contributor Author

@PaulBoersma I'm not angry or anything, if anything I barely have the knowledge or brain to understand any code, let alone having the ability to inject malicious code, code injection or anything, I'm a lazy person

@PaulBoersma
Copy link
Member

PaulBoersma commented May 11, 2025

The potential injections that I mentioned could happen at any of the levels where external code is relied on. Injections could sometimes happen by the people themselves, but more often the people are reliable but their code contains a point at which others could insert something. Well, good to hear that everything would stay private until I perform an action. You know, Praat is used in many hospitals, where I have to promise that the Praat team are the only people in charge of the build process.

Thus, it's good that you have explained the details. Those will help me on my way. Beside the bug in .gitattributes, you also detected a bug in the Xcode project file (referring to a non-included support folder), which I therefore repaired today (I publish Xcode projects only at numbered releases, not at every commit, because they would swamp the code changes).

If I ever come to understand GitHub Actions and decide to go along with it, I will definitely refer to you for its first version, perhaps below the other GitHub acknowledgment under Acknowledgments in Praat.

Finally, I will add a test script that checks that the test folders contain the original files, i.e. that line breaks haven't been tampered with.

By the way, if Praat has 30 commits but no release, then this just means that those commits are working toward a new feature or so, with no added utility to users. Bug fixes and usable new functionality are typically released within a day.

@Caio99BR
Copy link
Contributor Author

You know, Praat is used in many hospitals, where I have to promise that the Praat team are the only people in charge of the build process.

This I didn't know wow


Okay I will do the changes related to not using external repos (only provide by system tools like apt), and rely only on github official repos (like actions/checkout)
Also remove "Release Praat" since it rely on an external repo

And based on this it's impossible to use CI to build/test on systems other than Linux/Windows/Mac, cause most of them aren't supported officially on GitHub and would rely on external repos (i think)


Also sorry for my english and rambling, will commit those changes later and open a new PR for .gitattributrs specifically for this

It's better to leave the files alone, perhaps with * -text, so that we can continue to test whether various line separators are handled correctly on all systems.

@Caio99BR Caio99BR marked this pull request as draft May 11, 2025 20:02
@Caio99BR Caio99BR closed this May 12, 2025
@Caio99BR Caio99BR reopened this May 12, 2025
@Caio99BR Caio99BR marked this pull request as ready for review May 12, 2025 01:04
@Caio99BR Caio99BR force-pushed the github_actions branch 3 times, most recently from 169c6eb to 637ab6b Compare May 12, 2025 01:34
@Caio99BR
Copy link
Contributor Author

Latest build on https://github.com/Caio99BR/praat/actions/runs/15174033231

Could you check it? @PaulBoersma

- Based on:
https://github.com/RPCS3/rpcs3/tree/master/.github/workflows
https://github.com/Caio99BR/pkgi-ps3-nopaystation/tree/main/.github/workflows

- On MacOS(13,15)
  - the xcodeproj is pulled from latest release tag
  - I still need to find a way to implement ccache on macOS

- The Test is using `core.autocrlf` to ensure correct endline while
  the correct fix is not merged

Signed-off-by: Caio Oliveira <[email protected]>
@Caio99BR Caio99BR marked this pull request as draft July 15, 2025 23:50
@Caio99BR Caio99BR marked this pull request as ready for review July 16, 2025 00:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants