Skip to content

Commit

Permalink
Merge pull request #177 from jdoubleu/github-ci
Browse files Browse the repository at this point in the history
Configure GitHub CI
  • Loading branch information
martinberlin committed May 10, 2022
2 parents c7bf748 + 0e2bd15 commit b985f16
Show file tree
Hide file tree
Showing 6 changed files with 110 additions and 9 deletions.
69 changes: 69 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: ESP-IDF

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
version:
- release-v4.3
- release-v4.4
example:
- calibration_helper
- demo
- dragon
- grayscale_test
- mpd_status
- terminal
- www-image

continue-on-error: ${{ matrix.version == 'latest' }}

steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- uses: 'espressif/esp-idf-ci-action@main'
with:
esp_idf_version: ${{ matrix.version }}
path: 'examples/${{ matrix.example }}'

build-arduino:
runs-on: ubuntu-latest
container:
image: "espressif/idf:${{ matrix.version }}"
strategy:
fail-fast: false
matrix:
version:
- release-v4.4
example:
- weather
include:
- version: release-v4.4
arduino-esp32: 2.0.3

steps:
- name: Install latest git
run: |
apt update -qq && apt install -y -qq git
- name: Checkout repo
uses: actions/checkout@v2
- name: Install Arduino ESP
run: |
cd examples/${{ matrix.example }}
mkdir components && cd components
git clone --depth 1 --recursive --branch ${{ matrix.arduino-esp32 }} https://github.com/espressif/arduino-esp32.git arduino
- name: esp-idf build
run: |
. $IDF_PATH/export.sh
cd examples/${{ matrix.example }}
idf.py build
12 changes: 12 additions & 0 deletions examples/mpd_status/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,15 @@ A demo showing a Full-Screen Image

Image by David REVOY / CC BY (https://creativecommons.org/licenses/by/3.0)
https://commons.wikimedia.org/wiki/File:Durian_-_Sintel-wallpaper-dragon.jpg

Configuration
-------------

Before you can use this example, you need to set your WiFi credentials. Simply run
```sh
idf.py menuconfig
```

Then go to `Application Settings > WiFi Connection Settings` and enter your credentials.

Afterwards you can build (and flash) the app.
19 changes: 19 additions & 0 deletions examples/mpd_status/main/Kconfig.projbuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
menu "Application Settings"

menu "WiFi Connection Settings"

config WIFI_SSID
string "WiFi SSID"
default "myssid"
help
SSID (network name) for the smart paper to connect to.

config WIFI_PASSWORD
string "WiFi Password"
default "mypassword"
help
WiFi password (WPA2 or newer) for the smart paper to use.

endmenu

endmenu
5 changes: 2 additions & 3 deletions examples/mpd_status/main/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
#include "mpd/client.h"
#include "mpd_image.h"
#include "mpd_info.h"
#include "wifi_config.h"

const int queue_x_start = 900;
const int album_cover_x = 100;
Expand Down Expand Up @@ -122,8 +121,8 @@ void epd_task() {
wifi_config_t wifi_config = {
.sta =
{
.ssid = WIFI_SSID,
.password = WIFI_PASSWORD,
.ssid = CONFIG_WIFI_SSID,
.password = CONFIG_WIFI_PASSWORD,
.scan_method = WIFI_FAST_SCAN,
.sort_method = WIFI_CONNECT_AP_BY_SIGNAL,
.threshold.rssi = -127,
Expand Down
7 changes: 4 additions & 3 deletions examples/mpd_status/sdkconfig.defaults
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,12 @@ CONFIG_ESPTOOLPY_MONITOR_BAUD=115200
#
# Partition Table
#
CONFIG_PARTITION_TABLE_SINGLE_APP=y
# CONFIG_PARTITION_TABLE_SINGLE_APP is not set
# CONFIG_PARTITION_TABLE_SINGLE_APP_LARGE is not set
# CONFIG_PARTITION_TABLE_TWO_OTA is not set
# CONFIG_PARTITION_TABLE_CUSTOM is not set
CONFIG_PARTITION_TABLE_CUSTOM=y
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv"
CONFIG_PARTITION_TABLE_FILENAME="partitions_singleapp.csv"
CONFIG_PARTITION_TABLE_FILENAME="partitions.csv"
CONFIG_PARTITION_TABLE_OFFSET=0x8000
CONFIG_PARTITION_TABLE_MD5=y
# end of Partition Table
Expand Down
7 changes: 4 additions & 3 deletions examples/weather/sdkconfig.defaults
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,12 @@ CONFIG_ESPTOOLPY_MONITOR_BAUD=115200
#
# Partition Table
#
CONFIG_PARTITION_TABLE_SINGLE_APP=y
# CONFIG_PARTITION_TABLE_SINGLE_APP is not set
# CONFIG_PARTITION_TABLE_SINGLE_APP_LARGE is not set
# CONFIG_PARTITION_TABLE_TWO_OTA is not set
# CONFIG_PARTITION_TABLE_CUSTOM is not set
CONFIG_PARTITION_TABLE_CUSTOM=y
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv"
CONFIG_PARTITION_TABLE_FILENAME="partitions_singleapp.csv"
CONFIG_PARTITION_TABLE_FILENAME="partitions.csv"
CONFIG_PARTITION_TABLE_OFFSET=0x8000
CONFIG_PARTITION_TABLE_MD5=y
# end of Partition Table
Expand Down

0 comments on commit b985f16

Please sign in to comment.