Files
whisper.cpp/.github/workflows/examples.yml
Daniel Bevenius 167d225f3a ci, examples : add package-lock.json to examples addon node (#3919)
* ci, examples : add package-lock.json to examples addon node

This commit commits the package-lock.json file for examples/addon.node.

This is needed to make the CI workflow work properly and after we
started pinning the action versions in the workflow, the CI started
failing because the package-lock.json was not committed. At least that
is what I think is happening.

* ci: use node 20.x and 22.x instead of 16.x and 18.x

* fix CMakeLists.txt target properties for addon.node
2026-07-01 09:04:21 +02:00

54 lines
1.4 KiB
YAML

name: Examples Tests
on:
push:
branches:
- master
paths:
- examples/addon.node/**
- include/whisper.h
pull_request:
paths:
- examples/addon.node/**
- include/whisper.h
jobs:
addon_node-ubuntu-22:
runs-on: ubuntu-22.04
strategy:
matrix:
node-version: [ 20.x, 22.x ]
steps:
- name: Clone
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
- name: Dependencies
run: |
sudo apt-get update
sudo apt-get install build-essential git
sudo apt-get install cmake
sudo apt-get install libsdl2-dev
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache-dependency-path: examples/addon.node/package-lock.json
- name: Install package.json dependencies
working-directory: ./examples/addon.node
run: npm install
- name: Compile addon.node
run: npx cmake-js compile -T addon.node -B Release
- name: Download test model
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
run: |
bash ./models/download-ggml-model.sh base.en
- name: Test
run: |
cd examples/addon.node
npm run test