-
Notifications
You must be signed in to change notification settings - Fork 21
122 lines (107 loc) · 4.33 KB
/
build-all-parallel.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
114
115
116
117
118
119
120
121
122
# This is a faster workflow that parallelizes the jobs in a matrix so
# we can get faster results than waiting for the standard build_all_frc_projects
# powershell script
name: Build all FRC Projects
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- project-name: 'ArcadeDrive'
directory: 'cpp/ArcadeDrive'
- project-name: 'BasicLatencyCompensation'
directory: 'cpp/BasicLatencyCompensation'
- project-name: 'CANcoder'
directory: 'cpp/CANcoder'
- project-name: 'CommandBasedDrive'
directory: 'cpp/CommandBasedDrive'
- project-name: 'ControlRequestLimits'
directory: 'cpp/ControlRequestLimits'
- project-name: 'CurrentLimits'
directory: 'cpp/CurrentLimits'
- project-name: 'FusedCANcoder'
directory: 'cpp/FusedCANcoder'
- project-name: 'MotionMagic'
directory: 'cpp/MotionMagic'
- project-name: 'PhoenixSysId'
directory: 'cpp/PhoenixSysId'
- project-name: 'Pigeon2'
directory: 'cpp/Pigeon2'
- project-name: 'PositionClosedLoop'
directory: 'cpp/PositionClosedLoop'
- project-name: 'Simulation'
directory: 'cpp/Simulation'
- project-name: 'VelocityClosedLoop'
directory: 'cpp/VelocityClosedLoop'
- project-name: 'WaitForAll'
directory: 'cpp/WaitForAll'
- project-name: 'ArcadeDrive'
directory: 'java/ArcadeDrive'
- project-name: 'BasicLatencyCompensation'
directory: 'java/BasicLatencyCompensation'
- project-name: 'CANcoder'
directory: 'java/CANcoder'
- project-name: 'CommandBasedDrive'
directory: 'java/CommandBasedDrive'
- project-name: 'ControlRequestLimits'
directory: 'java/ControlRequestLimits'
- project-name: 'CurrentLimits'
directory: 'java/CurrentLimits'
- project-name: 'FusedCANcoder'
directory: 'java/FusedCANcoder'
- project-name: 'MotionMagic'
directory: 'java/MotionMagic'
- project-name: 'PhoenixSysId'
directory: 'java/PhoenixSysId'
- project-name: 'Pigeon2'
directory: 'java/Pigeon2'
- project-name: 'PositionClosedLoop'
directory: 'java/PositionClosedLoop'
- project-name: 'Simulation'
directory: 'java/Simulation'
- project-name: 'SwerveWithPathPlanner'
directory: 'java/SwerveWithPathPlanner'
- project-name: 'VelocityClosedLoop'
directory: 'java/VelocityClosedLoop'
- project-name: 'WaitForAll'
directory: 'java/WaitForAll'
# The type of runner that the job will run on
runs-on: ubuntu-latest
# This grabs the WPILib docker container
container: wpilib/roborio-cross-ubuntu:2024-22.04
steps:
- uses: actions/checkout@v4
# Grant execute permission for gradlew
- name: Grant execute permission for gradlew
run: cd "${{ matrix.directory }}" && chmod +x gradlew
# Runs a single command using the runners shell
- name: Compile and run tests on robot code for project ${{ matrix.project-name }}
run: cd "${{ matrix.directory }}" && ./gradlew build
build-python:
strategy:
fail-fast: false
matrix:
python_version: ['3.9', '3.10', '3.11']
os: ['ubuntu-22.04', 'macos-12', 'windows-2022']
project-name: ['ArcadeDrive', 'CANcoder', 'MotionMagic', 'PhoenixSysId', 'PositionClosedLoop', 'StatusSignals', 'TalonFX', 'VelocityClosedLoop']
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python_version }}
- name: Install python dependencies
run: |
pip install -U pip
pip install -U --pre robotpy robotpy-commands-v2 robotpy-pathplannerlib phoenix6
- name: Test ${{ matrix.project-name }}
run: |
cd "python/${{ matrix.project-name }}" && python3 -m robotpy test