Skip to content

Commit

Permalink
Merge pull request #203 from heydovetail/cmanou/arm-linux
Browse files Browse the repository at this point in the history
Add arm64 Linux prebuilds
  • Loading branch information
uhop committed Feb 23, 2024
2 parents b8c0225 + a617837 commit 8b49721
Show file tree
Hide file tree
Showing 10 changed files with 141 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/actions/linux-arm64-node-18/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM --platform=linux/arm64 node:18-buster

RUN apt install python3 make gcc g++

COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
12 changes: 12 additions & 0 deletions .github/actions/linux-arm64-node-18/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: 'Create a binary artifact for Node == 18 on Linux on ARM64'
description: 'Create a binary artifact for Node == 18 on Linux on ARM64 using node:18-buster'
inputs:
node-version:
description: 'Node.js version'
required: false
default: '18'
runs:
using: 'docker'
image: 'Dockerfile'
args:
- ${{inputs.node-version}}
10 changes: 10 additions & 0 deletions .github/actions/linux-arm64-node-18/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/sh

set -e

export USERNAME=`whoami`
export DEVELOPMENT_SKIP_GETTING_ASSET=true
npm i
npm run build --if-present
npm test
npm run save-to-github
6 changes: 6 additions & 0 deletions .github/actions/linux-arm64-node-20/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM --platform=linux/arm64 node:20-buster

RUN apt install python3 make gcc g++

COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
12 changes: 12 additions & 0 deletions .github/actions/linux-arm64-node-20/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: 'Create a binary artifact for Node 20 on Linux on ARM64'
description: 'Create a binary artifact for Node 20 on Linux on ARM64 using node:20-buster'
inputs:
node-version:
description: 'Node.js version'
required: false
default: '20'
runs:
using: 'docker'
image: 'Dockerfile'
args:
- ${{inputs.node-version}}
10 changes: 10 additions & 0 deletions .github/actions/linux-arm64-node-20/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/sh

set -e

export USERNAME=`whoami`
export DEVELOPMENT_SKIP_GETTING_ASSET=true
npm i
npm run build --if-present
npm test
npm run save-to-github
6 changes: 6 additions & 0 deletions .github/actions/linux-arm64-node-21/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM --platform=linux/arm64 node:21-bullseye

RUN apt install python3 make gcc g++

COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
12 changes: 12 additions & 0 deletions .github/actions/linux-arm64-node-21/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: 'Create a binary artifact for Node 21 on Linux on ARM64'
description: 'Create a binary artifact for Node 21 on Linux on ARM64 using node:21-bullseye'
inputs:
node-version:
description: 'Node.js version'
required: false
default: '21'
runs:
using: 'docker'
image: 'Dockerfile'
args:
- ${{inputs.node-version}}
10 changes: 10 additions & 0 deletions .github/actions/linux-arm64-node-21/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/sh

set -e

export USERNAME=`whoami`
export DEVELOPMENT_SKIP_GETTING_ASSET=true
npm i
npm run build --if-present
npm test
npm run save-to-github
57 changes: 57 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,3 +140,60 @@ jobs:
uses: ./.github/actions/linux-alpine-node-21/
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

build-linux-arm64-node-18:
name: Node.js 18 on Debian Buster on ARM64
needs: create-release
runs-on: ubuntu-latest
continue-on-error: true

steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: arm64
- name: Install, test, and create artifact
uses: ./.github/actions/linux-arm64-node-18/
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

build-linux-arm64-node-20:
name: Node.js 20 on Debian Buster on ARM64
needs: create-release
runs-on: ubuntu-latest
continue-on-error: true

steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: arm64
- name: Install, test, and create artifact
uses: ./.github/actions/linux-arm64-node-20/
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

build-linux-arm64-node-21:
name: Node.js 21 on Debian Buster on ARM64
needs: create-release
runs-on: ubuntu-latest
continue-on-error: true

steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: arm64
- name: Install, test, and create artifact
uses: ./.github/actions/linux-arm64-node-21/
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

0 comments on commit 8b49721

Please sign in to comment.