Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
119 changes: 119 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
name: build

on:
push:
pull_request:
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
# ---- RP2040 / RP2350 ----------------------------------------------
# FS 0MB: assets live in the CircuitPython partition at 1 MB, so the
# core must not also claim a filesystem at the end of flash.
- name: feather-rp2040-dvi
fqbn: rp2040:rp2040:adafruit_feather_dvi:flash=8388608_0,usbstack=tinyusb
core: rp2040
defines: "-DEYE_PANEL=EYE_PANEL_DVI -DNUM_EYES=1"

- name: metro-rp2350-gc9a01a-2eye
fqbn: rp2040:rp2040:adafruit_metro_rp2350:flash=16777216_0,usbstack=tinyusb
core: rp2040
defines: "-DEYE_PANEL=EYE_PANEL_GC9A01A -DNUM_EYES=2"

- name: metro-esp32s3-st7789-2eye
fqbn: esp32:esp32:adafruit_metro_esp32s3:PartitionScheme=tinyuf2,USBMode=default
core: esp32
defines: "-DEYE_PANEL=EYE_PANEL_ST7789 -DNUM_EYES=2"

name: ${{ matrix.name }}
steps:
- uses: actions/checkout@v4

- uses: arduino/setup-arduino-cli@v2

- name: Add board manager URLs
run: |
arduino-cli config init
arduino-cli config add board_manager.additional_urls \
https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json
arduino-cli config add board_manager.additional_urls \
https://espressif.github.io/arduino-esp32/package_esp32_index.json
arduino-cli core update-index

- name: Install core
run: arduino-cli core install ${{ matrix.core }}:${{ matrix.core }}

- name: Install libraries
run: |
arduino-cli lib install \
"Adafruit GFX Library" \
"Adafruit BusIO" \
"Adafruit ST7735 and ST7789 Library" \
"Adafruit GC9A01A" \
"Adafruit ILI9341" \
"ArduinoJson" \
"SdFat - Adafruit Fork" \
"Adafruit SPIFlash"
if [ "${{ matrix.core }}" = "esp32" ]; then
arduino-cli lib install "Adafruit TinyUSB Library"
fi
# PicoDVI is the Adafruit fork and is not in the library index.
if [ "${{ matrix.core }}" = "rp2040" ]; then
git clone --depth 1 https://github.com/adafruit/PicoDVI.git \
"$HOME/Arduino/libraries/PicoDVI"
fi

- name: Locate the sketch
id: sketch
run: |
INO=$(find . -name '*.ino' -not -path './build/*' | head -n 1)
if [ -z "$INO" ]; then
echo "No .ino found in the checkout." >&2
exit 1
fi
DIR=$(dirname "$INO")
echo "dir=$DIR" >> "$GITHUB_OUTPUT"
echo "Sketch: $INO (directory $DIR)"

- name: Compile
run: |
arduino-cli compile \
--fqbn "${{ matrix.fqbn }}" \
--build-property "compiler.cpp.extra_flags=${{ matrix.defines }}" \
--output-dir "build/${{ matrix.name }}" \
--warnings default \
"${{ steps.sketch.outputs.dir }}"

- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.name }}
path: |
build/${{ matrix.name }}/*.uf2
build/${{ matrix.name }}/*.bin
if-no-files-found: error

docs:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v5
with:
python-version: "3.x"
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
repository: adafruit/ci-arduino
path: ci
- name: pre-install
run: bash ci/actions_install.sh
- name: clang
run: python3 ci/run-clang-format.py -e "ci/*" -e "bin/*" -r .
- name: doxygen
env:
GH_REPO_TOKEN: ${{ secrets.GH_REPO_TOKEN }}
PRETTYNAME: "Adafruit Monster Eyes"
run: bash ci/doxy_gen_and_deploy.sh Adafruit_Monster_Eyes
Loading
Loading