use actual builded safeboot firmwares for all esp32 env (Github Actions only) (#16915)

This commit is contained in:
Jason2866 2022-10-26 15:50:44 +02:00 committed by GitHub
parent 0d45590ac4
commit e2391c33e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 227 additions and 65 deletions

View File

@ -1,3 +1,4 @@
name: Build_development
on:
@ -14,38 +15,13 @@ concurrency:
cancel-in-progress: true
jobs:
base-images:
safeboot-images:
runs-on: ubuntu-latest
if: github.repository == 'arendst/Tasmota'
continue-on-error: true
strategy:
matrix:
variant:
- tasmota
- tasmota4M
- tasmota-minimal
- tasmota-display
- tasmota-ir
- tasmota-knx
- tasmota-lite
- tasmota-sensors
- tasmota-zbbridge
- tasmota-zigbee
- tasmota32
- tasmota32-zbbrdgpro
- tasmota32-webcam
- tasmota32-bluetooth
- tasmota32-nspanel
- tasmota32-display
- tasmota32-ir
- tasmota32-lvgl
- tasmota32c3
- tasmota32c3cdc
- tasmota32s2
- tasmota32s2cdc
- tasmota32s3
- tasmota32s3cdc
- tasmota32solo1
- tasmota32solo1-safeboot
- tasmota32-safeboot
- tasmota32c3-safeboot
@ -68,12 +44,102 @@ jobs:
pip install -U platformio
- name: Run PlatformIO
run: platformio run -e ${{ matrix.variant }}
- uses: actions/upload-artifact@v3
- name: Upload safeboot firmware artifacts
uses: actions/upload-artifact@v3
with:
name: firmware_safeboot
path: ./build_output
base-images:
runs-on: ubuntu-latest
if: github.repository == 'arendst/Tasmota'
continue-on-error: true
strategy:
matrix:
variant:
- tasmota
- tasmota4M
- tasmota-minimal
- tasmota-display
- tasmota-ir
- tasmota-knx
- tasmota-lite
- tasmota-sensors
- tasmota-zbbridge
- tasmota-zigbee
steps:
- uses: actions/checkout@v3
with:
ref: development
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: |
pip install wheel
pip install -U platformio
- name: Run PlatformIO
run: platformio run -e ${{ matrix.variant }}
- name: Upload firmware artifacts
uses: actions/upload-artifact@v3
with:
name: firmware
path: ./build_output
base32-images:
needs: safeboot-images
runs-on: ubuntu-latest
if: github.repository == 'arendst/Tasmota'
continue-on-error: true
strategy:
matrix:
variant:
- tasmota32
- tasmota32-zbbrdgpro
- tasmota32-webcam
- tasmota32-bluetooth
- tasmota32-nspanel
- tasmota32-display
- tasmota32-ir
- tasmota32-lvgl
- tasmota32c3
- tasmota32c3cdc
- tasmota32s2
- tasmota32s2cdc
- tasmota32s3
- tasmota32s3cdc
- tasmota32solo1
steps:
- uses: actions/checkout@v3
with:
ref: development
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: |
pip install wheel
pip install -U platformio
- name: Download safeboot firmwares
uses: actions/download-artifact@v3
with:
name: firmware_safeboot
path: ./firmware
- name: Display downloaded files
run: |
ls -R ./firmware/
- name: Run PlatformIO
run: platformio run -e ${{ matrix.variant }}
- name: Upload firmware artifacts
uses: actions/upload-artifact@v3
with:
name: firmware
path: ./build_output
language-images:
needs: safeboot-images
runs-on: ubuntu-latest
if: github.repository == 'arendst/Tasmota'
continue-on-error: true
@ -93,22 +159,37 @@ jobs:
run: |
pip install wheel
pip install -U platformio
- name: Download safeboot firmwares
uses: actions/download-artifact@v3
with:
name: firmware_safeboot
path: ./firmware
- name: Display downloaded files
run: |
ls -R ./firmware/
- name: Run PlatformIO
run: platformio run -e ${{ matrix.variant }}-${{ matrix.language }}
- uses: actions/upload-artifact@v3
- name: Upload language firmware artifacts
uses: actions/upload-artifact@v3
with:
name: firmware
path: ./build_output
Upload:
needs: [base-images, language-images]
needs: [base-images, base32-images, language-images]
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/download-artifact@v3
- name: Download firmware
uses: actions/download-artifact@v3
with:
name: firmware
path: ./mv_firmware
- name: Downlaod safeboot firmware
uses: actions/download-artifact@v3
with:
name: firmware_safeboot
path: ./mv_firmware
- name: Display structure of downloaded files
run: ls -R
working-directory: ./mv_firmware
@ -159,7 +240,6 @@ jobs:
destination_branch: 'firmware'
user_email: 'github-actions@github.com'
user_name: 'github-actions'
Start_final_copy:
needs: Upload
runs-on: ubuntu-latest

View File

@ -1,6 +1,7 @@
name: Build_firmware_master
on:
workflow_dispatch: # Manually start a workflow
push:
branches: master
paths-ignore:
@ -13,38 +14,13 @@ concurrency:
cancel-in-progress: true
jobs:
base-images:
safeboot-images:
runs-on: ubuntu-latest
if: github.repository == 'arendst/Tasmota'
continue-on-error: true
strategy:
matrix:
variant:
- tasmota
- tasmota4M
- tasmota-minimal
- tasmota-display
- tasmota-ir
- tasmota-knx
- tasmota-lite
- tasmota-sensors
- tasmota-zbbridge
- tasmota-zigbee
- tasmota32
- tasmota32-zbbrdgpro
- tasmota32-webcam
- tasmota32-bluetooth
- tasmota32-nspanel
- tasmota32-display
- tasmota32-ir
- tasmota32-lvgl
- tasmota32c3
- tasmota32c3cdc
- tasmota32s2
- tasmota32s2cdc
- tasmota32s3
- tasmota32s3cdc
- tasmota32solo1
- tasmota32solo1-safeboot
- tasmota32-safeboot
- tasmota32c3-safeboot
@ -67,12 +43,102 @@ jobs:
pip install -U platformio
- name: Run PlatformIO
run: platformio run -e ${{ matrix.variant }}
- uses: actions/upload-artifact@v3
- name: Upload safeboot firmware artifacts
uses: actions/upload-artifact@v3
with:
name: firmware_safeboot
path: ./build_output
base-images:
runs-on: ubuntu-latest
if: github.repository == 'arendst/Tasmota'
continue-on-error: true
strategy:
matrix:
variant:
- tasmota
- tasmota4M
- tasmota-minimal
- tasmota-display
- tasmota-ir
- tasmota-knx
- tasmota-lite
- tasmota-sensors
- tasmota-zbbridge
- tasmota-zigbee
steps:
- uses: actions/checkout@v3
with:
ref: master
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: |
pip install wheel
pip install -U platformio
- name: Run PlatformIO
run: platformio run -e ${{ matrix.variant }}
- name: Upload firmware artifacts
uses: actions/upload-artifact@v3
with:
name: firmware
path: ./build_output
base32-images:
needs: safeboot-images
runs-on: ubuntu-latest
if: github.repository == 'arendst/Tasmota'
continue-on-error: true
strategy:
matrix:
variant:
- tasmota32
- tasmota32-zbbrdgpro
- tasmota32-webcam
- tasmota32-bluetooth
- tasmota32-nspanel
- tasmota32-display
- tasmota32-ir
- tasmota32-lvgl
- tasmota32c3
- tasmota32c3cdc
- tasmota32s2
- tasmota32s2cdc
- tasmota32s3
- tasmota32s3cdc
- tasmota32solo1
steps:
- uses: actions/checkout@v3
with:
ref: master
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: |
pip install wheel
pip install -U platformio
- name: Download safeboot firmwares
uses: actions/download-artifact@v3
with:
name: firmware_safeboot
path: ./firmware
- name: Display downloaded files
run: |
ls -R ./firmware/
- name: Run PlatformIO
run: platformio run -e ${{ matrix.variant }}
- name: Upload firmware artifacts
uses: actions/upload-artifact@v3
with:
name: firmware
path: ./build_output
language-images:
needs: safeboot-images
runs-on: ubuntu-latest
if: github.repository == 'arendst/Tasmota'
continue-on-error: true
@ -92,9 +158,18 @@ jobs:
run: |
pip install wheel
pip install -U platformio
- name: Download safeboot firmwares
uses: actions/download-artifact@v3
with:
name: firmware_safeboot
path: ./firmware
- name: Display downloaded files
run: |
ls -R ./firmware/
- name: Run PlatformIO
run: platformio run -e ${{ matrix.variant }}-${{ matrix.language }}
- uses: actions/upload-artifact@v3
- name: Upload language firmware artifacts
uses: actions/upload-artifact@v3
with:
name: firmware
path: ./build_output
@ -112,7 +187,7 @@ jobs:
- name: Display structure of downloaded files
run: ls -R ./mv_firmware/
- name: Release
uses: softprops/action-gh-release@v1
uses: jason2866/action-gh-release@v1.1
#if: startsWith(github.ref, 'refs/tags/')
with:
tag_name: ${{ github.run_number }}

View File

@ -33,15 +33,22 @@ import subprocess
sys.path.append(join(platform.get_package_dir("tool-esptoolpy")))
import esptool
github_actions = os.getenv('GITHUB_ACTIONS')
extra_flags = ''.join([element.replace("-D", " ") for element in env.BoardConfig().get("build.extra_flags", "")])
build_flags = ''.join([element.replace("-D", " ") for element in env.GetProjectOption("build_flags")])
if "CORE32SOLO1" in extra_flags or "FRAMEWORK_ARDUINO_SOLO1" in build_flags:
FRAMEWORK_DIR = platform.get_package_dir("framework-arduino-solo1")
if github_actions and os.path.exists("./firmware/firmware"):
shutil.copytree("./firmware/firmware", "/home/runner/.platformio/packages/framework-arduino-solo1/variants/tasmota")
elif "CORE32ITEAD" in extra_flags or "FRAMEWORK_ARDUINO_ITEAD" in build_flags:
FRAMEWORK_DIR = platform.get_package_dir("framework-arduino-ITEAD")
if github_actions and os.path.exists("./firmware/firmware"):
shutil.copytree("./firmware/firmware", "/home/runner/.platformio/packages/framework-arduino-ITEAD/variants/tasmota")
else:
FRAMEWORK_DIR = platform.get_package_dir("framework-arduinoespressif32")
if github_actions and os.path.exists("./firmware/firmware"):
shutil.copytree("./firmware/firmware", "/home/runner/.platformio/packages/framework-arduinoespressif32/variants/tasmota")
variants_dir = join(FRAMEWORK_DIR, "variants", "tasmota")