Skip to content
This repository was archived by the owner on Dec 7, 2024. It is now read-only.

Commit 0011c7d

Browse files
committed
Add build CI
1 parent e09150e commit 0011c7d

35 files changed

+76
-0
lines changed

.github/workflows/build.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches:
6+
- 'master'
7+
tags-ignore:
8+
- '*'
9+
pull_request:
10+
branches:
11+
- '*'
12+
13+
defaults:
14+
run:
15+
shell: bash
16+
17+
jobs:
18+
build:
19+
timeout-minutes: 15
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
language: [Java, C++]
24+
example: [
25+
Alternate Encoder,
26+
Analog Feedback Device,
27+
Arcade Drive With CAN,
28+
Arcade Drive with PWM,
29+
Bus Measurements,
30+
Encoder Feedback Device,
31+
Get and Set Parameters,
32+
Limit Switch,
33+
Motor Follower,
34+
Position Closed Loop Control,
35+
Read Encoder Values,
36+
Smart Motion Example,
37+
Soft Limits,
38+
Tank Drive With CAN,
39+
Velocity Closed Loop Control,
40+
]
41+
include:
42+
- example: Arcade Drive With CAN
43+
skip-java: true
44+
- example: Arcade Drive with PWM
45+
skip-java: true
46+
- example: Motor Follower
47+
skip-cpp: true
48+
- example: Tank Drive With CAN
49+
skip-cpp: true
50+
name: Build ${{ matrix.example }} - ${{ matrix.language }}
51+
runs-on: ubuntu-latest
52+
container: wpilib/roborio-cross-ubuntu:2024-22.04
53+
steps:
54+
- name: Checkout
55+
if: (matrix.language == 'Java' && !matrix.skip-java) || (matrix.language == 'C++' && !matrix.skip-cpp)
56+
uses: actions/checkout@v3
57+
58+
- name: Cache
59+
if: (matrix.language == 'Java' && !matrix.skip-java) || (matrix.language == 'C++' && !matrix.skip-cpp)
60+
uses: actions/cache@v3
61+
with:
62+
path: |
63+
${{ matrix.language }}/${{ matrix.example }}/.gradle
64+
${{ matrix.language }}/${{ matrix.example }}/bin
65+
${{ matrix.language }}/${{ matrix.example }}/build
66+
key: ${{ matrix.example }}-${{ matrix.language }}-build-${{ github.sha }}
67+
restore-keys: |
68+
${{ matrix.example }}-${{ matrix.language }}-build-
69+
70+
- name: Build
71+
if: (matrix.language == 'Java' && !matrix.skip-java) || (matrix.language == 'C++' && !matrix.skip-cpp)
72+
run: |
73+
cd "${{ matrix.language }}"
74+
cd "${{ matrix.example }}"
75+
chmod +x gradlew
76+
./gradlew build
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)