name: Compile Sketch

on:
  - push
  - pull_request

jobs:
  compile-sketches:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout repository
        uses: actions/checkout@v2

      # See: https://github.com/arduino/compile-sketches#readme
      - name: Compile sketches
        uses: arduino/compile-sketches@v1
        with:
          platforms: |
            - name: "rp2040:rp2040:rpipico"
              source-url: https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json
          fqbn: rp2040:rp2040
          sketch-paths: |
            - firmware/
          libraries: |
            - name: Adafruit NeoPixel
            - name: Adafruit MPU6050
