Skip to content

Commit 39a8136

Browse files
Merge branch 'master' into jeremypoulter/core_partition
2 parents 0767bbb + bfcacf7 commit 39a8136

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+14627
-4912
lines changed

.github/workflows/build.yaml

Lines changed: 34 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
name: Build/Release OpenEVSE
44

5+
permissions:
6+
contents: write
7+
58
on:
69
workflow_dispatch:
710
inputs:
@@ -13,10 +16,12 @@ on:
1316
required: true
1417
description: The branch/tag for the v2 UI
1518
default: master
16-
19+
1720
push:
1821
branches:
1922
- master
23+
tags:
24+
- 'v*'
2025
pull_request:
2126

2227
jobs:
@@ -28,7 +33,7 @@ jobs:
2833

2934
- name: Dump the event
3035
run: cat $GITHUB_EVENT_PATH
31-
36+
3237
- name: Dump github.ref_name
3338
run: echo "github.ref_name = '${{ github.ref_name }}'"
3439

@@ -54,11 +59,11 @@ jobs:
5459
- openevse_esp32-poe-iso
5560
- openevse_esp32-heltec-wifi-lora-v2
5661
gui:
57-
- name: openevse_wifi_gui
62+
- name: gui-v1
5863
repo: OpenEVSE/openevse_wifi_gui
5964
build_flags: ""
6065
ref: ${{ inputs.v1_ref }}
61-
- name: openevse-gui-v2
66+
- name: gui-v2
6267
repo: KipK/openevse-gui-v2
6368
build_flags: "-D DISABLE_WIFI_PORTAL -D WEB_SERVER_ROOT_PAGE_INDEX"
6469
ref: ${{ inputs.v2_ref }}
@@ -68,13 +73,6 @@ jobs:
6873

6974
- uses: actions/checkout@v3
7075

71-
# - name: Temp checkout latest OpenEVSE lib
72-
# uses: actions/checkout@v3
73-
# with:
74-
# repository: jeremypoulter/OpenEVSE_Lib
75-
# ref: openevse_wifi_timer_apis
76-
# path: lib/OpenEVSE
77-
7876
- name: Checkout GUI
7977
uses: actions/checkout@v3
8078
with:
@@ -137,7 +135,7 @@ jobs:
137135
release:
138136
runs-on: ubuntu-latest
139137
needs: build
140-
if: github.ref_name == 'master' || github.ref_name == 'build_v2_gui' || github.head_ref == 'build_v2_gui'
138+
if: github.ref_name == 'master' || startsWith(github.ref_name, 'v')
141139

142140
steps:
143141
- name: Download the built assets
@@ -155,11 +153,33 @@ jobs:
155153
done
156154
157155
- name: Upload assets to latest release
156+
if: github.ref_name == 'master'
158157
uses: "marvinpinto/action-automatic-releases@latest"
159158
with:
160159
repo_token: "${{ secrets.GITHUB_TOKEN }}"
161-
automatic_release_tag: "${{ github.ref_name == 'master' && 'latest' || 'v2_gui' }}"
160+
automatic_release_tag: latest
161+
prerelease: true
162+
title: Development Build
163+
files: |
164+
*gui-v1.bin
165+
166+
- name: Upload assets to the v2 GUI release
167+
if: github.ref_name == 'master'
168+
uses: "marvinpinto/action-automatic-releases@latest"
169+
with:
170+
repo_token: "${{ secrets.GITHUB_TOKEN }}"
171+
automatic_release_tag: v2_gui
172+
prerelease: true
173+
title: V2 GUI pre-release
174+
files: |
175+
*gui-v2.bin
176+
177+
- name: Upload assets to release
178+
if: startsWith(github.ref_name, 'v')
179+
uses: "softprops/action-gh-release@v1"
180+
with:
181+
repo_token: "${{ secrets.GITHUB_TOKEN }}"
162182
prerelease: true
163-
title: "${{ github.ref_name == 'master' && 'Development Build' || 'V2 GUI pre-release' }}"
183+
title: "${{ github.ref_name }}"
164184
files: |
165185
*.bin

.github/workflows/divert_sim.yaml

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
2+
3+
name: Build OpenEVSE divert simulator
4+
5+
permissions:
6+
contents: write
7+
8+
on:
9+
push:
10+
branches:
11+
- master
12+
pull_request:
13+
14+
jobs:
15+
build:
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- uses: actions/checkout@v3
20+
with:
21+
path: OpenEVSE_WiFi
22+
23+
- uses: actions/checkout@v3
24+
with:
25+
repository: JeremyPoulter/MicroDebug
26+
path: MicroDebug
27+
28+
- uses: actions/checkout@v3
29+
with:
30+
repository: JeremyPoulter/MicroTasks
31+
path: MicroTasks
32+
33+
- uses: actions/checkout@v3
34+
with:
35+
repository: JeremyPoulter/StreamSpy
36+
path: StreamSpy
37+
38+
- uses: actions/checkout@v3
39+
with:
40+
repository: JeremyPoulter/ConfigJson
41+
path: ConfigJson
42+
43+
- uses: actions/checkout@v3
44+
with:
45+
repository: bblanchon/ArduinoJson
46+
path: ArduinoJson
47+
ref: v6.20.1
48+
49+
- uses: actions/checkout@v3
50+
with:
51+
repository: JeremyPoulter/OpenEVSE_Lib
52+
path: OpenEVSE_Lib
53+
54+
- uses: actions/checkout@v3
55+
with:
56+
repository: JeremyPoulter/EpoxyDuino
57+
path: EpoxyDuino
58+
59+
- uses: actions/checkout@v3
60+
with:
61+
repository: JeremyPoulter/ESPAL
62+
path: ESPAL
63+
64+
- uses: ammaraskar/gcc-problem-matcher@master
65+
66+
- name: Build the simulator
67+
run: |
68+
cd OpenEVSE_WiFi/divert_sim
69+
make -j
70+
71+
- name: Upload artifacts
72+
uses: actions/upload-artifact@v3
73+
with:
74+
name: divert_sim
75+
path: OpenEVSE_WiFi/divert_sim/divert_sim
76+
77+
- name: run tests
78+
run: |
79+
cd OpenEVSE_WiFi/divert_sim
80+
bash runall.sh
81+
82+
- name : Upload test results
83+
uses: actions/upload-artifact@v3
84+
with:
85+
name: test_results
86+
path: |
87+
OpenEVSE_WiFi/divert_sim/output
88+
OpenEVSE_WiFi/divert_sim/view.html

.github/workflows/release_validation.yaml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- name: Set up Node JS
2222
uses: actions/setup-node@v3
2323
with:
24-
node-version: '12'
24+
node-version: '16'
2525

2626
- name: Install dependencies
2727
run: |
@@ -51,16 +51,21 @@ jobs:
5151
### Check the version number in the code matches the tag number
5252
- uses: actions/checkout@v3
5353

54+
- name: Set up Python
55+
uses: actions/setup-python@v4
56+
with:
57+
python-version: '3.x'
58+
5459
- name: Retrieve the version number(s)
5560
run: |
56-
TAG_VERSION=$(sed "s/^v//" <<< $GITHUB_REF_NAME)
57-
CODE_VERSION=$(grep BUILD_TAG platformio.ini | awk -F= '{print $NF}')
61+
TAG_VERSION=$GITHUB_REF_NAME
62+
CODE_VERSION=$(python3 scripts/auto_fw_version.py | grep -E 'BUILD_TAG=([^ ]+)' -o | cut -d= -f2)
5863
echo TAG_VERSION=$TAG_VERSION >> $GITHUB_ENV
5964
echo CODE_VERSION=$CODE_VERSION >> $GITHUB_ENV
6065
61-
- name: Check the version numberis semver compliant
66+
- name: Check the version number is semver compliant
6267
run: |
63-
if ! [[ $TAG_VERSION =~ ^[0-9]+\.[0-9]+\.[0-9]+(-[a-z]*[0-9]+)?$ ]]; then
68+
if ! [[ $TAG_VERSION =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-[a-z]*[0-9]+)?$ ]]; then
6469
echo "ERROR: The version number is not semver compliant"
6570
exit 1
6671
fi

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,3 +90,5 @@ lib/StreamSpy
9090
lib/MicroTasks
9191

9292
*.bin
93+
divert_sim/epoxyfsdata
94+
divert_sim/epoxyeepromdata

0 commit comments

Comments
 (0)