Skip to content

Commit

Permalink
env
Browse files Browse the repository at this point in the history
  • Loading branch information
dzurikmiroslav committed Sep 28, 2024
1 parent b21313d commit 08eb0d1
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 51 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
name: Build

# env:
# ESP_IDF_VERSION: v5.3

on:
push:
branches:
Expand Down
41 changes: 11 additions & 30 deletions .github/workflows/env.yaml
Original file line number Diff line number Diff line change
@@ -1,38 +1,19 @@
# name: Set Environment Variables

# on:
# workflow_call:
# outputs:
# esp_idf_version:
# description: "ESP-IDF version"
# value: ${{ jobs.env.outputs.esp_idf_version }}

# jobs:
# env:
# runs-on: ubuntu-latest
# outputs:
# esp_idf_version: ${{ steps.env.outputs.esp_idf_version }}
# steps:
# - name: Set environment variables
# id: env
# run: |
# echo "esp_idf_version=v5.3.1" >> $GITHUB_OUTPUT


name: Set Environment Variables

on:
workflow_call:
outputs:
esp_idf_version:
description: "ESP-IDF version"
value: ${{ steps.read_env.outputs.esp_idf_version }}
value: ${{ jobs.env.outputs.esp_idf_version }}

runs:
using: "composite"
steps:
- name: Read env file
id: read_env
shell: bash
run: |
echo "esp_idf_version=v5.3.1" >> $GITHUB_OUTPUT
jobs:
env:
runs-on: ubuntu-latest
outputs:
esp_idf_version: ${{ steps.env.outputs.esp_idf_version }}
steps:
- name: Set environment variables
id: env
run: |
echo "esp_idf_version=v5.3.1" >> $GITHUB_OUTPUT
14 changes: 7 additions & 7 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
name: Build release

env:
ESP_IDF_VERSION: v5.3

on:
release:
types: [created]

jobs:
env:
uses: .github/workflows/env.yaml

firmware:
name: Build release for all platforms
runs-on: ubuntu-latest

needs: env
strategy:
matrix:
platform: [esp32, esp32s2, esp32s3]
Expand All @@ -23,7 +23,7 @@ jobs:
- name: Build
uses: espressif/esp-idf-ci-action@v1
with:
esp_idf_version: $ESP_IDF_VERSION
esp_idf_version: ${{ needs.env.outputs.esp_idf_version }}
target: ${{ matrix.platform }}

- name: Rename file
Expand Down Expand Up @@ -63,14 +63,14 @@ jobs:
- name: Build
uses: espressif/esp-idf-ci-action@v1
with:
esp_idf_version: $ESP_IDF_VERSION
esp_idf_version: ${{ needs.env.outputs.esp_idf_version }}
target: ${{ matrix.platform }}
command: export SDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.${{ matrix.board }}"; idf.py build

- name: Merge
uses: espressif/esp-idf-ci-action@v1
with:
esp_idf_version: $ESP_IDF_VERSION
esp_idf_version: ${{ needs.env.outputs.esp_idf_version }}
target: ${{ matrix.platform }}
command: esptool.py --chip ${{ matrix.platform }} merge_bin -o build/${{ matrix.board }}.bin --flash_mode dio --flash_freq 40m --flash_size 4MB \
0x1000 build/bootloader/bootloader.bin \
Expand Down
11 changes: 0 additions & 11 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,6 @@ jobs:
name: Run Test App in simulation
runs-on: ubuntu-latest
needs: env
# strategy:
# fail-fast: false
# matrix:
# espidf_target:
# - esp32
# - esp32c3
# - esp32c6
# - esp32h2
# - esp32p4
# - esp32s2
# - esp32s3

steps:
- name: Checkout
Expand Down

0 comments on commit 08eb0d1

Please sign in to comment.