-
Notifications
You must be signed in to change notification settings - Fork 0
119 lines (106 loc) · 3.97 KB
/
Copy pathbuild.yml
File metadata and controls
119 lines (106 loc) · 3.97 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
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