From f3f6cc53217ecc6bd055e482defc399a888d1b73 Mon Sep 17 00:00:00 2001 From: Zefek Date: Sat, 9 May 2026 13:37:11 +0200 Subject: [PATCH] Submoduly a sketch --- .github/workflows/build_environment.yml | 22 ++++------------------ .github/workflows/pull_request_build.yml | 17 +++-------------- .gitmodules | 8 ++++++++ MQTTESP8266 | 1 + TX07K-TXC | 1 + sketch.yaml | 13 +++++++++++++ 6 files changed, 30 insertions(+), 32 deletions(-) create mode 100644 .gitmodules create mode 160000 MQTTESP8266 create mode 160000 TX07K-TXC create mode 100644 sketch.yaml diff --git a/.github/workflows/build_environment.yml b/.github/workflows/build_environment.yml index 1da71db..d30067e 100644 --- a/.github/workflows/build_environment.yml +++ b/.github/workflows/build_environment.yml @@ -15,26 +15,12 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + submodules: true - name: Initialize Arduino CLI run: | & "$Env:RUNNER_TOOL_CACHE\arduino-cli\arduino-cli.exe" --config-file "$Env:RUNNER_TOOL_CACHE\arduino-cli\config.yaml" core update-index - & "$Env:RUNNER_TOOL_CACHE\arduino-cli\arduino-cli.exe" --config-file "$Env:RUNNER_TOOL_CACHE\arduino-cli\config.yaml" config set library.enable_unsafe_install true - - - name: Install required board core - run: | - & "$Env:RUNNER_TOOL_CACHE\arduino-cli\arduino-cli.exe" --config-file "$Env:RUNNER_TOOL_CACHE\arduino-cli\config.yaml" core install arduino:avr@1.8.7 - - - name: Install custom Arduino libraries (Windows) - shell: powershell - run: | - & "$Env:RUNNER_TOOL_CACHE\arduino-cli\arduino-cli.exe" --config-file "$Env:RUNNER_TOOL_CACHE\arduino-cli\config.yaml" lib update-index - & "$Env:RUNNER_TOOL_CACHE\arduino-cli\arduino-cli.exe" --config-file "$Env:RUNNER_TOOL_CACHE\arduino-cli\config.yaml" lib install "Ds1302@1.1.0" - & "$Env:RUNNER_TOOL_CACHE\arduino-cli\arduino-cli.exe" --config-file "$Env:RUNNER_TOOL_CACHE\arduino-cli\config.yaml" lib install "LiquidCrystal_I2C@2.0.0" - & "$Env:RUNNER_TOOL_CACHE\arduino-cli\arduino-cli.exe" --config-file "$Env:RUNNER_TOOL_CACHE\arduino-cli\config.yaml" lib install "DallasTemperature@4.0.6" - & "$Env:RUNNER_TOOL_CACHE\arduino-cli\arduino-cli.exe" --config-file "$Env:RUNNER_TOOL_CACHE\arduino-cli\config.yaml" lib install "OneWire@2.3.8" - & "$Env:RUNNER_TOOL_CACHE\arduino-cli\arduino-cli.exe" --config-file "$Env:RUNNER_TOOL_CACHE\arduino-cli\config.yaml" lib install "TX07K-TXC@1.0.4" - & "$Env:RUNNER_TOOL_CACHE\arduino-cli\arduino-cli.exe" --config-file "$Env:RUNNER_TOOL_CACHE\arduino-cli\config.yaml" lib install --git-url https://github.com/Zefek/MQTTESP8266.git#6.0 - name: Generate configs from secrets repo shell: powershell @@ -82,7 +68,7 @@ jobs: - name: Compile Arduino project run: | - & "$Env:RUNNER_TOOL_CACHE\arduino-cli\arduino-cli.exe" --config-file "$Env:RUNNER_TOOL_CACHE\arduino-cli\config.yaml" compile --fqbn arduino:avr:mega ./ --output-dir build + & "$Env:RUNNER_TOOL_CACHE\arduino-cli\arduino-cli.exe" --config-file "$Env:RUNNER_TOOL_CACHE\arduino-cli\config.yaml" compile --profile Heater_Mega ./ --output-dir build - name: Upload firmware to Arduino env: @@ -92,5 +78,5 @@ jobs: Write-Error "Invalid serial port format: $env:SERIAL_PORT" exit 1 } - & "$Env:RUNNER_TOOL_CACHE\arduino-cli\arduino-cli.exe" --config-file "$Env:RUNNER_TOOL_CACHE\arduino-cli\config.yaml" upload --fqbn arduino:avr:mega --port $env:SERIAL_PORT --input-dir build + & "$Env:RUNNER_TOOL_CACHE\arduino-cli\arduino-cli.exe" --config-file "$Env:RUNNER_TOOL_CACHE\arduino-cli\config.yaml" upload --profile Heater_Mega --port $env:SERIAL_PORT --input-dir build diff --git a/.github/workflows/pull_request_build.yml b/.github/workflows/pull_request_build.yml index 93c25af..dc6ccce 100644 --- a/.github/workflows/pull_request_build.yml +++ b/.github/workflows/pull_request_build.yml @@ -15,6 +15,8 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + submodules: true - name: Install Arduino CLI uses: arduino/setup-arduino-cli@81d310742121c928ea9c8bbd407b4217b432ae02 # v2.0.0 @@ -22,21 +24,8 @@ jobs: - name: Initialize Arduino CLI run: | arduino-cli config init - arduino-cli config set library.enable_unsafe_install true arduino-cli core update-index - - name: Install required board core - run: arduino-cli core install arduino:avr@1.8.7 # napÅ™. pro Arduino Uno - - - name: Install libraries - run: | - arduino-cli lib install "Ds1302@1.1.0" - arduino-cli lib install "LiquidCrystal_I2C@2.0.0" - arduino-cli lib install "DallasTemperature@4.0.6" - arduino-cli lib install "OneWire@2.3.8" - arduino-cli lib install --git-url https://github.com/Zefek/MQTTESP8266.git#6.0 - arduino-cli lib install "TX07K-TXC@1.0.4" - - name: Set configs run: | cp config_default.h config.h @@ -50,4 +39,4 @@ jobs: - name: Compile Arduino project run: | - arduino-cli compile --fqbn arduino:avr:mega ./ + arduino-cli compile --profile Heater_Mega ./ diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..81f3614 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,8 @@ +[submodule "MQTTESP8266"] + path = MQTTESP8266 + url = https://github.com/Zefek/MQTTESP8266.git + branch = 6.0 +[submodule "TX07K-TXC"] + path = TX07K-TXC + url = https://github.com/Zefek/TX07K-TXC.git + branch = main diff --git a/MQTTESP8266 b/MQTTESP8266 new file mode 160000 index 0000000..0fc63a7 --- /dev/null +++ b/MQTTESP8266 @@ -0,0 +1 @@ +Subproject commit 0fc63a725df0f208de012f7cbcc4f4243d4a72ad diff --git a/TX07K-TXC b/TX07K-TXC new file mode 160000 index 0000000..31d4008 --- /dev/null +++ b/TX07K-TXC @@ -0,0 +1 @@ +Subproject commit 31d4008090fb70e8170d5f65cd840d36f1b7ce13 diff --git a/sketch.yaml b/sketch.yaml new file mode 100644 index 0000000..eb0e2fe --- /dev/null +++ b/sketch.yaml @@ -0,0 +1,13 @@ +profiles: + Heater_Mega: + fqbn: arduino:avr:mega + platforms: + - platform: arduino:avr (1.8.7) + libraries: + - Ds1302 (1.1.0) + - LiquidCrystal_I2C (2.0.0) + - DallasTemperature (4.0.6) + - OneWire (2.3.8) + - dir: MQTTESP8266 + - dir: TX07K-TXC +default_profile: Heater_Mega