Skip to content

Commit

Permalink
Merge branch 'master' into shapper_simulator
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremypoulter authored Oct 27, 2024
2 parents 4707017 + 82fff1b commit 16b6359
Show file tree
Hide file tree
Showing 110 changed files with 22,839 additions and 16,491 deletions.
69 changes: 22 additions & 47 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,35 +50,26 @@ 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@v3
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@v3
uses: actions/cache@v4
with:
path: ~/.platformio
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
Expand All @@ -100,32 +84,14 @@ 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
with:
name: ${{ matrix.env }}.bin
path: .pio/build/${{ matrix.env }}/firmware.bin
path: .pio/build/${{ matrix.env }}/*.bin

release:
name: Upload release assets
Expand All @@ -148,20 +114,29 @@ jobs:
mv "$image" "$board"
done
- name: Get the bootloader and partition files
run: |
for i in openevse_wifi_tft_v1:16mb openevse_wifi_v1:4mb; do
env=$(cut -f1 -d: <<< $i)
name=$(cut -f2 -d: <<< $i)
mv artifacts/$env.bin/bootloader.bin bootloader_$name.bin
mv artifacts/$env.bin/partitions.bin partitions_$name.bin
done
- name: Upload assets to latest release
if: github.ref_name == 'master'
uses: "marvinpinto/action-automatic-releases@latest"
uses: "softprops/action-gh-release@v2"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: latest
prerelease: true
title: Development Build
tag_name: latest
name: Development Build
generate_release_notes: true
files: |
*.bin
- 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
82 changes: 82 additions & 0 deletions .github/workflows/build_gui.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# 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
git status
- 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
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,17 @@ lib/ESPAL
lib/MicroDebug
lib/StreamSpy
lib/MicroTasks
lib/jeremypoulter/ArduinoMongoose
lib/jeremypoulter/ConfigJson
lib/jeremypoulter/OpenEVSE
lib/jeremypoulter/ESPAL
lib/jeremypoulter/Micro Debug
lib/jeremypoulter/StreamSpy
lib/jeremypoulter/MicroTasks

*.bin
divert_sim/epoxyfsdata
divert_sim/epoxyeepromdata

*.pem
*.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.
Loading

0 comments on commit 16b6359

Please sign in to comment.