Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CI #37

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 73 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Build

on:
push:
branches:
- 'master'
tags-ignore:
- '*'
pull_request:
branches:
- '*'

defaults:
run:
shell: bash

jobs:
build:
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
language: [Java, C++]
example: [
Alternate Encoder,
Analog Feedback Device,
Arcade Drive With CAN,
Arcade Drive With PWM,
Bus Measurements,
Encoder Feedback Device,
Get and Set Parameters,
Limit Switch,
Motor Follower,
Position Closed Loop Control,
Read Encoder Values,
Smart Motion Example,
Soft Limits,
Tank Drive With CAN,
Velocity Closed Loop Control,
]
exclude:
- example: Arcade Drive With CAN
language: Java
- example: Arcade Drive with PWM
language: Java
- example: Motor Follower
language: C++
- example: Tank Drive With CAN
language: C++
name: Build ${{ matrix.example }} - ${{ matrix.language }}
runs-on: ubuntu-latest
container: wpilib/roborio-cross-ubuntu:2024-22.04
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Cache
uses: actions/cache@v3
with:
path: |
${{ matrix.language }}/${{ matrix.example }}/.gradle
${{ matrix.language }}/${{ matrix.example }}/bin
${{ matrix.language }}/${{ matrix.example }}/build
key: ${{ matrix.example }}-${{ matrix.language }}-build-${{ github.sha }}
restore-keys: |
${{ matrix.example }}-${{ matrix.language }}-build-

- name: Build
run: |
cd "${{ matrix.language }}"
cd "${{ matrix.example }}"
chmod +x gradlew
./gradlew build
Loading