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

Build on ubuntu-24.04-arm #86

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ jobs:
working-directory: src
strategy:
matrix:
os: [ubuntu-latest]
os: [ubuntu-latest, ubuntu-24.04-arm]
ocaml-compiler:
- 4.14.0
container:
image: ocaml/opam:alpine-3.16-ocaml-4.14
image: ocaml/opam:ubuntu-20.04-ocaml-4.14
options: --user root

steps:
Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ jobs:
working-directory: src
strategy:
matrix:
os: [ubuntu-latest]
os: [ubuntu-latest, ubuntu-24.04-arm]
ocaml-compiler:
- 4.14.0
container:
image: ocaml/opam:alpine-3.16-ocaml-4.14
image: ocaml/opam:ubuntu-20.04-ocaml-4.14
options: --user root

steps:
Expand Down Expand Up @@ -133,6 +133,13 @@ jobs:
name: ubuntu-latest
path: binaries/linux

- name: Download linux-arm64 artifacts
if: success()
uses: actions/download-artifact@master
with:
name: ubuntu-24.04-arm
path: binaries/linux-arm64

- name: Download macOS artifacts
if: success()
uses: actions/download-artifact@master
Expand All @@ -152,6 +159,7 @@ jobs:
run: |
mkdir -p bin
mv binaries/linux/ppx.exe ppx-linux.exe
mv binaries/linux-arm64/ppx.exe ppx-linux-arm64.exe
mv binaries/darwin/ppx.exe ppx-osx.exe
mv binaries/windows/ppx.exe ppx-windows.exe

Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/publish_prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ jobs:
working-directory: src
strategy:
matrix:
os: [ubuntu-latest]
os: [ubuntu-latest, ubuntu-24.04-arm]
ocaml-compiler:
- 4.14.0
container:
image: ocaml/opam:alpine-3.16-ocaml-4.14
image: ocaml/opam:ubuntu-20.04-ocaml-4.14
options: --user root

steps:
Expand Down Expand Up @@ -133,6 +133,13 @@ jobs:
name: ubuntu-latest
path: binaries/linux

- name: Download linux-arm64 artifacts
if: success()
uses: actions/download-artifact@master
with:
name: ubuntu-24.04-arm
path: binaries/linux-arm64

- name: Download macOS artifacts
if: success()
uses: actions/download-artifact@master
Expand All @@ -152,6 +159,7 @@ jobs:
run: |
mkdir -p bin
mv binaries/linux/ppx.exe ppx-linux.exe
mv binaries/linux-arm64/ppx.exe ppx-linux-arm64.exe
mv binaries/darwin/ppx.exe ppx-osx.exe
mv binaries/windows/ppx.exe ppx-windows.exe

Expand Down
16 changes: 15 additions & 1 deletion postInstall.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,21 @@ const installWindowsBinary = () => {

switch (process.platform) {
case "linux":
installMacLinuxBinary("ppx-linux.exe");
switch (process.arch) {
case "amd64":
installMacLinuxBinary("ppx-linux.exe");
break;
case "arm64":
installMacLinuxBinary("ppx-linux-arm64.exe");
break;
default:
// This won't break the installation because the `ppx` shell script remains
// but that script will throw an error in this case anyway
console.warn(
`No release available for platform "${process.platform}" arch "${process.arch}"`
);
process.exit(1);
}
break;
case "darwin":
installMacLinuxBinary("ppx-osx.exe");
Expand Down