-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (50 loc) · 1.34 KB
/
Copy pathBuild.yml
File metadata and controls
64 lines (50 loc) · 1.34 KB
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
name: BuildServer
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
node: [12, 14, 16]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Code format check
if: matrix.os == 'ubuntu-latest'
uses: jidicula/clang-format-action@v4.6.2
- name: Install conan
uses: turtlebrowser/get-conan@main
- name: Install Node
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- name: node addon api install
if: matrix.os == 'windows-latest'
run: |
npm install -g node-addon-api
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DSTATIC_ANALYZERS=1 -DCMAKE_BUILD_TYPE=Release
- name: Build
run: cmake --build ${{github.workspace}}/build --target install
- name: CTest
run: |
cd ${{github.workspace}}/build
ctest .
- name: Jest
run: |
cd ${{github.workspace}}/src/libhello/bindings/node/test
npm install
npm test
- name: Run native
run: |
${{github.workspace}}/target/hello
- name: Run node
run: |
cd ${{github.workspace}}/src/node_hello
npm install
node index.js