Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
gwk1 committed Jan 12, 2025
2 parents 0d5cb9e + 508301e commit a7e845b
Show file tree
Hide file tree
Showing 186 changed files with 13,013 additions and 6,808 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@
- Inverter communication protocol: ``
- Hardware used for Battery-Emulator: `HW_LILYGO, HW_STARK, Custom`
- CONTACTOR_CONTROL: `yes/no`
- DUAL_CAN: `yes/no`
- CAN_ADDON: `yes/no`
- WEBSERVER: `yes/no`
- MQTT: `yes/no`
38 changes: 32 additions & 6 deletions .github/workflows/compile-all-batteries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,28 @@ on:
- pull_request

# This is the list of jobs that will be run concurrently.
# Since we use a build matrix, the actual number of jobs
# started depends on how many configurations the matrix
# will produce.
jobs:
# This is the name of the job
# This pre-job is run to skip workflows in case a workflow is already run, i.e. because the workflow is triggered by both push and pull_request
skip-duplicate-actions:
runs-on: ubuntu-latest
# Map a step output to a job output
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@v5
with:
# All of these options are optional, so you can remove them if you are happy with the defaults
concurrent_skipping: 'never'
skip_after_successful_duplicate: 'true'
do_not_skip: '["pull_request", "workflow_dispatch", "schedule"]'

# Since we use a build matrix, the actual number of jobs
# started depends on how many configurations the matrix
# will produce.
build-batteries:
needs: skip-duplicate-actions
if: needs.skip-duplicate-actions.outputs.should_skip != 'true'

# Here we tell GitHub that the jobs must be determined
# dynamically depending on a matrix configuration.
Expand All @@ -40,8 +56,8 @@ jobs:
- CHADEMO_BATTERY
- IMIEV_CZERO_ION_BATTERY
- JAGUAR_IPACE_BATTERY
- KIA_HYUNDAI_64_BATTERY
- KIA_E_GMP_BATTERY
- KIA_HYUNDAI_64_BATTERY
- KIA_HYUNDAI_HYBRID_BATTERY
- MEB_BATTERY
- MG_5_BATTERY
Expand All @@ -54,13 +70,19 @@ jobs:
- RENAULT_ZOE_GEN1_BATTERY
- RENAULT_ZOE_GEN2_BATTERY
- SANTA_FE_PHEV_BATTERY
- STELLANTIS_ECMP_BATTERY
- TESLA_MODEL_3Y_BATTERY
- TESLA_MODEL_SX_BATTERY
- VOLVO_SPA_BATTERY
- TEST_FAKE_BATTERY
- SERIAL_LINK_RECEIVER
# These are the emulated inverter communication protocols for which the code will be compiled.
inverter:
- BYD_CAN
# These are the supported hardware platforms for which the code will be compiled.
hardware:
- HW_LILYGO

# This is the platform GitHub will use to run our workflow.
runs-on: ubuntu-latest

Expand All @@ -69,6 +91,10 @@ jobs:
# First we clone the repo using the `checkout` action.
- name: Checkout
uses: actions/checkout@v4

# Copy USER_SECRETS.TEMPLATE.h to USER_SECRETS.h
- name: Copy USER_SECRETS.TEMPLATE.h to USER_SECRETS.h
run: cp ./Software/USER_SECRETS.TEMPLATE.h ./Software/USER_SECRETS.h

# We use the `arduino/setup-arduino-cli` action to install and
# configure the Arduino CLI on the system.
Expand All @@ -85,4 +111,4 @@ jobs:
# in the build matrix, and using build flags to define the
# battery and inverter set in the build matrix.
- name: Compile Sketch
run: arduino-cli compile --fqbn ${{ matrix.fqbn }} --build-property "build.extra_flags=-Wall -DESP32 -D${{ matrix.battery}} -D${{ matrix.inverter}}" ./Software
run: arduino-cli compile --fqbn ${{ matrix.fqbn }} --build-property "build.extra_flags=-Wall -DESP32 -D${{ matrix.battery}} -D${{ matrix.inverter}} -D${{ matrix.hardware}}" ./Software
119 changes: 119 additions & 0 deletions .github/workflows/compile-all-combinations-part1-batteries-A-to-M.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
# This is the name of the workflow, visible on GitHub UI.
name: Compile All Combinations

# Here we tell GitHub when to run the workflow.
on:
# This allows you to run this workflow manually from the
# GitHub Actions tab.
workflow_dispatch:
# The workflow is run upon creating, editing,
# pre-releasing, releasing and publishing a release
release:
types: [created, edited, prereleased, released, published]

# This is the list of jobs that will be run concurrently.
jobs:
# This pre-job is run to skip workflows in case a workflow is already run, i.e. because the workflow is triggered by both push and pull_request
skip-duplicate-actions:
runs-on: ubuntu-latest
# Map a step output to a job output
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@v5
with:
# All of these options are optional, so you can remove them if you are happy with the defaults
concurrent_skipping: 'never'
skip_after_successful_duplicate: 'true'
do_not_skip: '["pull_request", "workflow_dispatch", "schedule"]'

# Since we use a build matrix, the actual number of jobs
# started depends on how many configurations the matrix
# will produce.

# This is the name of the job.
build-matrix:
needs: skip-duplicate-actions
if: needs.skip-duplicate-actions.outputs.should_skip != 'true'

# Here we tell GitHub that the jobs must be determined
# dynamically depending on a matrix configuration.
strategy:
# The matrix will produce one job for each combination of parameters.
matrix:
# This is the development board hardware for which the code will be compiled.
# FBQN stands for "fully qualified board name", and is used by Arduino to define the hardware to compile for.
fqbn:
- esp32:esp32:esp32
# further ESP32 chips
#- esp32:esp32:esp32c3
#- esp32:esp32:esp32c2
#- esp32:esp32:esp32c6
#- esp32:esp32:esp32h2
#- esp32:esp32:esp32s3
# These are the batteries for which the code will be compiled.
battery:
- BMW_I3_BATTERY
- BMW_IX_BATTERY
- BYD_ATTO_3_BATTERY
- CELLPOWER_BMS
- CHADEMO_BATTERY
- IMIEV_CZERO_ION_BATTERY
- JAGUAR_IPACE_BATTERY
- KIA_E_GMP_BATTERY
- KIA_HYUNDAI_64_BATTERY
- KIA_HYUNDAI_HYBRID_BATTERY
- MEB_BATTERY
- MG_5_BATTERY
# These are the emulated inverter communication protocols for which the code will be compiled.
inverter:
- AFORE_CAN
- BYD_CAN
- BYD_KOSTAL_RS485
- BYD_MODBUS
- FOXESS_CAN
- GROWATT_LV_CAN
- PYLON_CAN
- PYLON_LV_CAN
- SCHNEIDER_CAN
- SMA_BYD_H_CAN
- SMA_BYD_HVS_CAN
- SMA_LV_CAN
- SMA_TRIPOWER_CAN
- SOFAR_CAN
- SOLAX_CAN
- SERIAL_LINK_TRANSMITTER
# These are the supported hardware platforms for which the code will be compiled.
hardware:
- HW_LILYGO

# This is the platform GitHub will use to run our workflow.
runs-on: ubuntu-latest

# This is the list of steps this job will run.
steps:
# First we clone the repo using the `checkout` action.
- name: Checkout
uses: actions/checkout@v4

# Copy USER_SECRETS.TEMPLATE.h to USER_SECRETS.h
- name: Copy USER_SECRETS.TEMPLATE.h to USER_SECRETS.h
run: cp ./Software/USER_SECRETS.TEMPLATE.h ./Software/USER_SECRETS.h

# We use the `arduino/setup-arduino-cli` action to install and
# configure the Arduino CLI on the system.
- name: Setup Arduino CLI
uses: arduino/setup-arduino-cli@v2

# We then install the platform.
- name: Install platform
run: |
arduino-cli core update-index
arduino-cli core install esp32:esp32
# Finally, we compile the sketch, using the FQBN that was set
# in the build matrix, and using build flags to define the
# battery and inverter set in the build matrix.
- name: Compile Sketch
run: arduino-cli compile --fqbn ${{ matrix.fqbn }} --build-property "build.extra_flags=-Wall -DESP32 -D${{ matrix.battery}} -D${{ matrix.inverter}} -D${{ matrix.hardware}}" ./Software
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,30 @@ on:
types: [created, edited, prereleased, released, published]

# This is the list of jobs that will be run concurrently.
# Since we use a build matrix, the actual number of jobs
# started depends on how many configurations the matrix
# will produce.
jobs:
# This pre-job is run to skip workflows in case a workflow is already run, i.e. because the workflow is triggered by both push and pull_request
skip-duplicate-actions:
runs-on: ubuntu-latest
# Map a step output to a job output
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@v5
with:
# All of these options are optional, so you can remove them if you are happy with the defaults
concurrent_skipping: 'never'
skip_after_successful_duplicate: 'true'
do_not_skip: '["pull_request", "workflow_dispatch", "schedule"]'

# Since we use a build matrix, the actual number of jobs
# started depends on how many configurations the matrix
# will produce.

# This is the name of the job.
build-matrix:
needs: skip-duplicate-actions
if: needs.skip-duplicate-actions.outputs.should_skip != 'true'

# Here we tell GitHub that the jobs must be determined
# dynamically depending on a matrix configuration.
Expand All @@ -36,34 +54,41 @@ jobs:
#- esp32:esp32:esp32s3
# These are the batteries for which the code will be compiled.
battery:
- BMW_I3_BATTERY
- BYD_ATTO_3_BATTERY
- CHADEMO_BATTERY
- IMIEV_CZERO_ION_BATTERY
- KIA_HYUNDAI_64_BATTERY
- KIA_HYUNDAI_HYBRID_BATTERY
- NISSAN_LEAF_BATTERY
- PYLON_BATTERY
- RJXZS_BMS
- RANGE_ROVER_PHEV_BATTERY
- RENAULT_KANGOO_BATTERY
- RENAULT_TWIZY_BATTERY
- RENAULT_ZOE_GEN1_BATTERY
- RENAULT_ZOE_GEN2_BATTERY
- SANTA_FE_PHEV_BATTERY
- STELLANTIS_ECMP_BATTERY
- TESLA_MODEL_3Y_BATTERY
- TESLA_MODEL_SX_BATTERY
- VOLVO_SPA_BATTERY
- TEST_FAKE_BATTERY
# These are the emulated inverter communication protocols for which the code will be compiled.
inverter:
- AFORE_CAN
- BYD_CAN
- BYD_KOSTAL_RS485
- BYD_SMA
- BYD_MODBUS
- FOXESS_CAN
- GROWATT_LV_CAN
- PYLON_CAN
- SMA_CAN
- PYLON_LV_CAN
- SCHNEIDER_CAN
- SMA_BYD_H_CAN
- SMA_BYD_HVS_CAN
- SMA_LV_CAN
- SMA_TRIPOWER_CAN
- SOFAR_CAN
- SOLAX_CAN
- SERIAL_LINK_TRANSMITTER
# These are the supported hardware platforms for which the code will be compiled.
hardware:
- HW_LILYGO

# This is the platform GitHub will use to run our workflow.
runs-on: ubuntu-latest
Expand All @@ -73,6 +98,10 @@ jobs:
# First we clone the repo using the `checkout` action.
- name: Checkout
uses: actions/checkout@v4

# Copy USER_SECRETS.TEMPLATE.h to USER_SECRETS.h
- name: Copy USER_SECRETS.TEMPLATE.h to USER_SECRETS.h
run: cp ./Software/USER_SECRETS.TEMPLATE.h ./Software/USER_SECRETS.h

# We use the `arduino/setup-arduino-cli` action to install and
# configure the Arduino CLI on the system.
Expand All @@ -89,4 +118,4 @@ jobs:
# in the build matrix, and using build flags to define the
# battery and inverter set in the build matrix.
- name: Compile Sketch
run: arduino-cli compile --fqbn ${{ matrix.fqbn }} --build-property "build.extra_flags=-Wall -DESP32 -D${{ matrix.battery}} -D${{ matrix.inverter}}" ./Software
run: arduino-cli compile --fqbn ${{ matrix.fqbn }} --build-property "build.extra_flags=-Wall -DESP32 -D${{ matrix.battery}} -D${{ matrix.inverter}} -D${{ matrix.hardware}}" ./Software
Loading

0 comments on commit a7e845b

Please sign in to comment.