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

Add CI builds for Apple Silicon #441

Closed
wants to merge 2 commits into from
Closed

Add CI builds for Apple Silicon #441

wants to merge 2 commits into from

Conversation

Insprill
Copy link
Collaborator

@Insprill Insprill commented Oct 3, 2023

Also renames all the artifacts to Psst-target with target being the Rust build target, to keep the naming consistent. The README links have also been updated to point to the new artifacts.

@Insprill Insprill linked an issue Oct 3, 2023 that may be closed by this pull request
@jacksongoode
Copy link
Collaborator

Crazy it ran so well emulated on Intel!

@jacksongoode jacksongoode self-requested a review October 4, 2023 22:07
jacksongoode
jacksongoode previously approved these changes Oct 4, 2023
Copy link
Collaborator

@jacksongoode jacksongoode left a comment

Choose a reason for hiding this comment

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

I like it, eventually Linux on arm might also be something we should add support for as well.

@jacksongoode
Copy link
Collaborator

Hmm, I'm not sure if this built successfully for arm @Insprill? It is still emulated from the artifact that was built.

image

@Insprill
Copy link
Collaborator Author

Insprill commented Oct 5, 2023

That's the aarch64-apple-darwin build?

@jacksongoode
Copy link
Collaborator

Yeah that's correct, are you on an M1/M2 to test? I believe we might need to add macOS arm to other places like keyexchange.rs because there is no PLATFORM_OSX_ARM key anywhere.

@Insprill
Copy link
Collaborator Author

Insprill commented Oct 5, 2023

I don't have a Mac to test this on. I thought just building to the aarch64 target would've done the trick. I'm not sure where the data in keyexchange.rs comes from or what it's used for, but it's related to the Spotify API, so I don't think it'd cause the application to be running as Intel. I'm assuming you have an M1/M2 Mac, if you build locally, does it work correctly? GitHub doesn't have Apple Silicon runners so if it needs to be built on one then we're out of luck, but we should be able to cross-compile it.

@jacksongoode
Copy link
Collaborator

Unfortunately, the last commit still runs on Intel.

@jacksongoode
Copy link
Collaborator

jacksongoode commented Oct 6, 2023

Hmm, it seems they recently released M1 runners actions/runner-images#8439 but they can't be used on free plans? macos-latest-xlarge is the runner for macOS arm - we could try it?

@jacksongoode
Copy link
Collaborator

@jacksongoode
Copy link
Collaborator

@Insprill Would I be able to push to this branch to test out the action above?

@Insprill
Copy link
Collaborator Author

Go for it. I also found this script someone else uses it, but I haven't gotten a chance to look into it yet if that's something you'd like to do. It's a little hard for me to work on this since I don't have any Apple Silicon to test on.

@jacksongoode
Copy link
Collaborator

@Insprill I think your branch is protected, as I'm not able to commit to it.

@Insprill Insprill marked this pull request as draft October 26, 2023 21:03
@Insprill
Copy link
Collaborator Author

I'm not sure why that'd be as I don't have access to branch protection rules. If you can't directly push here you can make another branch based on this one and do your testing there.

@radeva
Copy link

radeva commented Jan 18, 2024

@Insprill @jacksongoode In case you need free minutes on M1, you can try FlyCI's M1 and M2 runners. They are on average 2x faster and 2x cheaper than GitHub's AND we have a free tier for OSS projects (see below).

Install Instructions

  1. Install FlyCI app and
  2. Easily replace one line of code and start using FlyCI runners:
jobs:
 ci:
-    runs-on: macos-latest
+    runs-on: flyci-macos-large-latest-m1
   steps:
   - name: 👀 Checkout repo
     uses: actions/checkout@v4

500 mins/month Free for Public Repos

Since your repo is public, FlyCI offers 500 mins/month of free M1 runner usage with the flyci-macos-large-latest-m1 runner for public projects.

Don't hesitate to contact us in case the free tier doesn't suit your needs or you experience any issues with the runners. Our team is here to support you!

Best Regards,
Veselina Radeva
Product Manager at FlyCI

@dscso
Copy link
Contributor

dscso commented Jan 22, 2024

There is no need to run on a M1. You can also run on a x86 to crosscompile. See #450

@jacksongoode
Copy link
Collaborator

@Insprill We can close this as well given #450

@Insprill Insprill closed this Jan 23, 2024
@Insprill Insprill deleted the ci-targets branch January 23, 2024 02:00
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.

Apple Silicon Support
4 participants