Tasmota/.github/workflows/Tasmota_build_devel.yml

286 lines
9.4 KiB
YAML
Raw Normal View History

2023-05-22 13:50:20 +01:00
name: Build_development
on:
workflow_dispatch: # Start a workflow
push:
branches: development
paths-ignore:
- '.github/**' # Ignore changes towards the .github directory
- '**.md' # Do no build if *.md files changes
# Ensures that only one deploy task per branch/environment will run at a time.
concurrency:
group: environment-${{ github.ref }}
cancel-in-progress: true
jobs:
be_solidify:
runs-on: ubuntu-latest
2023-05-25 22:11:03 +01:00
if: github.repository == 'arendst/Tasmota' && github.ref_name == 'development'
2023-05-22 13:50:20 +01:00
continue-on-error: true
steps:
2024-01-28 18:05:20 +00:00
- uses: actions/checkout@v4
2023-05-22 13:50:20 +01:00
- name: Set up Python
2024-01-28 18:05:20 +00:00
uses: actions/setup-python@v5
2023-05-22 13:50:20 +01:00
with:
python-version: '3.x'
- name: Install clang compiler
run: |
sudo apt-get install -f clang
- name: Make Berry and Tasmota Berry code
run: |
cd lib/libesp32/berry
make
cd ../berry_tasmota
../berry/berry -s -g solidify_all.be
- name: Matter Berry Code
run: |
cd lib/libesp32/berry_matter
../berry/berry -s -g solidify_all.be
- name: Berry Animate Code
run: |
cd lib/libesp32/berry_animate
../berry/berry -s -g solidify_all.be
2023-05-22 13:50:20 +01:00
- name: LVGL Berry Code
run: |
cd lib/libesp32_lvgl/lv_binding_berry
../../libesp32/berry/berry -s -g solidify_all.be
2024-03-12 20:18:31 +00:00
- name: HASPmota Berry Code
run: |
cd lib/libesp32_lvgl/lv_haspmota
../../libesp32/berry/berry -s -g solidify_all.be
2024-01-28 18:05:20 +00:00
- uses: jason2866/upload-artifact@v2.0.3
2023-05-22 13:50:20 +01:00
with:
2024-03-12 20:18:31 +00:00
name: '["berry_tasmota", "berry_matter", "berry_animate", "berry_lvgl", "berry_haspmota", "berry_header"]'
path: '["./lib/libesp32/berry_tasmota/src/solidify", "./lib/libesp32/berry_matter/src/solidify", "./lib/libesp32/berry_animate/src/solidify", "./lib/libesp32_lvgl/lv_binding_berry/src/solidify", "./lib/libesp32_lvgl/lv_haspmota/src/solidify", "./lib/libesp32/berry/generate"]'
2023-05-22 13:50:20 +01:00
push_solidified:
needs: be_solidify
runs-on: ubuntu-latest
2023-05-25 22:09:10 +01:00
if: github.repository == 'arendst/Tasmota' && github.ref_name == 'development'
2023-05-22 13:50:20 +01:00
continue-on-error: true
steps:
2024-01-28 18:05:20 +00:00
- uses: actions/checkout@v4
2023-05-22 13:50:20 +01:00
- name: Set up Python
2024-01-28 18:05:20 +00:00
uses: actions/setup-python@v5
2023-05-22 13:50:20 +01:00
with:
python-version: '3.x'
2024-01-28 18:05:20 +00:00
- uses: jason2866/download-artifact@v3.0.4
2023-05-22 13:50:20 +01:00
with:
name: |
berry_tasmota
berry_matter
2023-12-25 10:41:51 +00:00
berry_animate
2023-05-22 13:50:20 +01:00
berry_lvgl
2024-03-12 20:18:31 +00:00
berry_haspmota
2023-05-22 13:50:20 +01:00
berry_header
path: |
./lib/libesp32/berry_tasmota/src/solidify
./lib/libesp32/berry_matter/src/solidify
./lib/libesp32/berry_animate/src/solidify
2023-05-22 13:50:20 +01:00
./lib/libesp32_lvgl/lv_binding_berry/src/solidify
2024-03-12 20:18:31 +00:00
./lib/libesp32_lvgl/lv_haspmota/src/solidify
2023-05-22 13:50:20 +01:00
./lib/libesp32/berry/generate
2024-01-28 18:05:20 +00:00
- uses: stefanzweifel/git-auto-commit-action@v5
2023-05-22 13:50:20 +01:00
with:
commit_message: Solidified Code updated
safeboot-images:
needs: push_solidified
runs-on: ubuntu-latest
2023-05-25 22:11:03 +01:00
if: github.repository == 'arendst/Tasmota'
2023-05-22 13:50:20 +01:00
continue-on-error: true
strategy:
matrix:
variant:
- tasmota32solo1-safeboot
- tasmota32-safeboot
- tasmota32c3-safeboot
- tasmota32c3cdc-safeboot
- tasmota32s2-safeboot
- tasmota32s2cdc-safeboot
- tasmota32s3-safeboot
- tasmota32s3cdc-safeboot
- tasmota32c2-safeboot
- tasmota32c6-safeboot
- tasmota32c6cdc-safeboot
2023-05-22 13:50:20 +01:00
steps:
2024-01-28 18:05:20 +00:00
- uses: actions/checkout@v4
2023-05-22 13:50:20 +01:00
with:
ref: development
- name: Set up Python
2024-01-28 18:05:20 +00:00
uses: actions/setup-python@v5
2023-05-22 13:50:20 +01:00
with:
python-version: '3.x'
- name: Install dependencies
run: |
pip install wheel
pip install -U platformio
cp ./platformio_tasmota_core3_env_sample.ini ./platformio_tasmota_core3_env.ini
2023-11-14 22:43:44 +00:00
cp ./platformio_override_sample.ini ./platformio_override.ini
- name: Add SHA to footer
run: |
2024-02-29 14:17:51 +00:00
COMMIT_SHA_LONG=$(git rev-parse --short HEAD || echo "")
SHA=${COMMIT_SHA_LONG::7}
2024-02-29 14:45:59 +00:00
sed -i -e "s/TASMOTA_SHA_SHORT/TASMOTA_SHA_SHORT $SHA-/g" ./tasmota/include/tasmota_version.h
2023-05-22 13:50:20 +01:00
- name: Run PlatformIO
run: platformio run -e ${{ matrix.variant }}
- name: Upload safeboot firmware artifacts
2024-01-28 18:05:20 +00:00
uses: jason2866/upload-artifact@v2.0.3
2023-05-22 13:50:20 +01:00
with:
name: firmware_safeboot
path: ./build_output
base-images:
needs: push_solidified
runs-on: ubuntu-latest
if: github.repository == 'arendst/Tasmota'
continue-on-error: true
strategy:
matrix:
variant:
- tasmota
- tasmota-4M
- tasmota-minimal
- tasmota-display
- tasmota-ir
- tasmota-knx
- tasmota-lite
- tasmota-sensors
- tasmota-zbbridge
- tasmota-zigbee
steps:
2024-01-28 18:05:20 +00:00
- uses: actions/checkout@v4
2023-05-22 13:50:20 +01:00
with:
ref: development
- name: Set up Python
2024-01-28 18:05:20 +00:00
uses: actions/setup-python@v5
2023-05-22 13:50:20 +01:00
with:
python-version: '3.x'
- name: Install dependencies
run: |
pip install wheel
pip install -U platformio
- name: Add SHA to footer
run: |
2024-02-29 14:17:51 +00:00
COMMIT_SHA_LONG=$(git rev-parse --short HEAD || echo "")
SHA=${COMMIT_SHA_LONG::7}
2024-02-29 14:45:59 +00:00
sed -i -e "s/TASMOTA_SHA_SHORT/TASMOTA_SHA_SHORT $SHA-/g" ./tasmota/include/tasmota_version.h
2023-05-22 13:50:20 +01:00
- name: Run PlatformIO
run: platformio run -e ${{ matrix.variant }}
- name: Upload firmware artifacts
2024-01-28 18:05:20 +00:00
uses: jason2866/upload-artifact@v2.0.3
2023-05-22 13:50:20 +01:00
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
2023-11-18 12:14:41 +00:00
- tasmota32c2-arduino30
2023-11-18 12:23:28 +00:00
- tasmota32c6cdc-arduino30
2023-05-22 13:50:20 +01:00
steps:
2024-01-28 18:05:20 +00:00
- uses: actions/checkout@v4
2023-05-22 13:50:20 +01:00
with:
ref: development
- name: Set up Python
2024-01-28 18:05:20 +00:00
uses: actions/setup-python@v5
2023-05-22 13:50:20 +01:00
with:
python-version: '3.x'
- name: Install dependencies
run: |
pip install wheel
pip install -U platformio
2023-11-18 12:14:41 +00:00
cp ./platformio_tasmota_core3_env_sample.ini ./platformio_tasmota_core3_env.ini
cp ./platformio_override_sample.ini ./platformio_override.ini
2023-05-22 13:50:20 +01:00
- name: Download safeboot firmwares
2024-01-28 18:05:20 +00:00
uses: jason2866/download-artifact@v3.0.4
2023-05-22 13:50:20 +01:00
with:
name: firmware_safeboot
path: ./firmware
- name: Add SHA to footer
2023-05-22 13:50:20 +01:00
run: |
2024-02-29 14:17:51 +00:00
COMMIT_SHA_LONG=$(git rev-parse --short HEAD || echo "")
SHA=${COMMIT_SHA_LONG::7}
2024-02-29 14:45:59 +00:00
sed -i -e "s/TASMOTA_SHA_SHORT/TASMOTA_SHA_SHORT $SHA-/g" ./tasmota/include/tasmota_version.h
2023-05-22 13:50:20 +01:00
- name: Run PlatformIO
run: platformio run -e ${{ matrix.variant }}
- name: Upload firmware artifacts
2024-01-28 18:05:20 +00:00
uses: jason2866/upload-artifact@v2.0.3
2023-05-22 13:50:20 +01:00
with:
name: firmware
path: ./build_output
language-images:
needs: safeboot-images
runs-on: ubuntu-latest
if: github.repository == 'arendst/Tasmota'
continue-on-error: true
strategy:
matrix:
variant: [ tasmota, tasmota32 ]
language: [ AD, AF, BG, BR, CN, CZ, DE, ES, FR, FY, GR, HE, HU, IT, KO, NL, PL, PT, RO, RU, SE, SK, TR, TW, UK, VN ]
steps:
2024-01-28 18:05:20 +00:00
- uses: actions/checkout@v4
2023-05-22 13:50:20 +01:00
with:
ref: development
- name: Set up Python
2024-01-28 18:05:20 +00:00
uses: actions/setup-python@v5
2023-05-22 13:50:20 +01:00
with:
python-version: '3.x'
- name: Install dependencies
run: |
pip install wheel
pip install -U platformio
2023-11-18 12:14:41 +00:00
cp ./platformio_tasmota_core3_env_sample.ini ./platformio_tasmota_core3_env.ini
cp ./platformio_override_sample.ini ./platformio_override.ini
2023-05-22 13:50:20 +01:00
- name: Download safeboot firmwares
2024-01-28 18:05:20 +00:00
uses: jason2866/download-artifact@v3.0.4
2023-05-22 13:50:20 +01:00
with:
name: firmware_safeboot
path: ./firmware
- name: Add SHA to footer
2023-05-22 13:50:20 +01:00
run: |
2024-02-29 14:17:51 +00:00
COMMIT_SHA_LONG=$(git rev-parse --short HEAD || echo "")
SHA=${COMMIT_SHA_LONG::7}
2024-02-29 14:45:59 +00:00
sed -i -e "s/TASMOTA_SHA_SHORT/TASMOTA_SHA_SHORT $SHA-/g" ./tasmota/include/tasmota_version.h
2023-05-22 13:50:20 +01:00
- name: Run PlatformIO
run: platformio run -e ${{ matrix.variant }}-${{ matrix.language }}
- name: Upload language firmware artifacts
2024-01-28 18:05:20 +00:00
uses: jason2866/upload-artifact@v2.0.3
2023-05-22 13:50:20 +01:00
with:
name: firmware
path: ./build_output
Start_final_copy:
needs: [base-images, base32-images, language-images]
runs-on: ubuntu-latest
steps:
- name: Dispatch workflow in arendst/Tasmota-firmware
run: |
curl -X POST https://api.github.com/repos/arendst/Tasmota-firmware/actions/workflows/fetch_deploy.yml/dispatches \
-H 'Accept: application/vnd.github.everest-preview+json' \
-u ${{ secrets.API_TOKEN_GITHUB }} \
2023-05-24 18:43:01 +01:00
--data '{"ref": "gh_actions"}'