Skip to content

Commit

Permalink
ci: add ESP32 build on push
Browse files Browse the repository at this point in the history
  • Loading branch information
kamiKAC committed May 25, 2024
1 parent 4c775bb commit 9f1c6dc
Showing 1 changed file with 37 additions and 4 deletions.
41 changes: 37 additions & 4 deletions .github/workflows/Tasmota_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: 'development'
force: true
- name: Prepare matrix
- name: Prepare matrix ESP8266
id: prepare-matrix
shell: bash
run: |-
Expand All @@ -37,10 +37,22 @@ jobs:
done
environments="${environments::-2}]"
echo "matrix={environments: $environments}" >>$GITHUB_OUTPUT
- name: Prepare matrix ESP32
id: prepare-matrix-esp32
shell: bash
run: |-
env_list=$(grep '\[env:tasmota.*\]' ./platformio_tasmota_env32.ini | sed -E 's/\[env:(tasmota32.*)\]/\1/' | sed -E 's/\r//' | tr '\n' ' ')
environments='['
for environment in $env_list; do
environments="${environments}\"${environment}\", "
done
environments="${environments::-2}]"
echo "matrix={environments: $environments}" >>$GITHUB_OUTPUT
outputs:
matrix: ${{ steps.prepare-matrix.outputs.matrix }}
matrix-esp32: ${{ steps.prepare-matrix-esp32.outputs.matrix }}

tasmota_build:
tasmota_build_esp8266:
needs: tasmota_pull
runs-on: ubuntu-latest
continue-on-error: true
Expand All @@ -61,7 +73,28 @@ jobs:
with:
name: firmware
path: ./build_output


tasmota_build_esp32:
needs: tasmota_pull
runs-on: ubuntu-latest
continue-on-error: true
strategy:
matrix: ${{ fromJson(needs.tasmota_pull.outputs.matrix-esp32) }}
fail-fast: false
steps:
- uses: actions/checkout@v1
- name: Set up Python
uses: actions/setup-python@v1
- name: Install dependencies
run: |
pip install -U platformio
- name: Run PlatformIO
run: |
platformio run -e ${{ matrix.environments }}
- uses: actions/upload-artifact@v2
with:
name: firmware
path: ./build_output
# tasmota:
# needs: tasmota_pull
# runs-on: ubuntu-latest
Expand Down Expand Up @@ -1423,7 +1456,7 @@ jobs:


Upload:
needs: [tasmota_pull, tasmota_build]
needs: [tasmota_pull, tasmota_build_esp8266, tasmota_build_esp32]
runs-on: ubuntu-latest
continue-on-error: true
steps:
Expand Down

0 comments on commit 9f1c6dc

Please sign in to comment.