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

Update build script to build ARM64 version on Apple Silicon machines #1918

Merged

Conversation

PikachuEXE
Copy link
Collaborator

@PikachuEXE PikachuEXE commented Nov 26, 2021

Pull Request Type
Please select what type of pull request this is:

  • Feature Implementation

Related issue
Extracted from #1888 in case that PR is not updated

Description
Build script run on MacOS would detect CPU type (name matching) and build binary with corresponding architecture
which is x64/arm64

Screenshots (if appropriate)
Running process of locally built binary:
image

Testing (for code that is not small enough to be easily understandable)

  • npm run build --if-present
  • Run built binary
  • Check "Kind" in activity monitor

Desktop (please complete the following information):

  • OS: MacOS
  • OS Version: 12.0.1
  • FreeTube version: 341968c

Additional context
This does not include build action update
GH runner does not support it yet

@PikachuEXE PikachuEXE added the OS: macos All issues related to Macs, as we do not have one to test things label Nov 29, 2021
@PikachuEXE PikachuEXE marked this pull request as ready for review November 29, 2021 01:48
@PikachuEXE
Copy link
Collaborator Author

Since #1888 is not updated yet I am submitting this one for faster review

@PikachuEXE PikachuEXE added the PR: waiting for review For PRs that are complete, tested, and ready for review label Nov 29, 2021
Copy link
Member

Choose a reason for hiding this comment

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

I dont have a mac but if this works for u, im fine with it

@PikachuEXE
Copy link
Collaborator Author

I have tested this on MacBook Pro (14-inch, 2021)
I got a Macbook Air 2020 too but I think would be similar (tested cpus[0].model.startsWith('Apple') but not actual building)

Copy link
Member

@ChunkyProgrammer ChunkyProgrammer left a comment

Choose a reason for hiding this comment

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

Not a mac user but code looks fine

@PikachuEXE
Copy link
Collaborator Author

Not very urgent but I have been using this updated script for building my own version for apple silicon

@PikachuEXE PikachuEXE requested review from kommunarr and peepo5 and removed request for peepo5 and kommunarr January 18, 2022 06:26
@PikachuEXE PikachuEXE force-pushed the feature/apple-arm64-build branch from d11eca2 to 0241e91 Compare February 7, 2022 01:42
@PrestonN PrestonN enabled auto-merge (squash) February 7, 2022 01:42
@PikachuEXE PikachuEXE force-pushed the feature/apple-arm64-build branch from 0241e91 to 1277346 Compare February 15, 2022 01:35
@PikachuEXE PikachuEXE force-pushed the feature/apple-arm64-build branch from 1277346 to 716c683 Compare May 12, 2022 03:39
@PikachuEXE
Copy link
Collaborator Author

Copy link
Contributor

@peepo5 peepo5 left a comment

Choose a reason for hiding this comment

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

Looks bussin

@PikachuEXE
Copy link
Collaborator Author

However this change does not enable building ARM64 version for Apple Silicon on GitHub Action (nor universal version)
Need more study if that's desired

@PikachuEXE PikachuEXE requested a review from Svallinn May 13, 2022 01:07
Copy link
Member

@PrestonN PrestonN left a comment

Choose a reason for hiding this comment

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

Also don't have a Mac, but if this is working for you then I'm okay with it.

I'd like to have GitHub Actions create Apple Silicon builds, though IIRC they don't have the proper VMs required to build for it, so we can't offer it right now.

If / when GitHub Actions add support for Apple Silicon, then I'd be interested in starting to offer it.

@PrestonN PrestonN merged commit 80b1e43 into FreeTubeApp:development May 14, 2022
@github-actions github-actions bot removed the PR: waiting for review For PRs that are complete, tested, and ready for review label May 14, 2022
@PikachuEXE PikachuEXE deleted the feature/apple-arm64-build branch May 14, 2022 22:54
@absidue
Copy link
Member

absidue commented May 18, 2022

As this PR is merged, #1888 can probably be closed now.

@efb4f5ff-1298-471a-8973-3d47447115dc

Good catch! I've closed it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OS: macos All issues related to Macs, as we do not have one to test things
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants