Skip to content

Commit 1e0a1d5

Browse files
committed
Enable CI/CD
1 parent 978a716 commit 1e0a1d5

File tree

6 files changed

+122
-4
lines changed

6 files changed

+122
-4
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior, if it is more than trival to set up the test for this, please include a sketch that recreates the problem.
15+
16+
**Expected behavior**
17+
A clear and concise description of what you expected to happen.
18+
19+
**Screenshots**
20+
If applicable, add screenshots to help explain your problem.
21+
22+
**Device and Environment**
23+
Please include a complete breakdown of your board, attached hardware, developer environment etc.
24+
25+
**Additional context**
26+
Add any other context about the problem here.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Additional context**
17+
Add any other context or screenshots about the feature request here.

.github/workflows/platformio.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: PlatformIO CI
2+
on: [push]
3+
4+
jobs:
5+
build:
6+
runs-on: ubuntu-latest
7+
strategy:
8+
matrix:
9+
example:
10+
- examples/utf8decoder/utf8decoder.ino
11+
include:
12+
# ESP
13+
- example: examples/adaUnicodeShim/adaUnicodeShim.ino
14+
board: [esp32dev, esp01_1m]
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: actions/cache@v4
18+
with:
19+
path: |
20+
~/.cache/pip
21+
~/.platformio/.cache
22+
key: ${{ runner.os }}-pio
23+
- uses: actions/setup-python@v5
24+
with:
25+
python-version: '3.12'
26+
- name: Install PlatformIO Core
27+
run: pip install --upgrade platformio
28+
- name: Set Board Environment Variables
29+
run: |
30+
if [ -n "${{ matrix.board }}" ] && [ "${{ matrix.board }}" != "null" ]; then
31+
BOARD_ENVS=""
32+
if [ "${{ matrix.board }}" = "Array" ]; then
33+
# If matrix.board is an array
34+
for board in $(echo '${{ toJSON(matrix.board) }}' | jq -r '.[]'); do
35+
BOARD_ENVS="$BOARD_ENVS --environment $board"
36+
done
37+
else
38+
# If matrix.board is a single value
39+
BOARD_ENVS="--environment ${{ matrix.board }}"
40+
fi
41+
echo "BOARD_ENVS=$BOARD_ENVS" >> $GITHUB_ENV
42+
fi
43+
shell: bash
44+
- name: Build PlatformIO examples
45+
run: pio ci --lib "." --project-conf=platformio.ini $BOARD_ENVS
46+
env:
47+
PLATFORMIO_CI_SRC: ${{ matrix.example }}

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
# TcUnicode support for Adafruit_GFX, U8G2, TFT_eSPI, tcMenu.
2+
[![PlatformIO](https://github.com/davetcc/tcUnicodeHelper/actions/workflows/platformio.yml/badge.svg)](https://github.com/davetcc/tcUnicodeHelper/actions/workflows/platformio.yml)
3+
[![License: Apache 2.0](https://img.shields.io/badge/license-Apache--2.0-green.svg)](https://github.com/davetcc/tcUnicodeHelper/blob/master/LICENSE)
4+
[![GitHub release](https://img.shields.io/github/release/davetcc/tcUnicodeHelper.svg?maxAge=3600)](https://github.com/davetcc/tcUnicodeHelper/releases)
5+
[![davetcc](https://img.shields.io/badge/davetcc-dev-blue.svg)](https://github.com/davetcc)
6+
[![JSC electronics](https://img.shields.io/badge/JSC-electronics-green.svg)](https://github.com/jsc-electronics)
27

38
## Summary
49

examples/adaUnicodeShim/adaUnicodeShim.ino

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#include <Adafruit_ILI9341.h>
44
#include <SPI.h>
55
#include <Wire.h>
6-
#include <Fonts/RobotoMedium24.h>
6+
#include <Fonts/RobotoMedium18.h>
77
#include "Fonts/OpenSansCyrillicLatin18.h"
88

99
#define TFT_CS 22 // Chip select control pin
@@ -15,12 +15,13 @@
1515
// It also works with TcMenu drawable interface and the designer can generate suitable themes.
1616
//
1717
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC, TFT_RST);
18+
AdafruitTextPlotPipeline tftPipeline(&tft);
1819

1920
//
2021
// Create an object that can draw fonts onto the display, this shows adafruit but
2122
// if using U8G2 or TFT_eSPI you'd simply pass the pointer to your display object instead.
2223
//
23-
UnicodeFontHandler fontHandler(&tft, ENCMODE_UTF8);
24+
UnicodeFontHandler fontHandler(&tftPipeline, ENCMODE_UTF8);
2425

2526
int yAdaFontSize = 0;
2627
int yOpenSansSize = 0;
@@ -29,12 +30,13 @@ int baselineTcUni = 0;
2930
const char helloText[] PROGMEM = "hello world";
3031
const char helloUkraine[] PROGMEM = "Привіт Світ";
3132

32-
const GFXfont* adaFontToUse = &RobotoMedium24;
33+
const GFXfont* adaFontToUse = &RobotoMedium18pt;
3334
const UnicodeFont* unicodeFontTouse = OpenSansCyrillicLatin18;
3435

3536
void setup() {
3637
// on ESP32 you may need to adjust the SPI settings, un/comment below
37-
SPI.begin(18, 19, 23);
38+
// SPI.begin(18, 19, 23);
39+
SPI.begin();
3840

3941
// On Pico, you may need to set up the SPI pins, un/comment below
4042
//SPI.setSCK(2);

platformio.ini

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
[env]
2+
framework = arduino
3+
4+
lib_deps =
5+
adafruit/Adafruit GFX Library@^1.11.9
6+
adafruit/Adafruit ILI9341@^1.6.1
7+
adafruit/Adafruit BusIO@^1.16.1
8+
SPI
9+
Wire
10+
11+
[env:megaatmega2560]
12+
platform = atmelavr
13+
board = megaatmega2560
14+
15+
[env:esp32dev]
16+
platform = espressif32
17+
board = esp32dev
18+
19+
[env:esp01_1m]
20+
platform = espressif8266
21+
board = esp01_1m

0 commit comments

Comments
 (0)