-
Notifications
You must be signed in to change notification settings - Fork 1.1k
66 lines (57 loc) · 2.26 KB
/
nodejs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: CI
on:
pull_request:
branches: [master]
push:
branches: [master]
jobs:
build:
name: Build, lint, and test on Node ${{ matrix.node }} and ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
node: [16.x, 18.x, 20.x]
os: [ubuntu-latest, windows-latest, macOS-latest]
exclude: # TODO: Get macOS tests to pass by upgrading to https://github.com/nodejs/node-gyp/releases
- os: macos-latest
node: 18.x
- os: macos-latest
node: 20.x
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Use Node ${{ matrix.node }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: npm
- if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt-get install -y build-essential libglew-dev libglu1-mesa-dev libxi-dev pkg-config
ls /usr/include/c++/
# export CXXFLAGS='-include /usr/include/c++/11.2.0/limits'
- name: Install deps and build (with cache)
run: |
touch ./dist
rm package-lock.json
npm i
- name: Lint
run: npm run lint
- name: Test
run: |
# TODO: Remove the disabling of the following files.
mv src/neural-network-gpu.end-to-end.test.ts src/neural-network-gpu.end-to-end.test.ts.DISABLED
mv src/neural-network.bitwise.test.ts src/neural-network.bitwise.test.ts.DISABLED
mv src/neural-network.trainopts.test.ts src/neural-network.trainopts.test.ts.DISABLED
mv src/recurrent.end-to-end.test.ts src/recurrent.end-to-end.test.ts.DISABLED
mv src/recurrent/gru.test.ts src/recurrent/gru.test.ts.DISABLED
mv src/recurrent/lstm-time-step.end-to-end.test.ts src/recurrent/lstm-time-step.end-to-end.test.ts.DISABLED
mv src/recurrent/lstm.test.ts src/recurrent/lstm.test.ts.DISABLED
mv src/recurrent/rnn-time-step.test.ts src/recurrent/rnn-time-step.test.ts.DISABLED
mv src/recurrent/rnn.test.ts src/recurrent/rnn.test.ts.DISABLED
npm run test --ci --coverage --maxWorkers=2
- name: Build
run: npm run build
- name: Codecov
uses: codecov/codecov-action@v3