From 1c913f506aac68a29aa07b6555b6f4e7db63c766 Mon Sep 17 00:00:00 2001 From: Zefek <32429493+Zefek@users.noreply.github.com> Date: Sat, 6 Dec 2025 19:41:17 +0100 Subject: [PATCH 1/2] Create main.yml --- .github/workflows/main.yml | 41 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..b8569a6 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,41 @@ +name: Build Arduino + +on: + push: + branches: + - main + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Install Arduino CLI + run: | + curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | sh + sudo mv bin/arduino-cli /usr/local/bin/ + + - name: Initialize Arduino CLI + run: | + arduino-cli config init + arduino-cli core update-index + + - name: Install required board core + run: arduino-cli core install arduino:avr + + - name: Install custom library + run: | + mkdir -p ~/Arduino/libraries + git clone https://github.com/Zefek/MQTTESP8266.git ~/Arduino/libraries/MQTTESP8266 + + - name: Set configs + run: | + cp config_default.h config.h + + - name: Compile Arduino project + run: | + arduino-cli compile --fqbn arduino:avr:uno ./ From 34ca56650604dc9b0daaf64355425eb8ce6d0277 Mon Sep 17 00:00:00 2001 From: Zefek Date: Sat, 6 Dec 2025 19:44:01 +0100 Subject: [PATCH 2/2] build --- .github/workflows/{main.yml => build.yml} | 0 config_default.h | 9 +++++++++ 2 files changed, 9 insertions(+) rename .github/workflows/{main.yml => build.yml} (100%) create mode 100644 config_default.h diff --git a/.github/workflows/main.yml b/.github/workflows/build.yml similarity index 100% rename from .github/workflows/main.yml rename to .github/workflows/build.yml diff --git a/config_default.h b/config_default.h new file mode 100644 index 0000000..c9885e9 --- /dev/null +++ b/config_default.h @@ -0,0 +1,9 @@ +#define WifiSSID "WifiSSID" +#define WifiPassword "WifiPassword" +#define MQTTUsername "MQTTUsername" + +#define MQTTPassword "MQTTPassword" + +#define MQTTHost "MQTTHost" + +#define ELCONSUMPTION "ELCONSUMPTION" \ No newline at end of file