From d353e4fa623d2d95d32f809059b972ef9aa2555e Mon Sep 17 00:00:00 2001 From: GHOSCHT <31184695+GHOSCHT@users.noreply.github.com> Date: Sun, 10 Apr 2022 18:12:58 +0200 Subject: [PATCH] Fix CI Build fail due to missing credentials --- .github/workflows/PlatformIO.yml | 4 ++-- .github/workflows/codeql-analysis.yml | 4 ++-- .../Firmware/include/Credentials/CredentialManager.h | 7 +++++++ modules/control/Firmware/platformio.ini | 11 ++++++++--- modules/control/Firmware/src/main.cpp | 2 +- 5 files changed, 20 insertions(+), 8 deletions(-) create mode 100644 modules/control/Firmware/include/Credentials/CredentialManager.h diff --git a/.github/workflows/PlatformIO.yml b/.github/workflows/PlatformIO.yml index 8bc8389..646664a 100644 --- a/.github/workflows/PlatformIO.yml +++ b/.github/workflows/PlatformIO.yml @@ -31,6 +31,6 @@ jobs: python -m pip install --upgrade pip pip install --upgrade platformio - name: Build console - run: pio run --project-dir "./modules/console/Firmware" + run: pio run -e CI_Build --project-dir "./modules/console/Firmware" - name: Build control - run: pio run --project-dir "./modules/control/Firmware" + run: pio run -e CI_Build --project-dir "./modules/control/Firmware" diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 55715e8..29caff1 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -61,8 +61,8 @@ jobs: run: | python -m pip install --upgrade pip pip install --upgrade platformio - pio run --project-dir "./modules/console/Firmware" - pio run --project-dir "./modules/control/Firmware" + pio run -e CI_Build --project-dir "./modules/console/Firmware" + pio run -e CI_Build --project-dir "./modules/control/Firmware" - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v1 diff --git a/modules/control/Firmware/include/Credentials/CredentialManager.h b/modules/control/Firmware/include/Credentials/CredentialManager.h new file mode 100644 index 0000000..3d78db0 --- /dev/null +++ b/modules/control/Firmware/include/Credentials/CredentialManager.h @@ -0,0 +1,7 @@ +#ifndef DEBUG +#include +#endif +#ifdef DEBUG +#define WIFI_SSID "ssid" +#define WIFI_PW "password" +#endif \ No newline at end of file diff --git a/modules/control/Firmware/platformio.ini b/modules/control/Firmware/platformio.ini index de1fa0e..d2dc000 100644 --- a/modules/control/Firmware/platformio.ini +++ b/modules/control/Firmware/platformio.ini @@ -11,13 +11,18 @@ [platformio] default_envs = Upload_UART -[env:Upload_UART] +[env] platform = espressif32 board = az-delivery-devkit-v4 framework = arduino -upload_port = COM8 -monitor_port = COM8 lib_deps = erropix/ESP32 AnalogWrite@^0.2 ESP Async WebServer board_build.partitions = huge_app.csv + +[env:Upload_UART] +upload_port = COM8 +monitor_port = COM8 + +[env:CI_Build] +build_flags = -D DEBUG=1 \ No newline at end of file diff --git a/modules/control/Firmware/src/main.cpp b/modules/control/Firmware/src/main.cpp index 662f3ec..4078198 100644 --- a/modules/control/Firmware/src/main.cpp +++ b/modules/control/Firmware/src/main.cpp @@ -7,7 +7,7 @@ #include #include #include -#include +#include const int STEPS = 5; const int WIFI_TIMEOUT = 20;