Skip to content

mac arm build and CI addition #259

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 23 commits into from
Jun 18, 2024
Merged

mac arm build and CI addition #259

merged 23 commits into from
Jun 18, 2024

Conversation

mayantaylor
Copy link
Collaborator

Updating setup.py for correct mac build:

  • charm++ build needs the architecture specified as arm8 (undoing incorrect change in fixing build issues on mac #254)
  • clang installation for charm4py requires architecture specified as arm64
  • charmlib.so must be replaced with the mac version (.dylib)

matthiasdiener
matthiasdiener previously approved these changes Jun 17, 2024
Copy link
Contributor

@matthiasdiener matthiasdiener left a comment

Choose a reason for hiding this comment

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

This looks fine, but could you add more comprehensive architecture testing to CI (either in this PR or a new one)? Currently, only linux-x86_64 seems to be tested.

export CHARM4PY_TEST_NUM_PROCESSES=2
python3 auto_test.py

macos-arm:
Copy link
Contributor

Choose a reason for hiding this comment

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

is this x86_64 by any chance?

Copy link
Contributor

Choose a reason for hiding this comment

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

Also, if the code for the CI steps is identical, this could probably be a build matrix.

@mayantaylor mayantaylor changed the title mac build: architecture flag and .so fixes mac arm build and CI addition Jun 17, 2024
@ritvikrao ritvikrao requested a review from matthiasdiener June 17, 2024 19:48
@ritvikrao
Copy link
Collaborator

I got both the x86 and m1 mac tests to work, but i had to disable thread fork safety checking for it to do so.

just a guess, but the code uses f-strings, which were introduced in 3.6
@ritvikrao
Copy link
Collaborator

Why did you restructure it as a matrix? I split it up because I needed separate run steps for the mac build

@matthiasdiener
Copy link
Contributor

matthiasdiener commented Jun 17, 2024

Why did you restructure it as a matrix? I split it up because I needed separate run steps for the mac build

Most of the steps are identical across the different runs; if there are small differences between the steps, we can resolve them in the build script (via e.g. if [[ ${{ matrix.os }} == 'macos-14' ]]; then ...)

@matthiasdiener
Copy link
Contributor

I think this is ready for review @mayantaylor @ritvikrao . I'm not sure if we should add other Python versions or architectures to CI?

@ritvikrao
Copy link
Collaborator

i think the tests here are sufficient, this looks good to me

@mayantaylor mayantaylor merged commit 78b3eca into main Jun 18, 2024
5 checks passed
@mayantaylor mayantaylor deleted the maya/mac-build branch June 18, 2024 13: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.

3 participants