Skip to content

Bump @mapbox/node-pre-gyp from 1.0.11 to 2.0.0 (#227) #733

Bump @mapbox/node-pre-gyp from 1.0.11 to 2.0.0 (#227)

Bump @mapbox/node-pre-gyp from 1.0.11 to 2.0.0 (#227) #733

Workflow file for this run

name: Node.js CI
on:
push:
branches: main
paths-ignore:
- 'CHANGELOG.md'
- 'README.md'
pull_request:
branches: main
paths-ignore:
- 'CHANGELOG.md'
- 'README.md'
jobs:
release:
runs-on: ${{ matrix.platform }}
strategy:
fail-fast: false
matrix:
node-version: [ 18.x, 20.x, 22.x, 23.x ]
platform: [ ubuntu-latest, ubuntu-20.04, windows-latest, macos-13, macos-14 ]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: (if on Ubuntu 20.04) switch to g++ 10
run: |
echo CC=gcc-10 >> $GITHUB_ENV
echo CXX=g++-10 >> $GITHUB_ENV
if: matrix.platform == 'ubuntu-20.04'
- name: (if on Ubuntu) install fonts
run: sudo apt-get install -y fonts-ubuntu || true
if: ${{ contains(matrix.platform, 'ubuntu') }}
- name: Cache conan artifacts
id: conan-artifacts
uses: actions/cache@v4
with:
path: ~/.conan
key: ${{ matrix.platform }}
- name: Cache short-path conan artifacts on Windows
uses: actions/cache@v4
with:
path: C:/.conan
key: ${{ matrix.platform }}-short-path
if: runner.os == 'Windows'
- run: npm install --ignore-scripts --production
- run: npm install typescript
- run: npx node-pre-gyp configure
env:
PKG_CONFIG_PATH:
- run: npx node-pre-gyp build
- run: npm install
- run: npm test
debug:
runs-on: ${{ matrix.platform }}
strategy:
fail-fast: false
matrix:
platform: [ ubuntu-latest, macos-13 ]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
- name: Use Node.js 18.x
uses: actions/setup-node@v4
with:
node-version: 18.x
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: (if on Ubuntu 20.04) switch to g++ 10
run: |
echo CC=gcc-10 >> $GITHUB_ENV
echo CXX=g++-10 >> $GITHUB_ENV
if: matrix.platform == 'ubuntu-20.04'
- name: (if on Ubuntu) install fonts
run: sudo apt-get install -y fonts-ubuntu || true
if: ${{ contains(matrix.platform, 'ubuntu') }}
- name: Cache conan artifacts
id: conan-artifacts
uses: actions/cache@v4
with:
path: ~/.conan
key: ${{ matrix.platform }}-debug
- run: npm install --ignore-scripts --production
- run: npm install typescript
- run: npx node-pre-gyp configure --debug
env:
PKG_CONFIG_PATH:
- run: npx node-pre-gyp build
- run: npm install
- run: npm test
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
- name: Use Node.js 18.x
uses: actions/setup-node@v4
with:
node-version: 18.x
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- run: npm install --ignore-scripts
- run: npm install typescript
- run: npm run lint
asan:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
- name: Use Node.js 18.x
uses: actions/setup-node@v4
with:
node-version: 18.x
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install fonts
run: sudo apt-get install -y fonts-ubuntu || true
- name: Cache conan artifacts
id: conan-artifacts
uses: actions/cache@v4
with:
path: ~/.conan
key: asan
- run: npm install --ignore-scripts --production
- run: npm install typescript
- run: npx node-pre-gyp configure --debug --enable_asan
env:
PKG_CONFIG_PATH:
- run: npx node-pre-gyp build
- run: npm install
- run: node node_modules/mocha/lib/cli/cli.js
continue-on-error: true
env:
LSAN_OPTIONS: suppressions=${{ github.workspace }}/test/napi-leaks-suppression.txt
LD_PRELOAD: /usr/lib/x86_64-linux-gnu/libasan.so.6.0.0
codecov:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
- name: Use Node.js 18.x
uses: actions/setup-node@v4
with:
node-version: 18.x
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install fonts
run: sudo apt-get install -y fonts-ubuntu || true
- name: Cache conan artifacts
id: conan-artifacts
uses: actions/cache@v4
with:
path: ~/.conan
key: codecov
- run: npm install --ignore-scripts --production
- run: npm install typescript
- run: npx node-pre-gyp configure --debug --enable_coverage
env:
PKG_CONFIG_PATH:
- run: npx node-pre-gyp build
- run: npm install
- run: npx c8 npm test
- name: Run gcov
run: mkdir -p coverage && cd coverage && gcov -o ../build/Debug/obj.target/ffmpeg/src/binding ../src/binding/*
- name: Run lcov
run: npx c8 report --reporter=text-lcov > coverage/tests.lcov
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: ${{ github.workspace }}/coverage