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

Add CI

Add CI #5

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'
- example: 'Analog Feedback Device'
- example: 'Arcade Drive With CAN'
skip-java: true
- example: 'Arcade Drive with PWM'
skip-java: true
- example: 'Bus Measurements'
- example: 'Encoder Feedback Device'
- example: 'Get and Set Parameters'
- example: 'Limit Switch'
- example: 'Motor Follower'
skip-cpp: true
- example: 'Position Closed Loop Control'
- example: 'Read Encoder Values'
- example: 'Smart Motion Example'
- example: 'Soft Limits'
- example: 'Tank Drive With CAN'
skip-cpp: true
- example: 'Velocity Closed Loop Control'
name: 'Build ${{ matrix.example }} - ${{ matrix.language }}'
runs-on: ubuntu-latest
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 }}""
./gradlew build