Skip to content

Move docs to control-components #87

Move docs to control-components

Move docs to control-components #87

Workflow file for this run

name: ESP32
on:
pull_request:
push:
branches:
- master
tags:
- '*'
jobs:
build:
runs-on: ubuntu-latest
permissions:
# `actions:write` permission is required to delete caches
#
# refs:
# - https://stackoverflow.com/questions/70435286/resource-not-accessible-by-integration-on-github-post-repos-owner-repo-ac
# - https://github.com/actions/cache/blob/6849a6489940f00c2f30c0fb92c6274307ccb58a/tips-and-workarounds.md?plain=1#L57
# - https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#permissions
actions: write
env:
SOURCE_PATH: project
IDF_PATH: esp-idf
IDF_VERSION: v5.3.1
CONFIGURATION_PATH_CCACHE: .env/ccache
CONFIGURATION_PATH_BONSAI_GROWLAB: .env/bonsai_growlab_configuration
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
path: ${{ env.SOURCE_PATH }}
submodules: recursive
- name: Setup Prerequisites
uses: ./project/control-components/.github/actions/basic_env
with:
OCS_COMPONENTS_PATH: ${{ env.SOURCE_PATH }}/control-components
CONFIGURATION_PATH_CCACHE: ${{ env.CONFIGURATION_PATH_CCACHE }}
- name: Setup ESP-IDF
uses: ./project/control-components/.github/actions/esp32_env
with:
IDF_PATH: ${{ env.IDF_PATH }}
IDF_VERSION: ${{ env.IDF_VERSION }}
- name: bonsai-growlab perform all checks
uses: ./project/control-components/.github/actions/basic_checks
with:
PROJECT_PATH: ${{ env.SOURCE_PATH }}/projects/bonsai-growlab
OCS_COMPONENTS_PATH: ${{ env.SOURCE_PATH }}/control-components
- name: Format firmware build version
id: version_formatter
uses: ./project/control-components/.github/actions/format_build_version
- name: bonsai-growlab prepare configuration
shell: bash
run: |
echo "CONFIG_BONSAI_FIRMWARE_SENSOR_BME280_ENABLE=y" >> ${{ env.CONFIGURATION_PATH_BONSAI_GROWLAB }}
echo "CONFIG_BONSAI_FIRMWARE_SENSOR_BME280_SPI_ENABLE=y" >> ${{ env.CONFIGURATION_PATH_BONSAI_GROWLAB }}
echo "CONFIG_BONSAI_FIRMWARE_SENSOR_SHT41_ENABLE=y" >> ${{ env.CONFIGURATION_PATH_BONSAI_GROWLAB }}
echo "CONFIG_BONSAI_FIRMWARE_SENSOR_SOIL_ANALOG_RELAY_ENABLE=y" >> ${{ env.CONFIGURATION_PATH_BONSAI_GROWLAB }}
echo "CONFIG_BONSAI_FIRMWARE_SENSOR_SOIL_ANALOG_ENABLE=y" >> ${{ env.CONFIGURATION_PATH_BONSAI_GROWLAB }}
echo "CONFIG_BONSAI_FIRMWARE_SENSOR_LDR_ENABLE=y" >> ${{ env.CONFIGURATION_PATH_BONSAI_GROWLAB }}
echo "CONFIG_BONSAI_FIRMWARE_SENSOR_DS18B20_SOIL_TEMPERATURE_ENABLE=y" >> ${{ env.CONFIGURATION_PATH_BONSAI_GROWLAB }}
echo "CONFIG_BONSAI_FIRMWARE_SENSOR_DS18B20_OUTSIDE_TEMPERATURE_ENABLE=y" >> ${{ env.CONFIGURATION_PATH_BONSAI_GROWLAB }}
echo "CONFIG_BONSAI_FIRMWARE_CONSOLE_ENABLE=y" >> ${{ env.CONFIGURATION_PATH_BONSAI_GROWLAB }}
echo "CONFIG_OCS_CORE_FW_VERSION=\"${{ steps.version_formatter.outputs.build_version }}\"" >> ${{ env.CONFIGURATION_PATH_BONSAI_GROWLAB }}
echo "CONFIG_OCS_CORE_FW_NAME=\"bonsai-growlab\"" >> ${{ env.CONFIGURATION_PATH_BONSAI_GROWLAB }}
- name: bonsai-growlab build
uses: ./project/control-components/.github/actions/esp32_build
with:
IDF_PATH: ${{ env.IDF_PATH }}
PROJECT_PATH: ${{ env.SOURCE_PATH }}/projects/bonsai-growlab
CONFIGURATION_PATH_CCACHE: ${{ env.CONFIGURATION_PATH_CCACHE }}
CONFIGURATION_PATH_PROJECT: ${{ env.CONFIGURATION_PATH_BONSAI_GROWLAB }}
- name: bonsai-growlab upload
uses: ./project/control-components/.github/actions/esp32_upload
with:
PROJECT_PATH: ${{ env.SOURCE_PATH }}/projects/bonsai-growlab
PROJECT_ID: bonsai-growlab