Initial commit

This commit is contained in:
kawakode committed 2026-11-11 04:08:00 +01:00
commit 64a227437d
1920 files changed
+3428556

No files matched your search

@@ -0,0 +1,89 @@
name: ArduinoBuild
env:
SKETCH_NAME: build_test.ino
on:
push: # see: https://help.github.com/en/actions/reference/events-that-trigger-workflows#pull-request-event-pull_request
paths:
- '**.ino'
- '**.cpp'
- '**.hpp'
- '**.h'
- '**.c'
- '**ArduinoBuild.yml'
pull_request:
jobs:
build:
name: ${{matrix.board}}@${{matrix.platform-version}}
runs-on: ubuntu-latest
strategy:
matrix:
platform-url:
- https://espressif.github.io/arduino-esp32/package_esp32_index.json
board:
# ESP32 devices for 3D matrix
- esp32
- esp32s2
- m5stick-c
- m5stack-core-esp32
- m5stack-core2
- esp32s3box
platform-version:
# ESP32 Core versions for 3D matrix
- 2.0.15
- 2.0.16
- 2.0.17
#- 3.0.0
include:
# 3D matrix doesn't apply to these:
- { board: 'd1_mini:eesz=4M3M,xtal=80', platform: esp8266, archi: esp8266, platform-version: 3.0.1, platform-url: 'https://arduino.esp8266.com/stable/package_esp8266com_index.json', ... }
- { board: 'd1_mini:eesz=4M3M,xtal=80', platform: esp8266, archi: esp8266, platform-version: 3.0.2, platform-url: 'https://arduino.esp8266.com/stable/package_esp8266com_index.json', ... }
- { board: seeed_wio_terminal, platform: Seeeduino, archi: samd, platform-version: 1.8.2, platform-url: 'https://files.seeedstudio.com/arduino/package_seeeduino_boards_index.json', ... }
- { board: adafruit_hallowing, platform: adafruit, archi: samd, platform-version: 1.7.10, platform-url: 'https://adafruit.github.io/arduino-board-index/package_adafruit_index.json', ... }
- { board: adafruit_hallowing_m4, platform: adafruit, archi: samd, platform-version: 1.7.10, platform-url: 'https://adafruit.github.io/arduino-board-index/package_adafruit_index.json', ... }
- { board: adafruit_pybadge_m4, platform: adafruit, archi: samd, platform-version: 1.7.10, platform-url: 'https://adafruit.github.io/arduino-board-index/package_adafruit_index.json', ... }
- { board: adafruit_pygamer_m4, platform: adafruit, archi: samd, platform-version: 1.7.10, platform-url: 'https://adafruit.github.io/arduino-board-index/package_adafruit_index.json', ... }
- { board: adafruit_feather_esp32s2_tft, platform: esp32, archi: esp32, platform-version: latest, platform-url: 'https://espressif.github.io/arduino-esp32/package_esp32_index.json', ... }
- { board: adafruit_feather_esp32s3_tft, platform: esp32, archi: esp32, platform-version: latest, platform-url: 'https://espressif.github.io/arduino-esp32/package_esp32_index.json', ... }
- { board: adafruit_funhouse_esp32s2, platform: esp32, archi: esp32, platform-version: latest, platform-url: 'https://espressif.github.io/arduino-esp32/package_esp32_index.json', ... }
- { board: rpipico, platform: rp2040, archi: rp2040, platform-version: 2.3.3, cli-args: '--build-property compiler.cpp.extra_flags=-DSKIP_I2C_TEST', platform-url: 'https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json', ... }
- { board: esp32, platform: esp32, platform-version: latest, platform-url: 'https://espressif.github.io/arduino-esp32/package_esp32_index.json', archi: esp32, ... }
- { board: esp32s2, platform: esp32, platform-version: latest, platform-url: 'https://espressif.github.io/arduino-esp32/package_esp32_index.json', archi: esp32, ... }
- { board: esp32s3, platform: esp32, platform-version: latest, platform-url: 'https://espressif.github.io/arduino-esp32/package_esp32_index.json', archi: esp32, ... }
- { board: esp32c6, platform: esp32, platform-version: latest, platform-url: 'https://espressif.github.io/arduino-esp32/package_esp32_index.json', archi: esp32, ... }
- { board: esp32c3, platform: esp32, platform-version: latest, platform-url: 'https://espressif.github.io/arduino-esp32/package_esp32_index.json', archi: esp32, ... }
# - { board: esp32h2, platform: esp32, platform-version: latest, platform-url: 'https://espressif.github.io/arduino-esp32/package_esp32_index.json', archi: esp32, ... }
# 3D matrix applies to these:
- { platform: esp32, archi: esp32, ... }
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Compile example
uses: ArminJo/arduino-test-compile@master
with:
arduino-board-fqbn: ${{matrix.platform}}:${{matrix.archi}}:${{matrix.board}}
arduino-platform: ${{matrix.platform}}:${{matrix.archi}}@${{matrix.platform-version}}
platform-url: ${{ matrix.platform-url }}
required-libraries: ${{ matrix.required-libraries }}
extra-arduino-cli-args: ${{ matrix.cli-args }}
#build-properties: ${{ toJson(matrix.build-properties) }}
sketch-names: ${{ env.SKETCH_NAME }}
#sketches-exclude: ${{ matrix.sketches-exclude }}
@@ -0,0 +1,110 @@
name: IDFBuild
env:
REPO_URL: https://github.com/espressif/esp-idf
PROJECT_DIR: examples/Test/build_test
on:
push:
paths:
- '**.ino'
- '**.cpp'
- '**.hpp'
- '**.h'
- '**.c'
- '**IDFBuild.yml'
- 'CMakeLists.txt'
- 'esp-idf-versions.php'
pull_request:
workflow_dispatch:
jobs:
set_matrix:
name: Version planner ⊹
runs-on: ubuntu-latest
env:
max-versions: 3 # maximum core versions to test, starting at latest
outputs:
matrix: ${{steps.set-matrix.outputs.matrix}}
project_dir: ${{steps.set-matrix.outputs.project_dir}}
repo_url: ${{steps.set-matrix.outputs.repo_url}}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Setup matrix
id: set-matrix
run: |
matrix=`php .github/scripts/esp-idf-versions.php`
# echo $matrix | jq # debug
matrix="${matrix//'%'/'%25'}" # escape percent entities
matrix="${matrix//$'\n'/''}" # remove lf
matrix="${matrix//$'\r'/''}" # remove cr
echo "matrix=${matrix}" >> $GITHUB_OUTPUT
echo "project_dir=${{env.PROJECT_DIR}}" >> $GITHUB_OUTPUT
echo "repo_url=${{env.REPO_URL}}" >> $GITHUB_OUTPUT
build:
name: idf ${{ matrix.esp-idf-fqbn }}
needs: set_matrix
runs-on: ubuntu-latest
strategy:
matrix: ${{fromJSON(needs.set_matrix.outputs.matrix)}}
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
# - name: Cache pip for ${{ matrix.esp-idf-fqbn }}
# uses: actions/cache@v3
# with:
# path: ~/.cache/pip
# key: ${{ runner.os }}-pip-${{ matrix.esp-idf-fqbn }}-${{ hashFiles('**/requirements.txt') }}
# restore-keys: |
# ${{ runner.os }}-pip-
#
# - name: Cache espressif tools for ${{ matrix.esp-idf-fqbn }}
# uses: actions/cache@v3
# id: espressif
# with:
# path: |
# ~/.espressif
# key: ${{ runner.os }}-espressif-${{ matrix.esp-idf-fqbn }}-${{ hashFiles('**/lockfiles') }}
#
# - name: Cache esp-idf for ${{ matrix.esp-idf-fqbn }}
# id: cache-idf
# uses: actions/cache@v3
# with:
# path: ~/esp/esp-idf
# key: ${{ runner.os }}-idf-${{ matrix.esp-idf-fqbn }}-${{ hashFiles('**/lockfiles') }}
- name: Get/Check IDF ${{ matrix.esp-idf-fqbn }}
run: |
mkdir -p ~/esp
cd ~/esp
idf_fqbn="${{ matrix.esp-idf-fqbn }}"
idf_version=${idf_fqbn#*@}
if [ ! -d "./esp-idf/" ]; then git clone -b v$idf_version --recursive ${{ needs.set_matrix.outputs.repo_url }} esp-idf; fi
cd ~/esp/esp-idf
if [ ! -d "~/.espressif" ]; then ./install.sh; fi
- name: Build example for ${{ matrix.esp-idf-fqbn }}
run: |
source ~/esp/esp-idf/export.sh
idf_fqbn="${{ matrix.esp-idf-fqbn }}"
idf_board=${idf_fqbn%%@*}
cd ${{ needs.set_matrix.outputs.project_dir }}
idf.py set-target $idf_board
idf.py build
@@ -0,0 +1,132 @@
# OpenCVBuild.yml
name: OpenCVBuild
env:
PROJECT_DIR: examples_for_PC/CMake_OpenCV
on:
push:
paths:
- '**.ino'
- '**.cpp'
- '**.hpp'
- '**.h'
- '**.c'
- '**OpenCVBuild.yml'
- '**OpenCV.cmake'
- '**installOpenCV.bat'
pull_request:
# workflow_dispatch:
jobs:
LGFXOpenCV:
name: LGFXOpenCV (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
include:
- { os: windows-latest, OpenCV_DIR: "D:/a/LovyanGFX/LovyanGFX/opencv-4.5.5/opencv/build/" }
- { os: macos-latest, OpenCV_DIR: "/usr/local/Cellar/opencv/4.5.5_2/" }
- { os: ubuntu-latest, OpenCV_DIR: "/home/runner/work/LovyanGFX/LovyanGFX/opencv-install/opencv/build" }
steps:
- name: Checkout
uses: actions/checkout@v4
- name: 🪟 📦 Use GNU tar instead BSD tar
if: matrix.os == 'windows-latest'
shell: cmd
run: echo C:\Program Files\Git\usr\bin>>"%GITHUB_PATH%"
- name: 🪟 📦 Cache OpenCV for Windows
if: ${{ matrix.os == 'windows-latest' }}
uses: actions/cache@v3
id: cache-opencv-windows
with:
path: D:\a\LovyanGFX\LovyanGFX\opencv-4.5.5\
key: ${{ matrix.os }}-opencv-cache
- name: 🪟 🏗️ Build+Install OpenCV for Windows
if: matrix.os == 'windows-latest' && steps.cache-opencv-windows.outputs.cache-hit != 'true'
shell: pwsh
run: |
.github/scripts/installOpenCV.bat
Remove-Item -Recurse -Force ${{ matrix.OpenCV_DIR }}modules
- name: 🪟 🏗️ Build LGFXOpenCV example for Windows
if: matrix.os == 'windows-latest'
env:
OpenCV_DIR: ${{ matrix.OpenCV_DIR }}
CC: clang
CXX: clang++
run: |
Get-PSDrive
cp .github/scripts/OpenCV.cmake ${{ env.PROJECT_DIR }}/CMakeLists.txt
cd ${{ env.PROJECT_DIR }}
mkdir build
cd build
cmake -G "Visual Studio 17 2022" -A x64 -T ClangCL ..
cmake --build . --config Debug
- name: 🐧 📦 Cache OpenCV for Linux
if: matrix.os == 'ubuntu-latest'
uses: actions/cache@v3
id: cache-opencv-linux
with:
path: /home/runner/work/LovyanGFX/LovyanGFX/opencv-install
key: ${{ matrix.os }}-opencv-cache
- name: 🐧 🏗️ Install OpenCV for Linux
if: matrix.os == 'ubuntu-latest'
uses: rayandrews/with-opencv-action@v1
with:
dir: /home/runner/work/LovyanGFX/LovyanGFX/opencv-install
cached: ${{ steps.cache-opencv-linux.outputs.cache-hit }}
BUILD_EXAMPLES: false
INSTALL_C_EXAMPLES: false
INSTALL_PYTHON_EXAMPLES: false
opencv-version: '4.5.5'
- name: 🍏 📦 🍺 Cache brew deps for MacOS
if: matrix.os == 'macos-latest'
uses: actions/cache@v3
id: cache-opencv-macosx
with:
# Paths to cache:
# /usr/local/Homebrew - installation folder of Homebrew
# /usr/local/Cellar - installation folder of Homebrew formulae
# /usr/local/Frameworks, /usr/local/bin, /usr/local/opt - contain (links to) binaries installed by Homebrew formulae
# /usr/local/lib/python3.8 - Python3 packages installation
path: |
/usr/local/Homebrew
/usr/local/Cellar
/usr/local/Frameworks
/usr/local/bin
/usr/local/opt
/usr/local/lib/python3.8
key: ${{ matrix.os }}-opencv
- name: 🍏 🍺 Install OpenCV+CMake brew packages for MacOS
if: matrix.os == 'macos-latest' && steps.cache-opencv-macosx.outputs.cache-hit != 'true'
env:
HOMEBREW_NO_AUTO_UPDATE: 1
run: brew install opencv cmake
- name: 🐧/🍏 🏗️ Build LGFXOpenCV example for Linux/MacOS
if: matrix.os != 'windows-latest'
env:
OpenCV_DIR: ${{ matrix.OpenCV_DIR }}
run: |
cp .github/scripts/OpenCV.cmake ${{ env.PROJECT_DIR }}/CMakeLists.txt
cd ${{ env.PROJECT_DIR }}
mkdir build
cd build
cmake ..
cmake --build .
@@ -0,0 +1,106 @@
name: PlatformIOBuild
env:
PROJECT_DIR: examples/Test/build_test
on:
push:
paths:
- '**.ino'
- '**.cpp'
- '**.hpp'
- '**.h'
- '**.c'
- '**PlatformioBuild.yml'
pull_request:
workflow_dispatch:
jobs:
build:
name: ${{ matrix.board }}@${{ matrix.platform-version }}
runs-on: ubuntu-latest
strategy:
matrix:
board:
- esp32
- esp32-s2
- esp32-s3
- esp32-c3
- m5stick-c
- m5stack-core-esp32
- m5stack-core2
- m5stack-cores3
platform-version:
- 1.0.6
- 2.0.11
- 2.0.12
- 2.0.13
- default
exclude:
- { board: esp32-c3, platform-version: 1.0.6 }
- { board: esp32-s3, platform-version: 1.0.6 }
- { board: esp32-s3, platform-version: default }
- { board: esp32-s2, platform-version: 1.0.6 }
- { board: m5stack-cores3, platform-version: 1.0.6 }
include:
- board: esp32
- board: esp32-s2
- board: esp32-s3
- board: esp32-c3
- board: m5stick-c
- board: m5stack-core-esp32
- board: m5stack-core2
- board: m5stack-cores3
- { board: esp8266, platform-version: 4.2.1, ... }
- { board: esp8266, platform-version: 4.2.0, ... }
- { board: esp8266, platform-version: 4.1.0, ... }
- { board: seeed_wio_terminal, platform-version: default, ... }
- { board: adafruit_pybadge_m4, platform-version: default, ... }
- { board: pico, platform-version: default, ... }
- { board: native, platform-version: portduino, ... }
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Cache pip
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Cache PlatformIO
uses: actions/cache@v4
with:
path: ~/.platformio
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Install PlatformIO
run: |
python -m pip install --upgrade pip
pip install --upgrade platformio
- name: Run PlatformIO
run: |
cd ${{ env.PROJECT_DIR }}
export pio_ver=${{ matrix.platform-version }}
export pio_env="${pio_ver//./_}"
pio pkg install -e ${{ matrix.board }}-$pio_env --no-save --library file://$(realpath ../../../)
[[ "$pio_env" == "portduino" ]] && { sudo apt update; sudo apt-get install libgpiod-dev libbluetooth-dev; export PLATFORMIO_SRC_DIR=portduino; }
pio run -e ${{ matrix.board }}-$pio_env
@@ -0,0 +1,142 @@
# SDLBuild.yml
name: SDLBuild
env:
PROJECT_DIR: examples_for_PC/CMake_SDL
WASM_DIR: examples_for_PC/CMake_WASM
on:
push:
paths:
- '**.ino'
- '**.cpp'
- '**.hpp'
- '**.h'
- '**.c'
- '**SDLBuild.yml'
- '**SDL.cmake'
- '**installSDL2.bat'
pull_request:
workflow_dispatch:
permissions:
contents: write
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
LGFX_SDL2:
name: LGFX_SDL2 (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
include:
- { os: windows-latest }
- { os: macos-12 }
- { os: ubuntu-latest }
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cache SDL2 for Windows
if: ${{ matrix.os == 'windows-latest' }}
uses: actions/cache@v4
id: cache-SLD2-windows
with:
path: contrib
key: ${{ runner.os }}-${{ hashFiles('.github/scripts/installSDL2.bat') }}
- name: Build SDL2 for Windows
if: matrix.os == 'windows-latest' && steps.cache-SLD2-windows.outputs.cache-hit != 'true'
run: |
.github/scripts/installSDL2.bat
- name: Build LGFX_SDL2 for Windows
if: ${{ matrix.os == 'windows-latest' }}
env:
CC: clang
CXX: clang++
SDL2_DIR: D:/a/LovyanGFX/LovyanGFX/contrib/src/SDL2-2.0.22/install
run: |
cp .github/scripts/SDL.cmake ${{ env.PROJECT_DIR }}/CMakeLists.txt
cd ${{ env.PROJECT_DIR }}
cmake -S . -B build/debug -G "Visual Studio 17 2022" -A x64 -T ClangCL -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH=${{ env.SDL2_DIR }}
cmake --build build/debug --config Debug
cmake -S . -B build/release -G "Visual Studio 17 2022" -A x64 -T ClangCL -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=${{ env.SDL2_DIR }}
cmake --build build/release --config Release
- name: Build LGFX_SDL2 for Linux
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
sudo apt update
sudo apt-get install libsdl2-dev
cp .github/scripts/SDL.cmake ${{ env.PROJECT_DIR }}/CMakeLists.txt
cd ${{ env.PROJECT_DIR }}
mkdir build
cd build
cmake ..
cmake --build .
- name: Build LGFX_SDL2/WASM for Linux
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
git clone https://github.com/emscripten-core/emsdk.git
cd emsdk
./emsdk install latest # any specific version?
./emsdk activate latest
source ./emsdk_env.sh
cd ..
cd ${{env.WASM_DIR}}
mkdir build
cd build
emcmake cmake ..
emmake make
mkdir -p www/WASM
cp index.html www/WASM/index.html
- name: Upload WASM artifact
if: ${{ matrix.os == 'ubuntu-latest' }}
uses: actions/upload-pages-artifact@v3
with:
path: ${{env.WASM_DIR}}/build/www
- name: Build LGFX_SDL2 for Mac
if: ${{ matrix.os == 'macos-12' }}
run: |
brew install sdl2
cp .github/scripts/SDL.cmake ${{ env.PROJECT_DIR }}/CMakeLists.txt
cd ${{ env.PROJECT_DIR }}
mkdir build
cd build
cmake ..
cmake --build .
deploy:
name: Deploy WASM Example 🚀
if: github.ref == 'refs/heads/master'
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: LGFX_SDL2
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
@@ -0,0 +1,31 @@
name: ArduinoCIBuild
on:
push:
branches:
- develop
pull_request:
branches:
- develop
jobs:
build:
runs-on: ubuntu-20.04
steps:
- name: checkout code
uses: actions/checkout@v2
- name: install python
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: install platformio
run: |
pip install platformio==5.0.3
- name: perform chmod
run: chmod +x ./.github/scripts/ci-compile
- name: build examples
run: ./.github/scripts/ci-compile
@@ -0,0 +1,16 @@
on:
issues:
types: [opened, edited]
jobs:
auto_close_issues:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Automatically close issues that do not follow the issue template
uses: lucasbento/auto-close-issues@v1.0.2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
issue-close-message: "Hello! :wave:\n\nThis issue is being automatically closed because it does not follow the issue template." # optional property
closed-issues-label: "🙁 Not following issue template" # optional property
@@ -0,0 +1,42 @@
name: pioPkgPublish
on:
release:
types: [published]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Cache pip
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Cache PlatformIO
uses: actions/cache@v3
with:
path: ~/.platformio
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
- name: Set up Python
uses: actions/setup-python@v4
- name: Install PlatformIO
run: |
python -m pip install --upgrade pip
pip install --upgrade platformio
- name: Run PlatformIO
env:
PLATFORMIO_AUTH_TOKEN: ${{ secrets.PLATFORMIO_AUTH_TOKEN }}
run: |
pio package publish --owner lovyan03 --non-interactive
@@ -0,0 +1,28 @@
name: Stale
on:
issues:
types: [reopened]
schedule:
- cron: '*/60 * * * *'
jobs:
stale:
runs-on: ubuntu-latest
env:
ACTIONS_STEP_DEBUG: true
steps:
- uses: actions/stale@v9.0.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.'
stale-pr-message: 'This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.'
stale-issue-label: 'stale'
stale-pr-label: 'stale'
days-before-stale: 30
days-before-close: 7
exempt-issue-labels: 'pinned'
exempt-pr-labels: 'device support request,bug'
remove-stale-when-updated: true
close-issue-message: 'This issue has been automatically closed because it has not had recent activity. Thank you for your contributions.'
close-pr-message: 'This pull request has been automatically closed because it has not had recent activity. Thank you for your contributions.'