mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-02 17:29:22 +02:00
Add workflow for T-2CAN
This commit is contained in:
parent
d7190d770b
commit
e5678d2406
5 changed files with 72 additions and 4 deletions
58
.github/workflows/compile-common-image-lilygo-2CAN.yml
vendored
Normal file
58
.github/workflows/compile-common-image-lilygo-2CAN.yml
vendored
Normal file
|
@ -0,0 +1,58 @@
|
|||
name: 🔋 Compile Common Image for Lilygo 2CAN
|
||||
|
||||
on:
|
||||
# The workflow is run when a commit is pushed or for a
|
||||
# Pull Request.
|
||||
- push
|
||||
- pull_request
|
||||
|
||||
# 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"]'
|
||||
|
||||
build-common-image:
|
||||
# This is the platform GitHub will use to run our workflow.
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
name: Checkout code
|
||||
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
~/.cache/pip
|
||||
~/.platformio/.cache
|
||||
key: ${{ runner.os }}-pio
|
||||
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.11'
|
||||
- name: Install PlatformIO Core
|
||||
run: pip install --upgrade platformio
|
||||
|
||||
# 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
|
||||
|
||||
- name: Build image for Lilygo
|
||||
run: pio run -e lilygo_2CAN_330
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: battery-emulator-lilygo.bin
|
||||
path: .pio/build/lilygo_2CAN_330/firmware.bin
|
|
@ -1,4 +1,4 @@
|
|||
name: 🔋 Compile Common Image for Lilygo
|
||||
name: 🔋 Compile Common Image for Lilygo T-CAN
|
||||
|
||||
on:
|
||||
# The workflow is run when a commit is pushed or for a
|
14
.github/workflows/release-assets.yml
vendored
14
.github/workflows/release-assets.yml
vendored
|
@ -51,16 +51,26 @@ jobs:
|
|||
- name: Copy USER_SECRETS.TEMPLATE.h to USER_SECRETS.h
|
||||
run: cp ./Software/USER_SECRETS.TEMPLATE.h ./Software/USER_SECRETS.h
|
||||
|
||||
- name: 🛠 Build ota image for Lilygo
|
||||
- name: 🛠 Build ota image for Lilygo T-CAN
|
||||
run: |
|
||||
pio run -e lilygo_330
|
||||
cp .pio/build/lilygo_330/firmware.bin output/BE_${{ steps.vars.outputs.tag }}_LilygoT-CAN485.ota.bin
|
||||
|
||||
- name: 🛠 Build factory image for Lilygo
|
||||
- name: 🛠 Build factory image for Lilygo T-CAN
|
||||
run: |
|
||||
esptool --chip esp32 merge-bin -o .pio/build/lilygo_330/factory.bin --flash-mode dio --flash-freq 40m --flash-size 4MB 0x1000 .pio/build/lilygo_330/bootloader.bin 0x8000 .pio/build/lilygo_330/partitions.bin 0xe000 ~/.platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin 0x10000 .pio/build/lilygo_330/firmware.bin
|
||||
mv .pio/build/lilygo_330/factory.bin output/BE_${{ steps.vars.outputs.tag }}_LilygoT-CAN485.factory.bin
|
||||
|
||||
- name: 🛠 Build ota image for Lilygo 2-CAN
|
||||
run: |
|
||||
pio run -e lilygo_2CAN_330
|
||||
cp .pio/build/lilygo_2CAN_330/firmware.bin output/BE_${{ steps.vars.outputs.tag }}_LilygoT-2CAN.ota.bin
|
||||
|
||||
- name: 🛠 Build factory image for Lilygo 2-CAN
|
||||
run: |
|
||||
esptool --chip esp32 merge-bin -o .pio/build/lilygo_2CAN_330/factory.bin --flash-mode dio --flash-freq 40m --flash-size 4MB 0x1000 .pio/build/lilygo_2CAN_330/bootloader.bin 0x8000 .pio/build/lilygo_2CAN_330/partitions.bin 0xe000 ~/.platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin 0x10000 .pio/build/lilygo_2CAN_330/firmware.bin
|
||||
mv .pio/build/lilygo_2CAN_330/factory.bin output/BE_${{ steps.vars.outputs.tag }}_LilygoT-2CAN.factory.bin
|
||||
|
||||
- name: 🛠 Build ota image for Stark
|
||||
run: |
|
||||
pio run -e stark_330
|
||||
|
|
|
@ -51,7 +51,7 @@ framework = arduino
|
|||
build_flags = -I include -DHW_STARK -DCOMMON_IMAGE -DDEBUG_VIA_USB
|
||||
lib_deps =
|
||||
|
||||
[env:lilygo_2can_330]
|
||||
[env:lilygo_2CAN_330]
|
||||
platform = https://github.com/pioarduino/platform-espressif32/releases/download/55.03.30/platform-espressif32.zip
|
||||
board = esp32s3_flash_16MB
|
||||
monitor_speed = 115200
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue