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

Add CI

Add CI #13

Workflow file for this run

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++']
include:
- example: 'Alternate Encoder'
skip-java: false
skip-cpp: false
- example: 'Analog Feedback Device'
skip-java: false
skip-cpp: false
- example: 'Arcade Drive With CAN'
skip-java: true
skip-cpp: false
- example: 'Arcade Drive with PWM'
skip-java: true
skip-cpp: false
- example: 'Bus Measurements'
skip-java: false
skip-cpp: false
- example: 'Encoder Feedback Device'
skip-java: false
skip-cpp: false
- example: 'Get and Set Parameters'
skip-java: false
skip-cpp: false
- example: 'Limit Switch'
skip-java: false
skip-cpp: false
- example: 'Motor Follower'
skip-java: false
skip-cpp: true
- example: 'Position Closed Loop Control'
skip-java: false
skip-cpp: false
- example: 'Read Encoder Values'
skip-java: false
skip-cpp: false
- example: 'Smart Motion Example'
skip-java: false
skip-cpp: false
- example: 'Soft Limits'
skip-java: false
skip-cpp: false
- example: 'Tank Drive With CAN'
skip-java: false
skip-cpp: true
- example: 'Velocity Closed Loop Control'
skip-java: false
skip-cpp: false
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
# # if: (matrix.language == 'Java' && !matrix.skip-java) || (matrix.language == 'C++' && !matrix.skip-cpp)
# 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
# if: (matrix.language == 'Java' && !matrix.skip-java) || (matrix.language == 'C++' && !matrix.skip-cpp)
run: |
cd "${{ matrix.language }}"
cd "${{ matrix.example }}"
chmod +x gradlew
./gradlew build