Skip to content

Update macOS build and CI maintenance. #351

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

Merged
merged 18 commits into from
Jun 5, 2025
Merged

Conversation

samcunliffe
Copy link
Member

@samcunliffe samcunliffe commented Nov 18, 2024

What started as a simple update to the deprecated versions GitHub's upload-artifact, download-artifact and checkout actions has snowballed into major housekeeping.

  • Update upload-artifact, download-artifact and checkout;
  • update setup-matlab since they introduced a sudo bug on Windows and macOS;
  • add new clang-format linter suggestions;
  • fix libomp error and some compiler warnings on the macOS build;
  • run a native ARM macOS build
    • the runners are updated and MATLAB now provides the right objects for linking;
  • and, as this whole CI is so flaky, run it once a month.

We should be sure to squash-merge this mess!

@samcunliffe samcunliffe added technical Technical and meta issues, not related to physics but infrastructure. housekeeping Code cleanup labels Nov 18, 2024
@samcunliffe

This comment was marked as resolved.

@willGraham01

This comment was marked as resolved.

@samcunliffe

This comment was marked as resolved.

@willGraham01

This comment was marked as resolved.

lcov --remove coverage.info '/Library/*' --output-file coverage.info
lcov --remove coverage.info '/Applications/*' --output-file coverage.info
lcov --ignore-errors unused --remove coverage.info '/Library/*' --output-file coverage.info
lcov --ignore-errors unused --remove coverage.info '/Applications/*' --output-file coverage.info
Copy link
Member Author

Choose a reason for hiding this comment

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

It was erroring because /Library/* wasn't found. Since we restrict this to ubuntu builds, we could also straight remove lines 181 and 182, but it feels like it's worth maintaining a macOS capability here.

on:
push:
branches: ["main"]
pull_request:
merge_group:
schedule:
- cron: "0 9 15 * *"
Copy link
Member Author

@samcunliffe samcunliffe Jun 5, 2025

Choose a reason for hiding this comment

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

Since the build is brittle, I propose we run it monthly to keep vaguely on top of things...?

@samcunliffe samcunliffe self-assigned this Jun 5, 2025
@samcunliffe samcunliffe requested a review from Copilot June 5, 2025 12:46
@samcunliffe samcunliffe changed the title Update upload-artifact, download-artifact and checkout versions. Update macOS build and CI maintenance. Jun 5, 2025
Copy link
Contributor

@Copilot 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 modernizes CI and tooling by updating action versions, improving build configurations (especially on macOS/ARM), and adding linting steps.

  • Bump checkout, upload/download-artifact, and setup-matlab actions across workflows
  • Clean up CMake for ARM macOS, fix libomp and compiler warnings, and add monthly CI schedule
  • Introduce clang-format checks, update pre-commit hooks, and tidy interpolation test formatting

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tdms/tests/unit/test_interpolation_functions.cpp Reformatted empty while loop in interpolation test
tdms/tests/system/utils.py Added blank line after module docstring
tdms/src/simulation_parameters.cpp Qualified std::move for string parameters
tdms/src/simulation_manager/execute_simulation.cpp Reformatted OpenMP #pragma argument list
tdms/CMakeLists.txt Removed forced x86_64 architecture for macOS
.pre-commit-config.yaml Updated hook revisions for isort, black, autoflake, pre-commit-hooks
.github/workflows/matlab_tests.yml Bumped matlab-actions/setup-matlab to v2.5.0
.github/workflows/doxygen-gh-pages.yml Upgraded actions/checkout to v4 and artifact actions to v4
.github/workflows/ci.yml Added monthly cron, clang-format validation, updated actions to v4, tweaked matrix and macOS deps

Comment on lines 146 to 150
int n = 8;
while (--n > 0 && abs(coeff_sums[n] - coeff_sums[0]) < tol)
;
while (--n > 0 && abs(coeff_sums[n] - coeff_sums[0]) < tol);
// we only reach the end of the while loop, IE get to n==0, when all elements
// in the array are the same
REQUIRE(n == 0);
Copy link
Preview

Copilot AI Jun 5, 2025

Choose a reason for hiding this comment

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

[nitpick] The empty loop body with only a trailing semicolon can be hard to read; consider using std::all_of to express the intent more clearly or add an inline comment to highlight that the loop is intentionally empty.

Copilot uses AI. Check for mistakes.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not going to do that here, but it looks like a good suggestion!

@samcunliffe samcunliffe requested a review from willGraham01 June 5, 2025 12:59
@samcunliffe
Copy link
Member Author

@willGraham01, sorry for the noise. This PR snowballed. But it's green now. 😌 🟢

auto-merge was automatically disabled June 5, 2025 13:54

Merge commits are not allowed on this repository

@samcunliffe samcunliffe merged commit ea6f46e into main Jun 5, 2025
15 checks passed
@samcunliffe samcunliffe deleted the sc/update-artifact-v4 branch June 5, 2025 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
housekeeping Code cleanup technical Technical and meta issues, not related to physics but infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants