71 lines (69 loc) · 1.82 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
67
68
69
70
71
name: Node CI
runs-on: self-hosted
on:
push:
branches:
- '*'
- '!master'
pull_request:
branches:
- 'master'
jobs:
build:
runs-on: macos-11.0
strategy:
matrix:
node-version: [8, 10, 12, 14, 15]
steps:
- uses: actions/checkout@v2
- name: Node v${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: npm install, build, and test
run: |
npm install
npm run build --if-present
npm test
- name: ensure universal binary (arm64/x86_64)
run: |
file fsevents.node
file fsevents.node | grep -q arm64 || (echo "arm64 binary not built"; exit 1)
file fsevents.node | grep -q x86_64 || (echo "x86_64 binary not built"; exit 1)
- name: Upload binary
uses: actions/upload-artifact@v2
with:
name: binary
path: fsevents.node
env:
CI: true
test_macos_10:
name: 'Test universal binary on macOS 10.15'
runs-on: macos-10.15
needs: build
strategy:
matrix:
node-version: [8, 10, 12, 14, 15]
steps:
- uses: actions/checkout@v2
- name: Node v${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: npm install
run: |
npm install --ignore-scripts
- name: Download universal binary
uses: actions/download-artifact@v2
with:
name: binary
- name: ensure universal binary (arm64/x86_64)
run: |
file fsevents.node
file fsevents.node | grep -q arm64 || (echo "arm64 binary not built"; exit 1)
file fsevents.node | grep -q x86_64 || (echo "x86_64 binary not built"; exit 1)
- name: npm test
run: |
npm test
env:
CI: true