Skip to content

Conversation

@olivia-banks
Copy link
Member

@olivia-banks olivia-banks commented Nov 6, 2025

Completely overhaul the build system. Previously, the build logic was scattered, and so was configuration. It was also implemented recursively ($(MAKE) -C), which hurt parallelism and general performance.

Now, the build system logic is very centralized, uses include where-ever possible, and makes defining new tests/examples/et-cetera as easy as possible.

More extensive documentation will be included with #97.

This is probably the largest changes required to close #92, maybe on-par with fixing linting and formatting issues.

Some files have been removed that have not been used or touches in ages.

@olivia-banks olivia-banks requested a review from Copilot November 6, 2025 04:48
@olivia-banks olivia-banks self-assigned this Nov 6, 2025
@olivia-banks olivia-banks added enhancement New feature or request development labels Nov 6, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR restructures the project's build system by migrating from a custom Makefile setup to a more modular GNU Make system. The key changes include:

  • Introduction of a new modular build system using GNUmakefile and shared makefiles in share/mk/
  • Migration of tests to use Catch2 framework exclusively, removing the dual-mode testing approach
  • Consolidation of example makefiles to use common build infrastructure
  • Addition of CI/CD workflows for testing and examples
  • New utility scripts for amalgamation and compilation database generation
  • Cleanup of obsolete files and documentation

Reviewed Changes

Copilot reviewed 117 out of 143 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
GNUmakefile New root makefile implementing modular build system with recursive package expansion
share/mk/*.mk Build system infrastructure for compilation, testing, and examples
tests/tests.hpp Updated test header to use Catch2 exclusively with inline functions
tests/main.cpp Simplified to only define Catch2 main, removing all test includes
tests/Makefile Converted to use new build system with source listing
tests/*.cpp Removed conditional compilation directives for Catch2
examples/*/Makefile Standardized to use epw.example.mk
.github/workflows/*.yml Added CI workflows for tests and examples
script/*.pl New Perl scripts for amalgamation and compilation database

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Contributor

Copilot AI commented Nov 6, 2025

@olivia-banks I've opened a new pull request, #119, to work on those changes. Once the pull request is ready, I'll request review from you.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 117 out of 143 changed files in this pull request and generated no new comments.

@olivia-banks
Copy link
Member Author

Copilot apparently decided it wasn't going to comment on my code. When you get a moment, @gvegayon, would you be willing to give this a provisional review? There's still some work I have to do but the large share is complete. If it's too much we can also discuss the contents of this PR during our next meeting.

Copy link
Member

@gvegayon gvegayon left a comment

Choose a reason for hiding this comment

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

This is looking good, @olivia-banks! I see what you are doing. Besides the comments I already left, it would be nice to ensure that the devcontainer is aligned with these changes.

@olivia-banks olivia-banks marked this pull request as draft November 6, 2025 16:13
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 118 out of 144 changed files in this pull request and generated no new comments.

@olivia-banks
Copy link
Member Author

For some reason, hashFiles is failing on Darwin due to an "invalid pattern." I've nuked the cache to see if that helps.

@olivia-banks
Copy link
Member Author

This is a GitHub issue (what!?!?), so I'm holding off on this for now.

actions/runner#449
https://github.com/orgs/community/discussions/180160

@olivia-banks
Copy link
Member Author

It looks like GitHub is having some serious issues with their macOS runners, so I'm going to disable them for the time being. Will re-try periodically and re-enable once things mellow out.

@olivia-banks
Copy link
Member Author

@gvegayon I know you typically use dev containers, but how do you run your tests? Do you have an IDE extension where you can run it from the line-counter, or do you do it through the CLI? Want to make sure this is as transparent as possible.

@gvegayon
Copy link
Member

@gvegayon I know you typically use dev containers, but how do you run your tests? Do you have an IDE extension where you can run it from the line-counter, or do you do it through the CLI? Want to make sure this is as transparent as possible.

Running full tests has been make clean && make main.o && ./main.o, but running individual files is through VS Code's basic C++ debugger, so no fancy extension just for C++ tests.

@olivia-banks
Copy link
Member Author

Awesome, I'll get this working. Might not be before Tuesday, things are pretty hectic!

@olivia-banks
Copy link
Member Author

Looks like the macOS runners are back up and running; when we get a cache hit we'll know for certain, but it looks hopeful. Will trigger soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

development enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve Development Ergonomics

3 participants