Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
matth-x committed May 20, 2024
2 parents d40fb9c + f72505e commit 37dbffb
Show file tree
Hide file tree
Showing 45 changed files with 3,122 additions and 110 deletions.
46 changes: 6 additions & 40 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,6 @@ permissions:
contents: write

on:
workflow_dispatch:
inputs:
v2_ref:
required: true
description: The branch/tag for the v2 UI
default: master

push:
branches:
- master
Expand All @@ -34,7 +27,7 @@ jobs:
run: echo "github.ref_name = '${{ github.ref_name }}'"

build:
name: Build ${{ matrix.env }} with ${{ matrix.gui.name }}
name: Build ${{ matrix.env }}
runs-on: ubuntu-latest

strategy:
Expand All @@ -57,25 +50,16 @@ jobs:
- heltec_esp32-wifi-lora-v2
- wt32-eth01
- esp32-c3-devkitc-02
gui:
- name: gui-v2
repo: OpenEVSE/openevse-gui-v2
build_flags: ""
ref: ${{ inputs.v2_ref }}
- elecrow_esp32_hmi
- elecrow_esp32_hmi_dev
- openevse_wifi_tft_v1
- openevse_wifi_tft_v1_dev

steps:
- uses: ammaraskar/gcc-problem-matcher@master

- uses: actions/checkout@v4

- name: Checkout GUI
uses: actions/checkout@v4
with:
repository: ${{ matrix.gui.repo }}
path: ${{ matrix.gui.name }}
ref: ${{ matrix.gui.ref }}
submodules: recursive

- name: Cache pip
uses: actions/cache@v4
with:
Expand All @@ -100,26 +84,8 @@ jobs:
python -m pip install --upgrade pip
pip install --upgrade platformio
- name: Set up Node JS
uses: actions/setup-node@v4
with:
node-version: '16'

- name: Install dependencies
run: |
cd ${{ matrix.gui.name }}
npm install
- name: Build GUI
run: |
cd ${{ matrix.gui.name }}
npm run build
- name: Run PlatformIO
run: pio run -e ${{ matrix.env }}
env:
GUI_NAME: ${{ matrix.gui.name }}
PLATFORMIO_BUILD_FLAGS: ${{ matrix.gui.build_flags }}

- name: Upload output to GitHub
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -161,7 +127,7 @@ jobs:
- name: Upload assets to release
if: startsWith(github.ref_name, 'v')
uses: "softprops/action-gh-release@v1"
uses: "softprops/action-gh-release@v2"
with:
prerelease: true
name: "${{ github.ref_name }}"
Expand Down
81 changes: 81 additions & 0 deletions .github/workflows/build_gui.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json

name: Build OpenEVSE GUI

permissions:
contents: write
pull-requests: write

on:
workflow_dispatch:

pull_request:
paths:
- gui-v2
- gui-tft/*

jobs:
build:
name: Build the static GUI files
runs-on: ubuntu-latest

steps:
- name: Checkout the repository
uses: actions/checkout@v4
with:
submodules: recursive
ref: ${{ github.head_ref }}
token: ${{ secrets.DEPENDABOT_PAT }}

- 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.x'

- name: Install PlatformIO
run: |
python -m pip install --upgrade pip
pip install --upgrade platformio
- name: Set up Node JS
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Install dependencies
run: |
cd gui-v2
npm install
- name: Build GUI
run: |
cd gui-v2
npm run build
- name: Delete the existing pre-built GUI files
run: |
rm -fr src/lcd_static
rm -f src/web_static/*.h
- name: Run PlatformIO
run:
pio run

- name: Push any changed files
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "Update of pre-built GUI files"
23 changes: 23 additions & 0 deletions .github/workflows/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: PlatformIO Dependabot

on:
workflow_dispatch: # option to manually trigger the workflow
schedule:
# Runs every day at 00:00
- cron: '0 0 * * *'

permissions:
contents: write
pull-requests: write

jobs:
dependabot:
runs-on: ubuntu-latest
name: run PlatformIO Dependabot
steps:
- name: Checkout
uses: actions/checkout@v4
- name: run PlatformIO Dependabot
uses: peterus/platformio_dependabot@v1
with:
github_token: ${{ secrets.DEPENDABOT_PAT }}
29 changes: 28 additions & 1 deletion .github/workflows/release_validation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,34 @@ jobs:
submodules: recursive

### Check the pre-built GUI files are up-to-date
- 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.x'

- name: Install PlatformIO
run: |
python -m pip install --upgrade pip
pip install --upgrade platformio
- name: Set up Node JS
uses: actions/setup-node@v4
with:
node-version: '16'
node-version: '20'

- name: Install dependencies
run: |
Expand All @@ -33,6 +56,10 @@ jobs:
cd gui-v2
npm run build
- name: Run PlatformIO
run:
pio run

- name: Check the pre-built GUI files are up-to-date
run: |
set +e
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,4 @@ lib/MicroTasks
*.bin
divert_sim/epoxyfsdata
divert_sim/epoxyeepromdata
*.pem
Binary file added BootScreen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ChargeScreen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added gui-tft/button_bar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added gui-tft/car_connected.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added gui-tft/car_disconnected.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added gui-tft/charging.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added gui-tft/connected.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added gui-tft/disabled.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added gui-tft/error.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added gui-tft/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added gui-tft/not_connected.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added gui-tft/sleeping.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added gui-tft/start.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion gui-v2
7 changes: 7 additions & 0 deletions openevse_16mb.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Name, Type, SubType, Offset, Size, Flags
nvs, data, nvs, 0x9000, 0x5000,
otadata, data, ota, 0xe000, 0x2000,
app0, app, ota_0, 0x10000, 0x640000,
app1, app, ota_1, 0x650000,0x640000,
spiffs, data, spiffs, 0xc90000,0x360000,
coredump, data, coredump,0xFF0000,0x10000,
Loading

0 comments on commit 37dbffb

Please sign in to comment.