Skip to content
Merged
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
22 changes: 22 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: ESP32 NimBLE Keyboard CI Build

on:
push:
branches: [ master ]
pull_request:

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Python and install PlatformIO
run: |
python3 -m pip install --upgrade platformio

- name: Build with PlatformIO
run: |
make test
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.pio
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
test: ## verify that the library compiles
pio run --project-dir=./test/ci_build --target=clean
pio run --project-dir=./test/ci_build

help:
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m\033[0m\n"} /^[a-zA-Z_-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)

.PHONY: test help
7 changes: 7 additions & 0 deletions test/ci_build/platformio.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[env:esp32dev]
platform = espressif32
board = esp32dev
framework = arduino
lib_ldf_mode = deep+
lib_extra_dirs = ../
lib_deps = ESP32 BLE Keyboard
14 changes: 14 additions & 0 deletions test/ci_build/src/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#include <Arduino.h>
#include <BleKeyboard.h>

BleKeyboard bleKeyboard("ESP32 Keyboard");

void setup() {
bleKeyboard.begin();
}

void loop() {
if (bleKeyboard.isConnected()) {
bleKeyboard.print("Hello");
}
}