working on board ci
This commit is contained in:
parent
220a8f331d
commit
983bebb6ea
11
.github/workflows/build.yml
vendored
11
.github/workflows/build.yml
vendored
@ -5,7 +5,7 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
- development
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@ -23,6 +23,7 @@ jobs:
|
|||||||
- os: windows-latest
|
- os: windows-latest
|
||||||
path: ~\AppData\Local\pip\Cache
|
path: ~\AppData\Local\pip\Cache
|
||||||
platformio-path: ~\AppData\Local\platformio\Cache
|
platformio-path: ~\AppData\Local\platformio\Cache
|
||||||
|
board: [heltecv2.h,heltecv21.h,ttgov21new.h]
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
@ -53,5 +54,9 @@ jobs:
|
|||||||
cp src/loraconf_sample.h src/loraconf.h
|
cp src/loraconf_sample.h src/loraconf.h
|
||||||
cp src/ota_sample.conf src/ota.conf
|
cp src/ota_sample.conf src/ota.conf
|
||||||
cp src/paxcounter_orig.conf src/paxcounter.conf
|
cp src/paxcounter_orig.conf src/paxcounter.conf
|
||||||
- name: Run PlatformIO
|
- name: Clean
|
||||||
run: pio run
|
run: pio run -t clean -e ci
|
||||||
|
- name: Run PlatformIO Test
|
||||||
|
env:
|
||||||
|
CI_HALFILE: ${{ matrix.board }}
|
||||||
|
run: pio run -e ci
|
||||||
|
10
build.py
10
build.py
@ -27,7 +27,15 @@ haldir = os.path.join (srcdir, "hal")
|
|||||||
|
|
||||||
# check if hal file is present in source directory
|
# check if hal file is present in source directory
|
||||||
halconfig = config.get("board", "halfile")
|
halconfig = config.get("board", "halfile")
|
||||||
halconfigfile = os.path.join (haldir, halconfig)
|
|
||||||
|
# check if hal file is not set by ENV CI_HALFILE
|
||||||
|
if not os.getenv("CI_HALFILE"):
|
||||||
|
halconfigfile = os.path.join (haldir, halconfig)
|
||||||
|
else:
|
||||||
|
# if set, use ENV CI_HALFILE
|
||||||
|
print("CI_HALFILE ENV FOUND")
|
||||||
|
halconfigfile = os.path.join (haldir,os.getenv("CI_HALFILE"))
|
||||||
|
|
||||||
if os.path.isfile(halconfigfile) and os.access(halconfigfile, os.R_OK):
|
if os.path.isfile(halconfigfile) and os.access(halconfigfile, os.R_OK):
|
||||||
print("Parsing hardware configuration from " + halconfigfile)
|
print("Parsing hardware configuration from " + halconfigfile)
|
||||||
else:
|
else:
|
||||||
|
@ -82,7 +82,7 @@ lib_deps_basic =
|
|||||||
https://github.com/SukkoPera/Arduino-Rokkit-Hash.git
|
https://github.com/SukkoPera/Arduino-Rokkit-Hash.git
|
||||||
bblanchon/ArduinoJson @ ^6
|
bblanchon/ArduinoJson @ ^6
|
||||||
makuna/RTC @ ^2.3.5
|
makuna/RTC @ ^2.3.5
|
||||||
spacehuhn/SimpleButton
|
spacehuhn/SimpleButton
|
||||||
lewisxhe/XPowersLib @ ^0.1.4
|
lewisxhe/XPowersLib @ ^0.1.4
|
||||||
256dpi/MQTT @ ^2.5.0
|
256dpi/MQTT @ ^2.5.0
|
||||||
lib_deps_all =
|
lib_deps_all =
|
||||||
@ -94,7 +94,6 @@ lib_deps_all =
|
|||||||
${common.lib_deps_sensors}
|
${common.lib_deps_sensors}
|
||||||
${common.lib_deps_ledmatrix}
|
${common.lib_deps_ledmatrix}
|
||||||
build_flags_basic =
|
build_flags_basic =
|
||||||
-include "src/hal/${board.halfile}"
|
|
||||||
-include "src/paxcounter.conf"
|
-include "src/paxcounter.conf"
|
||||||
'-DCORE_DEBUG_LEVEL=${common.debug_level}'
|
'-DCORE_DEBUG_LEVEL=${common.debug_level}'
|
||||||
'-DLOG_LOCAL_LEVEL=${common.debug_level}'
|
'-DLOG_LOCAL_LEVEL=${common.debug_level}'
|
||||||
@ -115,7 +114,9 @@ upload_speed = ${common.upload_speed}
|
|||||||
;upload_port = COM12
|
;upload_port = COM12
|
||||||
platform = ${common.platform_espressif32}
|
platform = ${common.platform_espressif32}
|
||||||
lib_deps = ${common.lib_deps_all}
|
lib_deps = ${common.lib_deps_all}
|
||||||
build_flags = ${common.build_flags_all}
|
build_flags =
|
||||||
|
-include "src/hal/${board.halfile}"
|
||||||
|
${common.build_flags_all}
|
||||||
upload_protocol = ${common.upload_protocol}
|
upload_protocol = ${common.upload_protocol}
|
||||||
extra_scripts = ${common.extra_scripts}
|
extra_scripts = ${common.extra_scripts}
|
||||||
monitor_speed = ${common.monitor_speed}
|
monitor_speed = ${common.monitor_speed}
|
||||||
@ -131,3 +132,9 @@ upload_protocol = esptool
|
|||||||
upload_protocol = esptool
|
upload_protocol = esptool
|
||||||
platform = https://github.com/platformio/platform-espressif32.git#feature/arduino-upstream
|
platform = https://github.com/platformio/platform-espressif32.git#feature/arduino-upstream
|
||||||
platform_packages = framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git
|
platform_packages = framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git
|
||||||
|
|
||||||
|
[env:ci]
|
||||||
|
build_flags =
|
||||||
|
-include "src/hal/${sysenv.CI_HALFILE}" ; set by CI
|
||||||
|
${common.build_flags_all}
|
||||||
|
upload_protocol = esptool
|
@ -276,7 +276,7 @@ void setup() {
|
|||||||
libpax_default_config(&configuration);
|
libpax_default_config(&configuration);
|
||||||
|
|
||||||
// configure WIFI sniffing
|
// configure WIFI sniffing
|
||||||
strcpy(configuration.wifi_my_country, WIFI_MY_COUNTRY);
|
strcpy(configuration.wifi_my_country_str, WIFI_MY_COUNTRY);
|
||||||
configuration.wificounter = cfg.wifiscan;
|
configuration.wificounter = cfg.wifiscan;
|
||||||
configuration.wifi_channel_map = WIFI_CHANNEL_ALL;
|
configuration.wifi_channel_map = WIFI_CHANNEL_ALL;
|
||||||
configuration.wifi_channel_switch_interval = cfg.wifichancycle;
|
configuration.wifi_channel_switch_interval = cfg.wifichancycle;
|
||||||
|
Loading…
Reference in New Issue
Block a user