CI: Add linux-arm (v6, 32-bit) #950
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: CI (GitHub) | |
on: | |
- push | |
- pull_request | |
permissions: {} | |
jobs: | |
CI: | |
permissions: | |
contents: write # for npx prebuild to make release | |
name: ${{ matrix.container || matrix.os }} - Node.js ${{ matrix.platform }} ${{ matrix.nodejs_arch }} ${{ matrix.prebuild && '- prebuild' }} | |
runs-on: ${{ matrix.os }} | |
container: ${{ matrix.container }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: ubuntu-22.04 | |
container: rockylinux:8 | |
nodejs_version: "^18.17.0" | |
platform: linux-x64 | |
prebuild: true | |
- os: ubuntu-22.04 | |
container: rockylinux:8 | |
nodejs_version: "^20.3.0" | |
platform: linux-x64 | |
- os: ubuntu-22.04 | |
container: node:18-alpine3.17 | |
platform: linuxmusl-x64 | |
prebuild: true | |
- os: ubuntu-22.04 | |
container: node:20-alpine3.18 | |
platform: linuxmusl-x64 | |
- os: macos-11 | |
nodejs_version: "^18.17.0" | |
nodejs_arch: x64 | |
platform: darwin-x64 | |
prebuild: true | |
- os: macos-11 | |
nodejs_version: "^20.3.0" | |
nodejs_arch: x64 | |
platform: darwin-x64 | |
- os: windows-2019 | |
nodejs_version: "^18.17.0" | |
nodejs_arch: x86 | |
platform: win32-ia32 | |
prebuild: true | |
- os: windows-2019 | |
nodejs_version: "^20.3.0" | |
nodejs_arch: x86 | |
platform: win32-ia32 | |
- os: windows-2019 | |
nodejs_version: "^18.17.0" | |
nodejs_arch: x64 | |
platform: win32-x64 | |
prebuild: true | |
- os: windows-2019 | |
nodejs_version: "^20.3.0" | |
nodejs_arch: x64 | |
platform: win32-x64 | |
steps: | |
- name: Dependencies (Linux glibc) | |
if: contains(matrix.container, 'centos') | |
run: | | |
NODE_MAJOR="${{ contains(matrix.nodejs_version, '^18.') && '18' || '20' }}" | |
yum install -y https://rpm.nodesource.com/pub_${NODE_MAJOR}.x/nodistro/repo/nodesource-release-nodistro-1.noarch.rpm | |
yum install -y https://packages.endpointdev.com/rhel/7/os/x86_64/endpoint-repo.x86_64.rpm | |
yum install -y centos-release-scl | |
yum install -y devtoolset-11-gcc-c++ make git python3 nodejs fontconfig google-noto-sans-fonts | |
echo "/opt/rh/devtoolset-11/root/usr/bin" >> $GITHUB_PATH | |
- name: Dependencies (Rocky Linux glibc) | |
if: contains(matrix.container, 'rockylinux') | |
run: | | |
NODE_MAJOR="${{ contains(matrix.nodejs_version, '^18.') && '18' || '20' }}" | |
dnf install -y https://rpm.nodesource.com/pub_${NODE_MAJOR}.x/nodistro/repo/nodesource-release-nodistro-1.noarch.rpm | |
dnf install -y --setopt=nodesource-nodejs.module_hotfixes=1 nodejs | |
dnf install -y gcc-toolset-11-gcc-c++ make git python3 fontconfig google-noto-sans-fonts | |
echo "/opt/rh/gcc-toolset-11/root/usr/bin" >> $GITHUB_PATH | |
- name: Dependencies (Linux musl) | |
if: contains(matrix.container, 'alpine') | |
run: apk add build-base git python3 font-noto --update-cache | |
- name: Dependencies (Python 3.11 - macOS, Windows) | |
if: contains(matrix.os, 'macos') || contains(matrix.os, 'windows') | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- name: Dependencies (Node.js - macOS, Windows) | |
if: contains(matrix.os, 'macos') || contains(matrix.os, 'windows') | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.nodejs_version }} | |
architecture: ${{ matrix.nodejs_arch }} | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Fix working directory ownership | |
if: matrix.container | |
run: chown root.root . | |
- name: Install | |
run: npm install --build-from-source | |
- name: Test | |
run: npm test | |
- name: Prebuild | |
if: matrix.prebuild && startsWith(github.ref, 'refs/tags/') | |
env: | |
prebuild_upload: ${{ secrets.GITHUB_TOKEN }} | |
run: npx prebuild | |
linux-arm: | |
permissions: | |
contents: write | |
name: linux-arm - Node.js 18 - prebuild | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: uraimo/run-on-arch-action@v2 | |
with: | |
arch: armv6 | |
distro: buster | |
env: | | |
nodejs_version: "18.17.0" | |
prebuild_upload: "${{ startsWith(github.ref, 'refs/tags/') && secrets.GITHUB_TOKEN || '' }}" | |
run: | | |
apt-get update | |
apt-get install -y fontconfig fonts-noto-core g++ git libatomic1 make python3 xz-utils | |
mkdir /opt/nodejs | |
curl --silent https://unofficial-builds.nodejs.org/download/release/v${nodejs_version}/node-v${nodejs_version}-linux-armv6l.tar.xz | tar xJC /opt/nodejs --strip-components=1 | |
export PATH=$PATH:/opt/nodejs/bin | |
chown root.root . | |
npm install --build-from-source | |
npx mocha --no-config --spec=test/unit/io.js | |
[[ -n $prebuild_upload ]] && npx prebuild || true |