mirror of
https://github.com/SlimeVR/SlimeVR-Server.git
synced 2026-11-21 01:21:25 -08:00
62 lines
1.5 KiB
YAML
62 lines
1.5 KiB
YAML
# This workflow will build a Java project with Gradle
|
|
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
|
|
|
|
name: SlimeVR Server
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
test:
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, windows-latest]
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Set up JDK 17
|
|
uses: actions/setup-java@v3
|
|
with:
|
|
java-version: "17"
|
|
distribution: "adopt"
|
|
|
|
- name: Setup Gradle
|
|
uses: gradle/gradle-build-action@v2
|
|
|
|
- name: Check code formatting
|
|
run: ./gradlew spotlessCheck
|
|
|
|
- name: Test with Gradle
|
|
run: ./gradlew test
|
|
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Set up JDK 17
|
|
uses: actions/setup-java@v3
|
|
with:
|
|
java-version: "17"
|
|
distribution: "adopt"
|
|
|
|
- name: Setup Gradle
|
|
uses: gradle/gradle-build-action@v2
|
|
|
|
- name: Build with Gradle
|
|
run: ./gradlew shadowJar
|
|
|
|
- name: Upload the Server JAR as a Build Artifact
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
# Artifact name
|
|
name: "SlimeVR-Server" # optional, default is artifact
|
|
# A file, directory or wildcard pattern that describes what to upload
|
|
path: build/libs/*
|