Test npm package #17
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test npm package | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 0 * * 0' | |
jobs: | |
compile_works: | |
name: Compilation works | |
strategy: | |
matrix: | |
node-version: | |
- 18.x # LTS | |
- latest | |
os: [macos-latest, windows-latest, ubuntu-latest] | |
fail-fast: false | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- run: npm install --global cheerp | |
- run: npx cheerp clang++ test/hello.cpp -o test/hello.js | |
- run: node test/hello.js > test/hello.out | |
- run: diff test/hello.out test/hello.expected |