-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 prebuild for macos arm64, enable prebuilds to be run individually. #2451
Open
btsimonh
wants to merge
15
commits into
Automattic:prebuilds
Choose a base branch
from
btsimonh:addmacosarm
base: prebuilds
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+191
−10
Open
Changes from 13 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
2d01192
add library locations which work on macos-13 and macos-latest (arm64)
btsimonh 661eae6
Add choice of prebuild to build.
btsimonh 25ebf70
fix typos
btsimonh 4ea4200
move macosarm above macos, just to make the commit look cleaner.
btsimonh fa6374f
fix uploaded names
btsimonh 94e6103
Add to readme in prebuild branch
btsimonh 9320ad2
Update .github/workflows/prebuild.yaml
btsimonh e978dec
Update .github/workflows/prebuild.yaml
btsimonh 51dba16
Update .github/workflows/prebuild.yaml
btsimonh 4c9be3c
Update .github/workflows/prebuild.yaml
btsimonh 389c98f
Update .github/workflows/prebuild.yaml
btsimonh ca9bfdc
Update .github/workflows/prebuild.yaml
btsimonh d4ece18
Update .github/workflows/prebuild.yaml
btsimonh 70f3ead
Update README.md
btsimonh 51de893
Update .github/workflows/prebuild.yaml
btsimonh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,94 @@ | ||
This is the prebuild branch. The only directory used in it is prebuild/. Otherwise files are taken from the branch being built. | ||
This is the prebuild branch. | ||
|
||
The only directory used in it is prebuild/. | ||
|
||
Otherwise files are taken from the branch being built. | ||
|
||
# Changes: | ||
|
||
## 2024-11-01 btsimonh | ||
|
||
Added the below notes. | ||
|
||
Added macos arm64 prebuilds. | ||
|
||
|
||
|
||
# notes from prebuild.yml: | ||
|
||
``` | ||
# Release procedure: | ||
# 1. On the master branch, update the changelog and stage it in git. | ||
# 2. Run `yarn version --[major|minor|patch]`. (This tags the commit.) | ||
# 3. Push both the commit and tags to GitHub (`git push --tags Automattic` and | ||
# `git push Automattic HEAD:master`, where "Automattic" is the remote name | ||
# for [email protected]:Automattic/node-canvas.git). | ||
# 4. Create a draft release manually using the GitHub UI for the new tag. | ||
# 5. Switch to the prebuilds branch. | ||
# 6. Set the `jobs.*.strategy.matrix.node` arrays to the set of Node.js versions | ||
# to build for. | ||
# 7. Set the `jobs.*.strategy.matrix.canvas_tag` arrays to the set of Canvas | ||
# tags to build. (Usually this is a single tag, but can be an array when a | ||
# new version of Node.js is released and older versions of Canvas need to be | ||
# built.) | ||
# 8. Commit this file and push. | ||
# 9. In the Actions tab, navigate to the "Make Prebuilds" workflow and click | ||
# "Run workflow". Select the `prebuilds` branch so that that branch's | ||
# prebuild.yaml file is used. | ||
# 10.Once the builds succeed, promote the draft release to a full release and | ||
# run npm publish. | ||
|
||
# Note that the files in the prebuild/ directory will be used from the commit | ||
# that was used to trigger the prebuild workflow. They will not be from the | ||
# commit/tag that you are building. Because of differences in the provided | ||
# versions of git, this is achieved in a different way on Linux than on Mac and | ||
# Win. | ||
# | ||
# Pay particular attention to changes to binding.gyp on master. That file is not | ||
# used! The ones in prebuild/**/ are. | ||
|
||
# Tip: If uploads are inexplicably failing, open the release in GitHub, click | ||
# "edit" and delete any assets that are in purgatory (have a /!\ next to them). | ||
``` | ||
|
||
### Prebuilding only a specific platform: | ||
|
||
When manually running `Make Prebuilds`, you should be asked for `Target os`. | ||
|
||
Select the single target os OR the default multiple OSes. | ||
|
||
|
||
### prebuilding for your own repo. | ||
|
||
If you fork, and prebuild on your own repo, you will need to create a release based on a tag. | ||
|
||
Prebuild WILL checkout the tag you specify in the cavnas tag property for each OS, and will build THAT tag from master - not your master HEAD or another branch. | ||
|
||
e.g.: | ||
``` | ||
canvas_tag: ["vdev"] # e.g. "v2.6.1"` | ||
``` | ||
|
||
Prebuild will upload the output to YOUR repo into the release you created. | ||
|
||
IF you want to USE your prebuilds, you would need to change (in package.json): | ||
``` | ||
"repository": "git://github.com/Automattic/node-canvas.git", | ||
``` | ||
and | ||
``` | ||
"version": "3.0.0-rc2", | ||
``` | ||
in the installed branch to reflect the repo you want to pull released prebuilds from, | ||
|
||
and for version, this MUST match your tag without 'v' prefix (e.g. a version of 'dev' needs a tag of 'vdev') | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
btsimonh marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,6 +34,8 @@ | |
'<!@(pkg-config pangocairo --libs)', | ||
'<!@(pkg-config freetype2 --libs)', | ||
'<!@(pkg-config librsvg-2.0 --libs)', | ||
'<!@(pkg-config libjpeg --libs)', | ||
'-L/opt/homebrew/lib', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Running We should support both paths. |
||
'-ljpeg', | ||
'-lgif' | ||
], | ||
|
@@ -43,7 +45,8 @@ | |
'<!@(pkg-config libpng --cflags-only-I | sed s/-I//g)', | ||
'<!@(pkg-config pangocairo --cflags-only-I | sed s/-I//g)', | ||
'<!@(pkg-config freetype2 --cflags-only-I | sed s/-I//g)', | ||
'<!@(pkg-config librsvg-2.0 --cflags-only-I | sed s/-I//g)' | ||
'<!@(pkg-config librsvg-2.0 --cflags-only-I | sed s/-I//g)', | ||
'/opt/homebrew/include' | ||
], | ||
'cflags+': ['-fvisibility=hidden'], | ||
'xcode_settings': { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GitHub Actions docs on detecting the operating system: https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/store-information-in-variables#detecting-the-operating-system