erlef / otp_builds

Community-maintained pre-compiled Erlang/OTP for macOS
Apache License 2.0
29 stars 0 forks source link

Initial implementation #1

Closed wojtekmach closed 1 month ago

wojtekmach commented 2 months ago

This is the implementation of the OTP macOS builds proposal.

Updated README.md: https://github.com/erlef/otp_builds/blob/wm-initial/README.md

As you can see in commits list, the GitHub job automatically commits builds/*.txt changes.

Builds can be manually triggered like this:

ref=OTP-27.0.1;
gh workflow run build.yaml \
  -R erlef/otp_builds \
  --ref wm-initial \
  -f otp-ref-name=$ref \
  -f otp-ref=$(gh api repos/erlang/otp/commits/$ref --jq .sha)

Example

$ curl --fail -LO https://github.com/erlef/otp_builds/releases/download/OTP-27.0.1/OTP-27.0.1-macos-arm64.tar.gz
$ mkdir /tmp/otp ; tar xzf OTP-27.0.1-macos-arm64.tar.gz --cd /tmp/otp
$ /tmp/otp/bin/erl
Erlang/OTP 27 [erts-15.0.1] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [jit]

Eshell V15.0.1 (press Ctrl+G to abort, type help(). for help)
1>
wojtekmach commented 2 months ago

@paulo-ferraz-oliveira @starbelly thank you for the feedback. Regarding https://github.com/jelly-beam/otp-macos, it is quite comprehensive and it's a great starting point. Now that you can see how I tried implementing this, we can consider the next steps.

Would you rather:

  1. merge changes from this PR to jelly-beam/otp-macos, rename it to erlef/otp-macos
  2. merge changes from jelly-beam/otp-macos here
  3. ignore this PR, merge jelly-beam/otp-macos as is here

?

paulo-ferraz-oliveira commented 2 months ago

Would you rather:

"merge changes from jelly-beam/otp-macos here", for me 👍

Some stuff can be adapted, I guess, but only if there's a need for it; as long as we have the builds here there's only a few details I'd update, but I don't think they'll change the base behaviour:

This said, I'd go with your current implementation; it's a good starting point and I can see a couple of advantages:

I'm also Ok with using otp-macos but it'd need some issues taken care of (remove brew and kerl, for example; add wxWigets), so it's less relevant here.

starbelly commented 2 months ago

This said, I'd go with your current implementation; it's a good starting point and I can see a couple of advantages:

* compiling OpenSSL (instead of `brew`ing it),

* doing all stuff by hand (instead of `kerl`ing it),

* using wxWidgets (I didn't test that as a default for `kerl` so it's possible it's not working, but it's better to have it, too)

I'm also Ok with using otp-macos but it'd need some issues taken care of (remove brew and kerl, for example; add wxWigets), so it's less relevant here.

☝️ That. Let's go with this PR, then roll in changes that were done in otp-macos, collaboratively.

wojtekmach commented 2 months ago

Sounds good, I’ll send some updates here soon!

starbelly commented 2 months ago

@wojtekmach Just to confirm, you are ready for this to be merged?

wojtekmach commented 2 months ago

Not quite yet, I'll merge this myself if that's OK.

wojtekmach commented 1 month ago

I have made the following changes:

  1. I added a disclaimer at the top of the README saying this is a work in progress. I'd like to go over all issues and PRs and built all releases all the way back to OTP 25.0. Then I'd consider this ready.
  2. I changed naming from macos-{amd64,arm64} to {x86_64,aarch64}-apple-darwin in filenames. The rationale was we'd match erlang:system_info(system_architecture). I'm going to keep build artifacts using old names for a while since beamup was already using this project.
  3. I changed builds/*.txt to builds/*.csv and added openssl and wxwidgets versions there.

I'm going to merge this as is to unblock others tasks but please feel free to keep the discussion going here or in other issues.

Thanks everyone for reviewing this!