-
Notifications
You must be signed in to change notification settings - Fork 7
57 lines (51 loc) · 2.12 KB
/
self-hosted.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
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Node.js CI
on:
push:
branches: [ master ]
jobs:
build:
if: ${{ github.event.repository.full_name == 'labjack/labjack_kipling_private' }}
strategy:
matrix:
node-version: [12.16.3]
platform: [self-hosted]
runs-on: ${{ matrix.platform }}
steps:
- name: Get current date
uses: 1466587594/get-current-time@v2
id: date
with:
format: YYYY_MM_DD
utcOffset: "+08:00"
- name: Download ljm
if: ${{ matrix.platform == 'ubuntu-18.04' }}
uses: wei/wget@v1
with:
args: -O labjack_ljm_software.tar.gz https://labjack.com/sites/default/files/software/labjack_ljm_software_2019_07_16_x86_64.tar.gz
- name: Install ljm
if: ${{ matrix.platform == 'ubuntu-18.04' }}
run: tar xfz labjack_ljm_software.tar.gz && cd ./labjack_ljm_software_2019_07_16_x86_64 && sudo ./labjack_ljm_installer.run
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
# - run: npm ci # doesn't work with node8
- run: npm install --global node-gyp@latest
- run: npm install --global --production windows-build-tools --vs2015
if: ${{ matrix.platform == 'self-hosted' }}
- run: npm install
- run: npm config set msvs_version 2015
- run: npm run setup
- name: Fix lerna mess
run: node ./scripts/fix_lerna_backup.js
- run: npm run build
- run: npm run test
if: ${{ matrix.platform == 'self-hosted' }}
- uses: actions/upload-artifact@v2
with:
name: kipling.3.2.0.${{ steps.date.outputs.date }}_windows.zip
path: ljswitchboard-builder/kipling.3.2.0.${{ steps.date.outputs.formattedTime }}_win64.zip
if: ${{ matrix.platform == 'self-hosted' }}