-
-
Notifications
You must be signed in to change notification settings - Fork 74
113 lines (107 loc) · 3.59 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
name: Node.js CI
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
Build-for-linux:
name: Run npm on Ubuntu
runs-on: ubuntu-latest
defaults:
run:
working-directory: 'UI' # Here the path to the folder where package-lock.json is located.
steps:
- uses: actions/checkout@v4
- uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: libusb-1.0-0 libusb-1.0-0-dev libudev-dev
version: 1.0
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '19.x'
- name: Install Electron and build
run: |
npm install electron-rebuild -g
npm install electron-builder -g
npm install
npm run package-linux-workflow
- name: Save .appimage as artefact
uses: actions/upload-artifact@v4
with:
name: Ardu-Stim linux
path: UI/dist/*.AppImage
Build-for-mac-x86_64:
name: Run npm on x86_64 macos
runs-on: macos-12 #As of Apr 2024 macos-12 will give an intel host and macos-14 will be aarm64
defaults:
run:
working-directory: 'UI' # Here the path to the folder where package-lock.json is located.
steps:
- uses: actions/checkout@v4
- name: Setup Node, Electron and built
uses: actions/setup-node@v4
with:
node-version: '19.x'
- name: Install Electron and build
run: |
python3 -m pip install setuptools
npm install electron-rebuild -g
npm install electron-builder -g
npm install
npm run package-mac-workflow
- name: Save .dmg as artefact
uses: actions/upload-artifact@v4
with:
name: Ardu-Stim Mac-x86_64
path: UI/dist/*.dmg
Build-for-mac-arm64:
name: Run npm on arm64 macos
runs-on: macos-14 #As of Apr 2024 macos-13 will give an intel host and macos-14 will be aarm64
defaults:
run:
working-directory: 'UI' # Here the path to the folder where package-lock.json is located.
steps:
- uses: actions/checkout@v4
- name: Setup Node, Electron and built
uses: actions/setup-node@v4
with:
node-version: '19.x'
- name: Install Electron and build
run: |
brew install python-setuptools
npm install electron-rebuild -g
npm install electron-builder -g
npm install
npm run package-mac-workflow
- name: Save .dmg as artefact
uses: actions/upload-artifact@v4
with:
name: Ardu-Stim Mac-arm64
path: UI/dist/*.dmg
Build-for-win:
name: Run npm on x64 Windows
runs-on: windows-latest
defaults:
run:
working-directory: 'UI' # Here the path to the folder where package-lock.json is located.
steps:
- uses: actions/checkout@v4
- name: Setup Node, Electron and built
uses: actions/setup-node@v4
with:
node-version: '19.x'
- name: Install Electron and build
run: |
npm install electron-rebuild -g
npm install electron-builder -g
npm install
npm run package-win
- name: Save .exe as artefact
uses: actions/upload-artifact@v4
with:
name: Ardu-Stim Win 64
path: UI/dist/*.exe