Skip to content

Update tested Node.js versions #111

Update tested Node.js versions

Update tested Node.js versions #111

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
Test:
strategy:
matrix:
os: [macos-13, ubuntu-latest, windows-2019]
node-version: [22.x, 20.x, 18.x]
runs-on: ${{ matrix.os }}
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install Boost and Csound on macOS
run: brew install boost csound
if: ${{ matrix.os == 'macos-13' }}
- name: Install Boost and Csound on Linux
run: |
sudo apt-get --assume-yes install libboost-dev libsndfile1-dev
wget --no-verbose https://github.com/csound/csound/archive/refs/tags/6.18.1.tar.gz
tar -xf 6.18.1.tar.gz
cd csound-6.18.1
cmake -S . -B build -DBUILD_DSSI_OPCODES=OFF
cmake --build build
sudo cmake --install build
sudo ldconfig
if: ${{ matrix.os == 'ubuntu-latest' }}
- name: Install Boost and Csound on Windows
run: |
choco install boost-msvc-14.2 --no-progress
curl.exe --location --remote-name --remote-header-name --show-error --silent https://github.com/csound/csound/releases/download/6.18.1/Csound6_x64-6.18.1-windows-x64-installer.zip
7z x Csound6_x64-6.18.1-windows-x64-installer.zip
Start-Process Csound6_x64-windows_x86_64-6.18.0-1245.exe '/verySilent /noRestart' -Wait
Add-Content $Env:GITHUB_PATH "$Env:ProgramFiles\Csound6_x64\bin" -Encoding utf8
if: ${{ matrix.os == 'windows-2019' }}
- name: Install latest node-gyp
run: |
npm explore npm/node_modules/@npmcli/run-script --global -- npm_config_global=false npm install node-gyp@latest
if: ${{ matrix.os == 'macos-13' && (matrix.node-version == '20.x' || matrix.node-version == '18.x') }}
- name: Install csound-api on macOS
run: |
export CPATH="$(brew --prefix)/include"
export LIBRARY_PATH="$(brew --prefix)/lib"
npm install
if: ${{ matrix.os == 'macos-13' }}
- name: Install csound-api on Linux
run: npm install
if: ${{ matrix.os == 'ubuntu-latest' }}
- name: Install csound-api on Windows
run: |
$Env:CL = "/I`"C:\local\boost_1_74_0`" /I`"$Env:ProgramFiles\Csound6_x64\include`""
$Env:LINK = "`"$Env:ProgramFiles\Csound6_x64\lib\csound64.lib`""
npm install
if: ${{ matrix.os == 'windows-2019' }}
- name: Install Jasmine
run: npm install --global jasmine
- name: Run tests
run: npm test