From 4dec518fbf6e22672de954b994b5343e4300810c Mon Sep 17 00:00:00 2001 From: David Madison Date: Mon, 18 Jan 2021 19:38:23 -0500 Subject: Add GitHub Actions compilation workflow --- .github/workflows/ci.yml | 65 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 .github/workflows/ci.yml 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; -- cgit v1.2.3-18-g5258 From c08c33a728d2c302665114560ccd378e567bccd1 Mon Sep 17 00:00:00 2001 From: David Madison Date: Mon, 18 Jan 2021 19:39:04 -0500 Subject: Remove Travis CI --- .travis.yml | 86 ------------------------------------------------------------- README.md | 2 +- 2 files changed, 1 insertion(+), 87 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index d319201..0000000 --- a/.travis.yml +++ /dev/null @@ -1,86 +0,0 @@ -language: C -env: - global: - - IDE_VERSION=1.8.1 - - IDE_LOCATION=/usr/local/share/arduino - - BOARDS_DESTINATION=$IDE_LOCATION/hardware - -matrix: - include: - - name: "Blank Sketch" - env: SKETCH="$IDE_LOCATION/examples/01.Basics/BareMinimum/BareMinimum.ino" - - name: "USB API Demo" - env: SKETCH="$IDE_LOCATION/libraries/ArduinoXInput/extras/API-Demo/API-Demo.ino" - - name: "XInput Library" - env: SKETCH="$IDE_LOCATION/libraries/ArduinoXInput/examples/GamepadPins/GamepadPins.ino" - -before_install: - - "/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_1.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :1 -ac -screen 0 1280x1024x16" - - sleep 3 - - export DISPLAY=:1.0 - - # Install Arduino IDE - - wget http://downloads.arduino.cc/arduino-$IDE_VERSION-linux64.tar.xz - - tar xf arduino-$IDE_VERSION-linux64.tar.xz - - sudo mv arduino-$IDE_VERSION $IDE_LOCATION - - sudo ln -s $IDE_LOCATION/arduino /usr/local/bin/arduino - - rm arduino-$IDE_VERSION-linux64.tar.xz - - # Install XInput Library - - if [[ $SKETCH == *"ArduinoXInput"* ]]; then - git clone https://github.com/dmadison/ArduinoXInput.git; - mv ArduinoXInput $IDE_LOCATION/libraries; - fi - - # Sketch Compiling Functions - - CYAN="\033[36m"; NOC="\033[0m"; - - buildSketch() { - echo -e "\n${CYAN}Building sketch ${SKETCH##*/} for $BOARD${NOC}"; - arduino --verify --board $BOARD "$SKETCH"; - } - -install: - - mkdir $BOARDS_DESTINATION/xinput - - ln -s $PWD $BOARDS_DESTINATION/xinput/avr - -script: - # Arduino Yún w/ XInput - - BOARD=xinput:avr:yun; buildSketch; - - # Arduino Leonardo w/ XInput - - BOARD=xinput:avr:leonardo; buildSketch; - - # Arduino Arduino Leonardo ETH w/ XInput - - BOARD=xinput:avr:leonardoeth; buildSketch; - - # Arduino/Genuino Micro w/ XInput - - BOARD=xinput:avr:micro; buildSketch; - - # Arduino Esplora w/ XInput - - BOARD=xinput:avr:esplora; buildSketch; - - # LilyPad Arduino USB w/ XInput - - BOARD=xinput:avr:LilyPadUSB; buildSketch; - - # Arduino Robot Control w/ XInput - - BOARD=xinput:avr:robotControl; buildSketch; - - # Arduino Arduino Robot Motor w/ XInput - - BOARD=xinput:avr:robotMotor; buildSketch; - - # Adafruit Circuit Playground 32u4 w/Caterina Configuration w/ XInput - - BOARD=xinput:avr:circuitplay32u4cat; buildSketch; - - # Arduino Yún Mini w/ XInput - - BOARD=xinput:avr:yunmini; buildSketch; - - # Arduino Industrial 101 w/ XInput - - BOARD=xinput:avr:chiwawa; buildSketch; - - # Linino One w/ XInput - - BOARD=xinput:avr:one; buildSketch; - -notifications: - email: - on_success: change - on_failure: change diff --git a/README.md b/README.md index 9608177..95775ef 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# XInput USB Core for Arduino AVR [![Build Status](https://travis-ci.org/dmadison/ArduinoXInput_AVR.svg?branch=master)](https://travis-ci.org/dmadison/ArduinoXInput_AVR) +# XInput USB Core for Arduino AVR The files in this repository allow you to emulate an Xbox gamepad (XInput) using a USB-capable Arduino microcontroller. Originally forked from [the official Arduino AVR core](https://github.com/arduino/ArduinoCore-avr). -- cgit v1.2.3-18-g5258 From 33e256604c24e7e868c5c60abf2c0122ba708f1a Mon Sep 17 00:00:00 2001 From: David Madison Date: Mon, 18 Jan 2021 19:42:08 -0500 Subject: Add GitHub Actions build status badge to README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 95775ef..cd30b65 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# XInput USB Core for Arduino AVR +# XInput USB Core for Arduino AVR [![Build Status](https://github.com/dmadison/ArduinoXInput_AVR/workflows/build/badge.svg?branch=master)](https://github.com/dmadison/ArduinoXInput_AVR/actions?query=workflow%3Abuild) The files in this repository allow you to emulate an Xbox gamepad (XInput) using a USB-capable Arduino microcontroller. Originally forked from [the official Arduino AVR core](https://github.com/arduino/ArduinoCore-avr). -- cgit v1.2.3-18-g5258 From 5864b02a8702993da4840cb2d542632c7b065244 Mon Sep 17 00:00:00 2001 From: David Madison Date: Mon, 18 Jan 2021 19:47:29 -0500 Subject: Remove extra space from README badge ... --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index cd30b65..8193311 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# XInput USB Core for Arduino AVR [![Build Status](https://github.com/dmadison/ArduinoXInput_AVR/workflows/build/badge.svg?branch=master)](https://github.com/dmadison/ArduinoXInput_AVR/actions?query=workflow%3Abuild) +# XInput USB Core for Arduino AVR [![Build Status](https://github.com/dmadison/ArduinoXInput_AVR/workflows/build/badge.svg?branch=master)](https://github.com/dmadison/ArduinoXInput_AVR/actions?query=workflow%3Abuild) The files in this repository allow you to emulate an Xbox gamepad (XInput) using a USB-capable Arduino microcontroller. Originally forked from [the official Arduino AVR core](https://github.com/arduino/ArduinoCore-avr). -- cgit v1.2.3-18-g5258