aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authorDavid Madison <dmadison@users.noreply.github.com>2021-01-18 19:38:23 -0500
committerDavid Madison <dmadison@users.noreply.github.com>2021-01-18 19:38:23 -0500
commit4dec518fbf6e22672de954b994b5343e4300810c (patch)
tree3bd5f1b9798f6ca63bd19ddaf4dc3c7b2db56dd1 /.github/workflows
parent89a7c7327da9322aafd7a952ad3ed04bc9a79177 (diff)
Add GitHub Actions compilation workflow
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/ci.yml65
1 files changed, 65 insertions, 0 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 0000000..a5f6455
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,65 @@
+name: build
+
+on: [push, pull_request, workflow_dispatch]
+
+env:
+ IDE_VERSION: 1.8.13
+ IDE_LOCATION: /usr/local/share/arduino
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+
+ strategy:
+ matrix:
+ compilation: ['Blank Sketch', 'USB API Demo', 'XInput Library']
+ include:
+ - compilation: 'Blank Sketch'
+ sketch: "$IDE_LOCATION/examples/01.Basics/BareMinimum/BareMinimum.ino"
+ - compilation: 'USB API Demo'
+ sketch: "$IDE_LOCATION/libraries/ArduinoXInput/extras/API-Demo/API-Demo.ino"
+ - compilation: 'XInput Library'
+ sketch: "$IDE_LOCATION/libraries/ArduinoXInput/examples/GamepadPins/GamepadPins.ino"
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+
+ - name: Install Arduino IDE
+ run: |
+ wget http://downloads.arduino.cc/arduino-$IDE_VERSION-linux64.tar.xz
+ tar xf arduino-$IDE_VERSION-linux64.tar.xz
+ sudo mv arduino-$IDE_VERSION /usr/local/share/arduino
+ sudo ln -s /usr/local/share/arduino/arduino /usr/local/bin/arduino
+ rm arduino-$IDE_VERSION-linux64.tar.xz
+
+ - name: Move XInput AVR Boards Files
+ run: |
+ mkdir $IDE_LOCATION/hardware/xinput
+ ln -s $PWD $IDE_LOCATION/hardware/xinput/avr
+
+ - name: Install XInput Library
+ if: contains(matrix.sketch, 'ArduinoXInput')
+ run: |
+ git clone https://github.com/dmadison/ArduinoXInput.git;
+ sudo mv ArduinoXInput $IDE_LOCATION/libraries;
+
+ - name: Build All Boards
+ run: |
+ buildSketch() {
+ echo -e "\nBuilding sketch ${{ matrix.sketch }} for $BOARD";
+ arduino --verify --board $BOARD ${{ matrix.sketch }};
+ }
+
+ BOARD=xinput:avr:yun; buildSketch;
+ BOARD=xinput:avr:leonardo; buildSketch;
+ BOARD=xinput:avr:leonardoeth; buildSketch;
+ BOARD=xinput:avr:micro; buildSketch;
+ BOARD=xinput:avr:esplora; buildSketch;
+ BOARD=xinput:avr:LilyPadUSB; buildSketch
+ BOARD=xinput:avr:robotControl; buildSketch;
+ BOARD=xinput:avr:robotMotor; buildSketch;
+ BOARD=xinput:avr:circuitplay32u4cat; buildSketch;
+ BOARD=xinput:avr:yunmini; buildSketch;
+ BOARD=xinput:avr:chiwawa; buildSketch;
+ BOARD=xinput:avr:one; buildSketch;