mirror of
https://github.com/SlimeVR/SlimeVR-Server.git
synced 2026-11-26 20:06:28 -08:00
103 lines
2.3 KiB
YAML
103 lines
2.3 KiB
YAML
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@v6
|
|
with:
|
|
submodules: recursive
|
|
|
|
- uses: pnpm/action-setup@v4
|
|
- name: Use Node.js
|
|
uses: actions/setup-node@v6
|
|
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:
|
|
CI: false
|
|
BUILD_ARCH: ${{ endsWith(matrix.os, 'arm') && 'aarch64' || 'amd64' }}
|
|
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
submodules: recursive
|
|
|
|
- uses: pnpm/action-setup@v4
|
|
- name: Use Node.js
|
|
uses: actions/setup-node@v6
|
|
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: cd gui && pnpm run build
|
|
|
|
- if: startsWith(matrix.os, 'windows')
|
|
name: Upload a Build Artifact (Windows)
|
|
uses: actions/upload-artifact@v6
|
|
with:
|
|
name: ${{ format('SlimeVR-GUI-Windows-{0}', env.BUILD_ARCH) }}
|
|
path: gui/out/renderer/**/*
|
|
|
|
- if: startsWith(matrix.os, 'ubuntu')
|
|
name: Upload a Build Artifact (Linux)
|
|
uses: actions/upload-artifact@v6
|
|
with:
|
|
name: ${{ format('SlimeVR-GUI-Linux-{0}', env.BUILD_ARCH) }}
|
|
path: gui/out/renderer/**/*
|
|
|
|
- if: matrix.os == 'macos-latest'
|
|
name: Upload a Build Artifact (macOS)
|
|
uses: actions/upload-artifact@v6
|
|
with:
|
|
name: SlimeVR-GUI-macOS
|
|
path: gui/out/renderer/**/*
|