Add Linux ARM build #6
Workflow file for this run
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
name: Build & Test | |
on: | |
push: | |
paths: | |
- '.github/workflows/ci.yml' | |
- 'src/**' | |
- 'vendor/**' | |
- 'tests/**' | |
- '*.js' | |
pull_request: | |
paths: | |
- '.github/workflows/ci.yml' | |
- 'src/**' | |
- 'vendor/**' | |
- 'tests/**' | |
- '*.js' | |
jobs: | |
build-and-test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
node-version: [ 16.x, 18.x, 20.x ] | |
os: [ ubuntu-latest, macos-latest, windows-latest ] | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Add msbuild to PATH | |
if: matrix.os == 'windows-latest' | |
uses: microsoft/[email protected] | |
- name: Build | |
run: | | |
npm install && npm run rebuild | |
- name: Test | |
uses: nick-fields/retry@v2 | |
with: | |
max_attempts: 3 | |
retry_on: error | |
timeout_minutes: 6 | |
command: | | |
npm test | |
build-and-test-linux-arm: | |
name: Linux ARM - Node.js ${{ matrix.node-version }} | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
node-version: [ 20.15.1 ] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: uraimo/run-on-arch-action@v2 | |
with: | |
arch: aarch64 | |
distro: bullseye | |
githubToken: ${{ github.token }} | |
install: | | |
set -e -o pipefail | |
apt-get update | |
apt-get install -y g++ make python3 curl xz-utils | |
mkdir -p /opt/nodejs | |
curl --silent https://nodejs.org/dist/v${{ matrix.node-version }}/node-v${{ matrix.node-version }}-linux-arm64.tar.xz | tar xJC /opt/nodejs --strip-components=1 | |
run: | | |
export PATH=/opt/nodejs/bin:$PATH | |
npm install | |
npm run rebuild | |
npm test | |
build-and-test-alpine: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [ 16, 18, 20 ] | |
container: node:${{ matrix.node-version }}-alpine | |
steps: | |
- uses: actions/checkout@v4 | |
- name: install build deps | |
run: | | |
apk add g++ make python3 | |
- name: Build | |
run: | | |
npm install && npm run rebuild | |
- name: Test | |
run: | | |
npm test | |
timeout-minutes: 4 |