Skip to content

use bash on Windows #244

use bash on Windows

use bash on Windows #244

Workflow file for this run

name: Node.js CI
on:
push:
branches: [ '*' ]
pull_request:
branches: [ '*' ]
jobs:
release:
runs-on: ${{ matrix.platform }}
strategy:
fail-fast: false
matrix:
node-version: [18.x, 20.x]
platform: [ubuntu-latest, ubuntu-20.04, windows-latest, macos-latest]
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@v4
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@v3
with:
path: ~/.conan
key: ${{ matrix.platform }}
- 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: while node node_modules/mocha/lib/cli/cli.js -g streaming && [ $I -gt 0 ]; do I=$(( I - 1 )); done
shell: bash
env:
I: 100
debug:
runs-on: ${{ matrix.platform }}
strategy:
fail-fast: false
matrix:
platform: [ubuntu-latest, macos-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@v4
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@v3
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: while node node_modules/mocha/lib/cli/cli.js -g streaming && [ $I -gt 0 ]; do I=$(( I - 1 )); done
env:
I: 100
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@v4
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@v3
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: while node node_modules/mocha/lib/cli/cli.js -g streaming && [ $I -gt 0 ]; do I=$(( I - 1 )); done
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
I: 100