-
Notifications
You must be signed in to change notification settings - Fork 2
46 lines (34 loc) · 1.08 KB
/
main.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
# this is basically just copied from https://docs.wpilib.org/en/stable/docs/software/advanced-gradlerio/robot-code-ci.html
# i wouldve copied it normally but firefox kept crashing when i copied it over here
name: CI
# triggers the workflow only on push or pull request events on the main branch
on:
push:
branches: [ main ]
pull_request:
branches: [ main]
jobs:
build:
runs-on: ubuntu-latest
container: wpilib/roborio-cross-ubuntu:2024-22.04
steps:
- uses: actions/checkout@v4
# tells git that the repository is safe
- name: Add respository to git safe directories
run: git config --global --add safe.directory $GITHUB_WORKSPACE
- name: Grant execute permissions for gradlew
run: chmod +x gradlew
- name: Compile robot vcode
run: ./gradlew build
spotless:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 17
- name: Check code formatting
run: ./gradlew spotlessCheck