File tree Expand file tree Collapse file tree 2 files changed +55
-0
lines changed Expand file tree Collapse file tree 2 files changed +55
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Node.js CI
2
+
3
+ on : [push, pull_request]
4
+
5
+ jobs :
6
+ test :
7
+ strategy :
8
+ matrix :
9
+ node-version :
10
+ - node/10
11
+ - node/12
12
+ - node/14
13
+ - node/15
14
+ compiler :
15
+ - gcc
16
+ - clang
17
+ os :
18
+ - ubuntu-16.04 # ubuntu-18.04/ubuntu-latest missing package g++-4.9
19
+ - macos-latest
20
+ runs-on : ${{ matrix.os }}
21
+ steps :
22
+ - uses : actions/checkout@v2
23
+ - name : Install system dependencies
24
+ run : |
25
+ if [ "${{ matrix.compiler }}" = "gcc" -a "${{ matrix.os }}" = ubuntu-* ]; then
26
+ sudo add-apt-repository ppa:ubuntu-toolchain-r/test
27
+ sudo apt-get update
28
+ sudo apt-get install g++-4.9
29
+ fi
30
+ - name : Use Node.js ${{ matrix.node-version }}
31
+ run : |
32
+ git clone --branch v1.4.2 --depth 1 https://github.com/jasongin/nvs ~/.nvs
33
+ . ~/.nvs/nvs.sh
34
+ nvs --version
35
+ nvs add ${{ matrix.node-version }}
36
+ nvs use ${{ matrix.node-version }}
37
+ node --version
38
+ npm --version
39
+ npm install
40
+ - name : npm test
41
+ run : |
42
+ if [ "${{ matrix.compiler }}" = "gcc" ]; then
43
+ export CC="gcc" CXX="g++"
44
+ fi
45
+ if [ "${{ matrix.compiler }}" = "gcc" -a "${{ matrix.os }}" = ubuntu-* ]; then
46
+ export CC="gcc-4.9" CXX="g++-4.9" AR="gcc-ar-4.9" RANLIB="gcc-ranlib-4.9" NM="gcc-nm-4.9"
47
+ fi
48
+ if [ "${{ matrix.compiler }}" = "clang" ]; then
49
+ export CC="clang" CXX="clang++"
50
+ fi
51
+ export CFLAGS="$CFLAGS -O3 --coverage" LDFLAGS="$LDFLAGS --coverage"
52
+ echo "CFLAGS=\"$CFLAGS\" LDFLAGS=\"$LDFLAGS\""
53
+ npm run pretest -- --verbose
54
+ node test
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ on: [push, pull_request]
4
4
5
5
jobs :
6
6
lint :
7
+ if : github.repository == 'nodejs/node-addon-api'
7
8
strategy :
8
9
matrix :
9
10
node-version : [14.x]
You can’t perform that action at this time.
0 commit comments