Skip to content

Commit

Permalink
Re-add if
Browse files Browse the repository at this point in the history
  • Loading branch information
jfabellera committed Jan 9, 2024
1 parent 2342535 commit 98477e4
Showing 1 changed file with 31 additions and 32 deletions.
63 changes: 31 additions & 32 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,52 +22,51 @@ jobs:
matrix:
language: [Java, C++]
example: [
Alternate Encoder,
Analog Feedback Device,
# 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,
# 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,
]
include:
- example: Arcade Drive With CAN
skip-java: true
- example: Arcade Drive with PWM
skip-java: true
- example: Motor Follower
skip-cpp: true
- example: Tank Drive With CAN
skip-cpp: true
# - example: Arcade Drive with PWM
# skip-java: true
# - example: Motor Follower
# skip-cpp: true
# - example: Tank Drive With CAN
# skip-cpp: true
name: Build ${{ matrix.example }} - ${{ matrix.language }}
runs-on: ubuntu-latest
container: wpilib/roborio-cross-ubuntu:2024-22.04
if: (matrix.language == 'Java' && !matrix.skip-java) || (matrix.language == 'C++' && !matrix.skip-cpp)
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: 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
# if: (matrix.language == 'Java' && !matrix.skip-java) || (matrix.language == 'C++' && !matrix.skip-cpp)
run: |
cd "${{ matrix.language }}"
cd "${{ matrix.example }}"
Expand Down

0 comments on commit 98477e4

Please sign in to comment.