-
-
Notifications
You must be signed in to change notification settings - Fork 224
129 lines (111 loc) · 3.46 KB
/
build-gui.yml
File metadata and controls
129 lines (111 loc) · 3.46 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
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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
name: Build GUI
on:
push:
branches:
- main
paths:
- .github/workflows/build-gui.yml
- gui/**
- package*.json
pull_request:
paths:
- .github/workflows/build-gui.yml
- gui/**
- package*.json
workflow_dispatch:
create:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
submodules: recursive
- uses: pnpm/action-setup@v4
- name: Use Node.js
uses: actions/setup-node@v5
with:
node-version-file: '.node-version'
cache: 'pnpm'
- name: Build
run: |
pnpm i
cd gui
pnpm run lint
build:
strategy:
fail-fast: false
matrix:
os:
[
ubuntu-22.04,
windows-latest,
macos-latest,
ubuntu-22.04-arm,
windows-11-arm,
]
runs-on: ${{ matrix.os }}
env:
# Don't mark warnings as errors
CI: false
BUILD_ARCH: ${{ endsWith(matrix.os, 'arm') && 'aarch64' || 'amd64' }}
steps:
- uses: actions/checkout@v5
with:
submodules: recursive
- if: startsWith(matrix.os, 'ubuntu')
name: Set up Linux dependencies
uses: awalsh128/cache-apt-pkgs-action@v1.5.3
with:
packages: libgtk-3-dev webkit2gtk-4.1 libappindicator3-dev librsvg2-dev patchelf
# Increment to invalidate the cache
version: ${{ format('v1.0-{0}', env.BUILD_ARCH) }}
# Enables a workaround to attempt to run pre and post install scripts
execute_install_scripts: true
# Disables uploading logs as a build artifact
debug: false
- if: matrix.os == 'windows-11-arm'
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
cache: false
- name: Cache cargo dependencies
uses: Swatinem/rust-cache@v2
- uses: pnpm/action-setup@v4
- name: Use Node.js
uses: actions/setup-node@v5
with:
node-version-file: '.node-version'
cache: 'pnpm'
- name: Install dependencies
shell: bash
run: pnpm i
- name: Build
shell: bash
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
NODE_OPTIONS: ${{ matrix.os == 'macos-latest' && '--max-old-space-size=4096' || '' }}
run: pnpm run skipbundler --config $( ./gui/scripts/gitversion.mjs )
- if: startsWith(matrix.os, 'windows')
name: Upload a Build Artifact (Windows)
uses: actions/upload-artifact@v4
with:
# Artifact name
name: ${{ format('SlimeVR-GUI-Windows-{0}', env.BUILD_ARCH) }}
# A file, directory or wildcard pattern that describes what to upload
path: target/release/slimevr.exe
- if: startsWith(matrix.os, 'ubuntu')
name: Upload a Build Artifact (Linux)
uses: actions/upload-artifact@v4
with:
# Artifact name
name: ${{ format('SlimeVR-GUI-Linux-{0}', env.BUILD_ARCH) }}
# A file, directory or wildcard pattern that describes what to upload
path: target/release/slimevr
- if: matrix.os == 'macos-latest'
name: Upload a Build Artifact (macOS)
uses: actions/upload-artifact@v4
with:
# Artifact name
name: SlimeVR-GUI-macOS
# A file, directory or wildcard pattern that describes what to upload
path: target/release/slimevr