Skip to content

Drop Node.js 10, 12, 14. Minimum of Node.js 16 now required. #48

Drop Node.js 10, 12, 14. Minimum of Node.js 16 now required.

Drop Node.js 10, 12, 14. Minimum of Node.js 16 now required. #48

Workflow file for this run

name: CI (GitHub)
on:
- push
- pull_request
permissions: {}
jobs:
CI:
permissions:
contents: write
name: ${{ matrix.container || matrix.os }} - Node.js ${{ matrix.nodejs_version }} ${{ matrix.nodejs_arch }} ${{ matrix.prebuild && '- prebuild' }}
runs-on: ${{ matrix.os }}
container: ${{ matrix.container }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-24.04
container: rockylinux:8
nodejs_version: 16
prebuild: true
- os: ubuntu-24.04
container: rockylinux:8
nodejs_version: 18
- os: ubuntu-24.04
container: rockylinux:8
nodejs_version: 20
- os: ubuntu-24.04
container: rockylinux:8
nodejs_version: 22
- os: ubuntu-24.04
container: node:16-alpine3.12
prebuild: true
- os: ubuntu-24.04
container: node:18-alpine3.14
- os: ubuntu-24.04
container: node:20-alpine3.18
- os: ubuntu-24.04
container: node:22-alpine3.20
- os: macos-12
nodejs_version: 16
nodejs_arch: x64
prebuild: true
- os: macos-12
nodejs_version: 18
nodejs_arch: x64
- os: macos-12
nodejs_version: 20
nodejs_arch: x64
- os: macos-12
nodejs_version: 22
nodejs_arch: x64
- os: macos-14
nodejs_version: 18
nodejs_arch: arm64
prebuild: true
- os: macos-14
nodejs_version: 20
nodejs_arch: arm64
- os: macos-14
nodejs_version: 22
nodejs_arch: arm64
- os: windows-2019
nodejs_version: 16
nodejs_arch: x86
prebuild: true
- os: windows-2019
nodejs_version: 18
nodejs_arch: x86
- os: windows-2019
nodejs_version: 20
nodejs_arch: x86
- os: windows-2019
nodejs_version: 22
nodejs_arch: x86
- os: windows-2019
nodejs_version: 16
nodejs_arch: x64
prebuild: true
- os: windows-2019
nodejs_version: 18
nodejs_arch: x64
- os: windows-2019
nodejs_version: 20
nodejs_arch: x64
- os: windows-2019
nodejs_version: 22
nodejs_arch: x64
steps:
- name: Dependencies (Rocky Linux glibc)
if: contains(matrix.container, 'rockylinux')
run: |
curl -sL https://rpm.nodesource.com/setup_${{ matrix.nodejs_version }}.x | bash -
dnf install -y gcc-toolset-11-gcc-c++ make git python3.12 nodejs
echo "/opt/rh/gcc-toolset-11/root/usr/bin" >> $GITHUB_PATH
echo "PYTHON=/usr/bin/python3.12" >> $GITHUB_ENV
- name: Dependencies (Linux musl)
if: contains(matrix.container, 'alpine')
run: apk add build-base git python3 --update-cache
- name: Dependencies (Python - macOS, Windows)
if: contains(matrix.os, 'macos') || contains(matrix.os, 'windows')
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Dependencies (Node.js - macOS, Windows)
if: contains(matrix.os, 'macos') || contains(matrix.os, 'windows')
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.nodejs_version }}
architecture: ${{ matrix.nodejs_arch }}
- name: Add compiler flags
if: matrix.os != 'macos-14'
run: echo "CXXFLAGS=-march=nehalem" >> $GITHUB_ENV
- name: Checkout
uses: actions/checkout@v4
- name: Install
run: npm install --build-from-source --unsafe-perm
- name: Test
run: npm test
- name: Prebuild
if: matrix.prebuild && startsWith(github.ref, 'refs/tags/')
env:
prebuild_upload: ${{ secrets.GITHUB_TOKEN }}
run: npx prebuild --runtime napi --target 8