-
Notifications
You must be signed in to change notification settings - Fork 2
83 lines (73 loc) · 2.04 KB
/
build.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
72
73
74
75
76
77
78
79
80
81
82
83
# This workflow will run build the typescript source files, run linter and prettier
name: CI Check
on:
# Trigger the workflow on push or pull request,
# but only for the main branch
push:
branches:
- master
pull_request:
branches:
- '*'
jobs:
build:
name: "Build & Test"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [
ubuntu-latest,
macos-latest,
windows-latest
]
node-version: [
# 11,
# 12,
14
]
steps:
- name: Set git to use LF
if: matrix.os == 'windows-latest'
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Checkout repo and submodules
uses: actions/checkout@v2
with:
submodules: recursive
- name: "Pre-Install hook Ubuntu"
if: matrix.os == 'ubuntu-latest'
run: |
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo apt update
sudo apt install -y gcc-8 g++-8
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 60
sudo apt install libudev-dev
- name: "Install python2.7 on windows"
if: matrix.os == 'windows-latest'
uses: actions/setup-python@v2
with:
python-version: 2.7
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: "Build & Test (Windows)"
if: matrix.os == 'windows-latest'
run: |
npm --add-python-to-path='true' --debug --global --production windows-build-tools
npm ci
npm run tslint
npm run prettier-check
npm run napi-64
npm run napi-32
- name: "Build & Test (OSX & Linux)"
if: matrix.os != 'windows-latest'
run: |
npm ci
npm run tslint
npm run prettier-check
npm run build
npm test
# Todo: Upload binaries