Skip to content

Instantly share code, notes, and snippets.

@paul-ridgway
Last active April 2, 2021 16:14
Show Gist options
  • Save paul-ridgway/3176c01434cbe192f0ba6fc6353e662b to your computer and use it in GitHub Desktop.
Save paul-ridgway/3176c01434cbe192f0ba6fc6353e662b to your computer and use it in GitHub Desktop.
name: Build
on: [push, pull_request]
jobs:
build:
strategy:
matrix:
core_a: ["STM32"]
core_b: ["stm32"]
board: ["Nucleo_144"]
opts: ["pnum=NUCLEO_F767ZI,upload_method=MassStorage,xserial=generic,usb=none,xusb=FS,opt=osstd,rtlib=nano"]
apn: ["X", "Y", "Z"]
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
- name: Setup Arduino CLI
uses: arduino/setup-arduino-cli@v1.1.1
- name: Install platform
run: |
arduino-cli core update-index --additional-urls 'https://raw.githubusercontent.com/stm32duino/BoardManagerFiles/master/STM32/package_stm_index.json'
arduino-cli core install ${{ matrix.core_a }}:${{ matrix.core_b }} --additional-urls 'https://raw.githubusercontent.com/stm32duino/BoardManagerFiles/master/STM32/package_stm_index.json'
- name: Compile Sketch
working-directory: ./microcontroller
run: ARDUINO_DIRECTORIES_USER=$GITHUB_WORKSPACE/microcontroller arduino-cli compile -b ${{ matrix.core_a }}:${{ matrix.core_b }}:${{ matrix.board }}:${{ matrix.opts }} -e --build-property="compiler.cpp.extra_flags=\"-DAPN_${{ matrix.apn }}\""
- name: Upload bin
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.core_a}}_${{ matrix.core_b }}_${{ matrix.board }}_${{ matrix.apn }}
path: ./microcontroller/build/${{ matrix.core_a}}.${{ matrix.core_b }}.${{ matrix.board }}/microcontroller.ino.bin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment