Chore
Describe the chore
The CI/CD is all driven from the GitHub workflows files. Currently, I am maintaining one per target platform (current total 4: x64-windows, x64-linux, x64-osx, arm64-osx), due primarily to the subtle differences between platforms that make a generic workflow difficult to define. The primary issues include path handling, especially with regards to caching, restoring, and distributing build artefacts.
I am also driving builds and tests for two build configurations - Debug and Release. The Debug build is really handy to have, and quite conventional to distribute as part of a pre-built package from a package manager (vcpkg...). These are again currently specified uniquely within each workflow file, despite only one single var being different between both builds.
Clearly, we can benefit a lot from using matrixes for build types. I have only hesitated since I have been experimenting with using mutli-config generators (Ninja Multi-Config, etc) to speed things up.
Unfortunately, JUCE doesn't seem to play nice with the typical CMAKE_CONFIGURATION_TYPES var usually used to tell the multi-config generator which build types to produce. When using this setup, find_package(juce CONFIG REQUIRED) fails on the CI/CD runs... perhaps we could use a less restrictive call to find the juce CMake package, but this will probably open up a whole new level of issues which are currently locked down due to the strictness of the design, an integrity which I'd much prefer to maintain.
Matrixes can also work for the multi-platform handling, as per pamplejuce... however, I find that nice clear workflow files which resemble an actual human interaction with a project's required build steps to be very useful and informative, personally, when perusing other users' projects. Given the 'tutorial-ish' nature of the project, I quite prefer to have nice clear workflows I can point visitors to, so that they may understand the entire CMake configure/build/test/install/pack routine.
Spaghetti-like workflows are not only unclear and un-informative for project newcomers; they are also much more prone to failing for subtle reasons, and are much harder to debug.
For now, I have been very deliberate and repetitive in the workflow runs because the clarity is of much greater benefit than boiling it all down into some sort of yaml-flavoured delicacy which even I won't understand, when I revisit this project after the next long break...
I don't see that repetition as a bad thing, in the case of the workflows - DRY is more important within the codebase itself, whereas the workflows should work, and if well-made, will also be very useful to others.
However, I am currently generating multiple build caches per push. This doesn't feel responsible of me. There is also more work to be done to address version management, and logic to control whether or not any artefacts even should be cached (think validation).
Generally the CI/CD is working great now that I have done all of the dirty repetitive work, so I am not in a big hurry to go and break it all. But, every time I watch the thing run, I feel that this could be done much more efficiently and programmatically.
I have been able to regularize/generalize the less meaty parts of the workflows, particularly the CMake config/build/test/install part of the routine. The dependency resolution(s) and artefact caching/uploading are a whole other matter, and would likely still require a distinct job each, meaning that we'd have these various un-related pre- and post-build steps sandwiching a matrix... Very tricky because the workspace gets cleared between jobs... so, caching a buildpath-per-matrix-run scenario starts to arise... this kind of complexity makes me wonder if it would actually be preferable over the current implementation, or not...
This issue will be a dumping ground for further thoughts and ideas on the subject, before deciding on how to improve and optimize the current CI/CD. I probably won't make any further changes for the time being, until my thoughts on what are more fully established here.
Chore
Describe the chore
The CI/CD is all driven from the GitHub workflows files. Currently, I am maintaining one per target platform (current total 4: x64-windows, x64-linux, x64-osx, arm64-osx), due primarily to the subtle differences between platforms that make a generic workflow difficult to define. The primary issues include path handling, especially with regards to caching, restoring, and distributing build artefacts.
I am also driving builds and tests for two build configurations - Debug and Release. The Debug build is really handy to have, and quite conventional to distribute as part of a pre-built package from a package manager (vcpkg...). These are again currently specified uniquely within each workflow file, despite only one single var being different between both builds.
Clearly, we can benefit a lot from using matrixes for build types. I have only hesitated since I have been experimenting with using mutli-config generators (Ninja Multi-Config, etc) to speed things up.
Unfortunately, JUCE doesn't seem to play nice with the typical
CMAKE_CONFIGURATION_TYPESvar usually used to tell the multi-config generator which build types to produce. When using this setup,find_package(juce CONFIG REQUIRED)fails on the CI/CD runs... perhaps we could use a less restrictive call to find the juce CMake package, but this will probably open up a whole new level of issues which are currently locked down due to the strictness of the design, an integrity which I'd much prefer to maintain.Matrixes can also work for the multi-platform handling, as per pamplejuce... however, I find that nice clear workflow files which resemble an actual human interaction with a project's required build steps to be very useful and informative, personally, when perusing other users' projects. Given the 'tutorial-ish' nature of the project, I quite prefer to have nice clear workflows I can point visitors to, so that they may understand the entire CMake configure/build/test/install/pack routine.
Spaghetti-like workflows are not only unclear and un-informative for project newcomers; they are also much more prone to failing for subtle reasons, and are much harder to debug.
For now, I have been very deliberate and repetitive in the workflow runs because the clarity is of much greater benefit than boiling it all down into some sort of yaml-flavoured delicacy which even I won't understand, when I revisit this project after the next long break...
I don't see that repetition as a bad thing, in the case of the workflows - DRY is more important within the codebase itself, whereas the workflows should work, and if well-made, will also be very useful to others.
However, I am currently generating multiple build caches per push. This doesn't feel responsible of me. There is also more work to be done to address version management, and logic to control whether or not any artefacts even should be cached (think validation).
Generally the CI/CD is working great now that I have done all of the dirty repetitive work, so I am not in a big hurry to go and break it all. But, every time I watch the thing run, I feel that this could be done much more efficiently and programmatically.
I have been able to regularize/generalize the less meaty parts of the workflows, particularly the CMake config/build/test/install part of the routine. The dependency resolution(s) and artefact caching/uploading are a whole other matter, and would likely still require a distinct job each, meaning that we'd have these various un-related pre- and post-build steps sandwiching a matrix... Very tricky because the workspace gets cleared between jobs... so, caching a buildpath-per-matrix-run scenario starts to arise... this kind of complexity makes me wonder if it would actually be preferable over the current implementation, or not...
This issue will be a dumping ground for further thoughts and ideas on the subject, before deciding on how to improve and optimize the current CI/CD. I probably won't make any further changes for the time being, until my thoughts on what are more fully established here.