Repository navigation
83 lines (75 loc) Β· 4.09 KB
/
Copy pathbuild.yml
File metadata and controls
83 lines (75 loc) Β· 4.09 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
name: Build
# Compiles the SecureKey firmware on every push / PR so the build badge is real.
on:
push:
paths:
- "06_PasswordManager/**"
- ".github/workflows/build.yml"
pull_request:
workflow_dispatch:
jobs:
compile:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install arduino-cli
run: |
# Pin to v0.35.3 β the last stable pre-1.0 release.
# arduino-cli v1.x introduced stricter FQBN option validation that
# breaks esp32:esp32@2.0.16 (ZigbeeMode appears in the 3.x index but
# not in 2.0.16, and the new CLI rejects it as "invalid option").
curl -L -o /tmp/arduino-cli.tar.gz \
https://github.com/arduino/arduino-cli/releases/download/v0.35.3/arduino-cli_0.35.3_Linux_64bit.tar.gz
mkdir -p "$HOME/bin"
tar -xzf /tmp/arduino-cli.tar.gz -C "$HOME/bin"
echo "$HOME/bin" >> "$GITHUB_PATH"
- name: Install ESP32 core 2.0.16
run: |
arduino-cli config init
arduino-cli config add board_manager.additional_urls \
https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
arduino-cli core update-index
arduino-cli core install esp32:esp32@2.0.16
- name: Install libraries (pinned)
run: |
arduino-cli lib install "NimBLE-Arduino@1.4.3"
arduino-cli lib install "Adafruit NeoPixel"
# ESP32 BLE Keyboard (T-vK) is GitHub-only β not in the Library
# Manager index β so install it straight from its Git URL.
arduino-cli config set library.enable_unsafe_install true
arduino-cli lib install --git-url https://github.com/T-vK/ESP32-BLE-Keyboard.git
- name: Install Makerfabs Arduino_GFX fork (adds SH8601 + Display_Brightness)
run: |
# The MaTouch board needs Makerfabs' fork of GFX-1.3.7 (the stock
# Library Manager GFX lacks the SH8601 AMOLED driver and the
# Display_Brightness() method). Sparse-clone just that one folder.
git clone --depth 1 --filter=blob:none --sparse \
https://github.com/Makerfabs/MaTouch-ESP32-S3-AMOLED-with-Touch-1.8-FT3168.git mf
git -C mf sparse-checkout set "LVGL project/libraries/Arduino_GFX-1.3.7"
mkdir -p "$HOME/Arduino/libraries"
cp -r "mf/LVGL project/libraries/Arduino_GFX-1.3.7" "$HOME/Arduino/libraries/Arduino_GFX"
# This fork's Arduino_TFT.cpp has a leftover `#include "pin_config.h"`
# (no symbols used). Locally it resolves from the sketch folder; on the
# CI runner the sketch dir isn't on the library include path, so drop a
# copy next to the source to satisfy the quoted include.
cp "06_PasswordManager/pin_config.h" "$HOME/Arduino/libraries/Arduino_GFX/src/pin_config.h"
- name: Patch ESP32 BLE Keyboard (NimBLE backend + Just-Works pairing)
run: |
HDR="$(find "$HOME/Arduino/libraries" -name BleKeyboard.h | head -1)"
SRC="$(find "$HOME/Arduino/libraries" -name BleKeyboard.cpp | head -1)"
echo "Patching: $HDR / $SRC"
# Enable the NimBLE backend (coexists with native USB HID, half the RAM)
sed -i 's|^[[:space:]]*//[[:space:]]*#define USE_NIMBLE|#define USE_NIMBLE|' "$HDR"
grep -q "^#define USE_NIMBLE" "$HDR" || sed -i '1i #define USE_NIMBLE' "$HDR"
# LE Secure Connections "Just Works" pairing (no passkey IO on this
# device; sc=true so macOS/iOS also enable HID).
sed -i 's|setSecurityAuth(true, true, true)|setSecurityAuth(true, false, true)|' "$SRC"
# HID Information flags: RemoteWake + NormallyConnectable (0x01 -> 0x03)
# so iOS knows we re-advertise when idle and auto-reconnects cleanly.
sed -i 's|hidInfo(0x00, 0x01)|hidInfo(0x00, 0x03)|' "$SRC"
- name: Compile firmware
run: |
arduino-cli compile \
--fqbn "esp32:esp32:esp32s3:PartitionScheme=app3M_fat9M_16MB,PSRAM=opi,FlashSize=16M,USBMode=default,CDCOnBoot=cdc" \
06_PasswordManager