vyper icon indicating copy to clipboard operation
vyper copied to clipboard

feat: Build for aarch64

Open kelvinfan001 opened this issue 3 years ago • 7 comments

What I did

Edit Makefile to specify target arch as universal2 for pyinstaller.

Note: Pending fix in https://github.com/actions/virtual-environments/issues/4133.

How I did it

Add --target-architecture=universal2 in the make freeze rule for macOS.

xref: https://github.com/vyperlang/vyper/discussions/2675#discussioncomment-2230879

How to verify it

Run the workflow to build artifacts.

Description for the changelog

Create official binary releases for aarch64 machines.

Cute Animal Picture

AdobeStock_209028852

kelvinfan001 avatar Mar 03 '22 03:03 kelvinfan001

Codecov Report

Merging #2687 (f57e4c5) into master (4f9f813) will increase coverage by 0.02%. The diff coverage is n/a.

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@            Coverage Diff             @@
##           master    #2687      +/-   ##
==========================================
+ Coverage   89.09%   89.12%   +0.02%     
==========================================
  Files          84       84              
  Lines       10763    10763              
  Branches     2452     2452              
==========================================
+ Hits         9589     9592       +3     
+ Misses        781      776       -5     
- Partials      393      395       +2     

see 3 files with indirect coverage changes

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

codecov-commenter avatar Mar 03 '22 03:03 codecov-commenter

note: this would break current macos-latest in the unix build matrix. see e.g. https://github.com/charles-cooper/vyper/runs/5401409429?check_suite_focus=true Screenshot from 2022-03-02 20-15-52

we will have to wait for the fix in https://github.com/actions/virtual-environments/issues/4133 to be merged before merging this.

charles-cooper avatar Mar 03 '22 04:03 charles-cooper

another issue seems to be that the pycryptodome .so is not a fat binary even when python is https://github.com/charles-cooper/vyper/runs/5403151996?check_suite_focus=true#step:3:627 Screenshot from 2022-03-02 22-55-35

charles-cooper avatar Mar 03 '22 06:03 charles-cooper

another issue seems to be that the pycryptodome .so is not a fat binary even when python is https://github.com/charles-cooper/vyper/runs/5403151996?check_suite_focus=true#step:3:627 Screenshot from 2022-03-02 22-55-35

it needs to be built from source - https://github.com/charles-cooper/vyper/commit/c47687a5bca4250560378edb840282bf62dbcfa0

charles-cooper avatar Mar 03 '22 07:03 charles-cooper

@kelvinfan001 looks like the upstream issue was fixed! do you mind if i update this PR or would you like to work on it?

charles-cooper avatar Jun 17 '22 20:06 charles-cooper

@charles-cooper thanks for the update! Feel free to update the PR, as I am no longer working on this.

kelvinfan001 avatar Jun 17 '22 20:06 kelvinfan001

blocked on https://github.com/actions/setup-python/issues/439

charles-cooper avatar Jun 19 '22 16:06 charles-cooper

Any update on this ? Almost all new macbooks are M1 & M2 and we still don't have support for it, which is very wierd since the entire project is in python.

asafyish avatar Feb 09 '23 10:02 asafyish

Seems like all blockers are resolved, will let @charles-cooper do a final review and merge

fubuloubu avatar Feb 09 '23 14:02 fubuloubu

I don't think the blockers were resolved, there was some issue with universal2 images upstream. In any case the build needs to be revisited

charles-cooper avatar Feb 09 '23 19:02 charles-cooper

this seems to be working now, see https://github.com/vyperlang/vyper/actions/runs/5014440028/jobs/8988693913

charles-cooper avatar May 18 '23 13:05 charles-cooper