Skip to content
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

Native CI for osx-arm64 (run tests, native compilation, ...) #1781

Open
h-vetinari opened this issue Jun 16, 2022 · 20 comments
Open

Native CI for osx-arm64 (run tests, native compilation, ...) #1781

h-vetinari opened this issue Jun 16, 2022 · 20 comments

Comments

@h-vetinari
Copy link
Member

Things work pretty well for M1's with all the work that's gone into cross-compilation (and the daily(?) job testing published artefacts), but it would still be nice to be able to test the packaged artifacts on the feedstocks before publishing them.

Adding M1 agents is now on the github roadmap (github/roadmap#528), so perhaps once deployed this could be an interesting way to test the packages. conda-forge already uses GHA's for various things, but not to my knowledge on any feedstock, so this would probably need some work on smithy.

The roadmap issue isn't yet assigned to a specific quarter in the GH roadmap, so it might still be a while, unfortunately. But then, maybe other CI providers like azure end up being faster with offering osx-arm. In any case, I thought I'd open this issue for tracking.

@ngam
Copy link
Contributor

ngam commented Jun 19, 2022

But then, maybe other CI providers like azure end up being faster with offering osx-arm

It's likely that Azure and GHA will offer it at the same time together.

It'll be interesting how we will smoothly move our CI; I guess it could simply be a change in conda-smithy... but idk.

It's also good to coordinate more closely with Anaconda because they now offer M1 packages https://repo.anaconda.com/pkgs/main/osx-arm64/ and I think they're natively built and tested, so it may make sense to coordinate with them, especially if they can communicate their findings (if any) with feedstocks. I tried to look into their CI logs but they're not publicly available.

Generally though, it seems that conda-forge's cross-compilation for osx-arm64 has worked really well. Fwiw, I personally have started using conda only recently (mid 2021) and my main experience with it has been on M1 machines --- I don't remember having any issues.

@BastianZim
Copy link
Member

The roadmap issue isn't yet assigned to a specific quarter in the GH roadmap,

I reached out to GitHub support when they added it to the roadmap, and they plan it by the end of the financial year 2022.

@jaimergp
Copy link
Member

jaimergp commented Dec 15, 2022

The beta is now scheduled for Q3 2023:

image

I found these providers already (or soonish) available, in case someone wants to experiment:

@jaimergp
Copy link
Member

conda/conda experimenting with Cirrus M1 in this PR if you are curious on how it looks like: conda/conda#12079

@h-vetinari h-vetinari changed the title Testing osx-arm packages in feedstock CI (e.g. with future GHA M1 agents) Native CI for osx-arm (run tests, native compilation, ...), e.g. with future GHA M1 agents Jan 30, 2023
@adrianinsaval
Copy link

circleci has m1 machines available, is that a possibility?

@jaimergp
Copy link
Member

They are not part of the free plan, afaik: https://circleci.com/pricing/#comparison-table

@jakirkham
Copy link
Member

GitHub posted a blogpost today about adding M1 workers

https://github.blog/2023-10-02-introducing-the-new-apple-silicon-powered-m1-macos-larger-runner-for-github-actions/

@adrianinsaval
Copy link

It's not clear to me if that's also free for open repos like the rest of the runners

@BastianZim
Copy link
Member

@beckermr
Copy link
Member

open-source runners have landed: https://github.blog/changelog/2024-01-30-github-actions-introducing-the-new-m1-macos-runner-available-to-open-source/

@jaimergp
Copy link
Member

jaimergp commented Feb 2, 2024

The ticket where we might hear from Azure about adding M1 runners: actions/runner-images#8971

@h-vetinari h-vetinari changed the title Native CI for osx-arm (run tests, native compilation, ...), e.g. with future GHA M1 agents Native CI for osx-arm64 (run tests, native compilation, ...) Feb 2, 2024
@jaimergp
Copy link
Member

jaimergp commented Feb 5, 2024

Hey @conda-forge/core, I am curious about your opinion on the following idea: allowing selected feedstocks to run GHA osx-arm64 runners, like we do with the GPU CI.

  • Maintainers would open up a PR in admin-requests applying for access with a justification of need. A core member would review and see if their case is justified (mostly that they can't cross-compile, I'd assume).
  • Once merged, they rerender their feedstock and they'd be allowed to use it.

To note:

  • We don't want to this to DoS our infra jobs.
  • I don't know (yet) how to implement this so people don't abuse it.
  • How do we restrict the number of CI jobs a single feedstock can request? And globally?

@h-vetinari
Copy link
Member Author

allowing selected feedstocks to run GHA osx-arm64 runners, like we do with the GPU CI.

We have ~2200 feedstocks building arm64 packages according to the migrator status page, it seems to me we'd open a can of worms as in where to draw the line for who gets access to a GHA-based queue. For GPUs, we have much fewer affected packages, and a much cleaner line ("does the build time out on Azure?" or "do we absolutely need to test GPU-specific codepaths?").

For example, first-come-first-served sounds like a recipe to resource exhaustion; perhaps I'm too pessimistic but I foresee the possibility of many discussions with a high noise-to-utility ration.

On the other hand, it might still be better than nothing as a stopgap measure while we wait for arm-runners to (hopefully) arrive in Azure Pipelines. 🤷

@beckermr
Copy link
Member

beckermr commented Feb 5, 2024

I think we'd only allow it if for cross-compiled builds are failing to work as opposed to first-come, first served.

@jaimergp
Copy link
Member

jaimergp commented Feb 5, 2024

Yes, I'd argue for a strong proof of "we have tried everything else and it doesn't work". Actually, the only feedstock I can think of is conda-standalone and even in that case it's ok to just build locally.

@anjos
Copy link

anjos commented Feb 26, 2024

In this context, would e.g. luarocks-feedstock qualify for native builds? (c.f. conda-forge/luarocks-feedstock#28) ARM migration is stuck because tests want to run a native executable which of course doesn't work in a cross-compilation environment. Or would we prefer to avoid testing altogether in this instance?

@xhochy
Copy link
Member

xhochy commented Feb 26, 2024

We avoid native testing for all osx-arm64 feedstocks and only run the tests for the feedstock that are just existence tests (i.e. using test -f)

@jaimergp
Copy link
Member

I might be reading this wrong, but this page hints that macos-14 is available in preview in Azure now, which might mean arm64 runners?

The macOS-14 Sonoma image is available in preview

@xhochy
Copy link
Member

xhochy commented Apr 29, 2024

I might be reading this wrong, but this page hints that macos-14 is available in preview in Azure now, which might mean arm64 runners?

The macOS-14 Sonoma image is available in preview

Immediately tried it out at conda-forge/mlx-feedstock#35 and it looks like amd64 runners.

@jaimergp
Copy link
Member

Ah, pity. Yea, uname -m seems to return x86_64:

Installing a fresh version of Miniforge
+ MINIFORGE_URL=https://github.com/conda-forge/miniforge/releases/latest/download
++ uname -m
+ MINIFORGE_FILE=Mambaforge-MacOSX-x86_64.sh

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

No branches or pull requests

9 participants