Generate the build matrix from the variant files (#3870)

This commit is contained in:
Thomas Göttgens 2024-05-12 22:43:47 +02:00 committed by GitHub
parent 5de0c71a3e
commit 859fd7c251
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
32 changed files with 71 additions and 104 deletions

View File

@ -8,7 +8,7 @@ on:
branches: [master, develop]
paths-ignore:
- "**.md"
- "version.properties"
- version.properties
# Note: This is different from "pull_request". Need to specify ref when doing checkouts.
pull_request_target:
@ -20,25 +20,34 @@ on:
workflow_dispatch:
jobs:
check:
setup:
strategy:
fail-fast: false
matrix:
include:
- board: rak11200
- board: tlora-v2-1-1_6
- board: tbeam
- board: heltec-v2_1
- board: meshtastic-diy-v1
- board: rak4631
- board: t-echo
- board: station-g2
- board: m5stack-coreink
- board: tbeam-s3-core
- board: tlora-t3s3-v1
- board: t-watch-s3
- board: t-deck
#- board: rak11310
arch: [esp32, esp32s3, esp32c3, nrf52840, rp2040, check]
runs-on: ubuntu-latest
steps:
- id: checkout
uses: actions/checkout@v3
name: Checkout base
- id: jsonStep
run: |
TARGETS=$(./bin/generate_ci_matrix.py ${{matrix.arch}})
echo "$TARGETS"
echo "${{matrix.arch}}=$(jq -cn --argjson environments "$TARGETS" '{board: $environments}')" >> $GITHUB_OUTPUT
outputs:
esp32: ${{ steps.jsonStep.outputs.esp32 }}
esp32s3: ${{ steps.jsonStep.outputs.esp32s3 }}
esp32c3: ${{ steps.jsonStep.outputs.esp32c3 }}
nrf52840: ${{ steps.jsonStep.outputs.nrf52840 }}
rp2040: ${{ steps.jsonStep.outputs.rp2040 }}
check: ${{ steps.jsonStep.outputs.check }}
check:
needs: setup
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.setup.outputs.check) }}
runs-on: ubuntu-latest
steps:
@ -55,93 +64,46 @@ jobs:
run: bin/check-all.sh ${{ matrix.board }}
build-esp32:
needs: setup
strategy:
fail-fast: false
matrix:
include:
- board: rak11200
- board: tlora-v2
- board: tlora-v1
- board: tlora_v1_3
- board: tlora-v2-1-1_6
- board: tlora-v2-1-1_6-tcxo
- board: tlora-v2-1-1_8
- board: tbeam
- board: heltec-v2_0
- board: heltec-v2_1
- board: tbeam0_7
- board: meshtastic-diy-v1
- board: hydra
- board: meshtastic-dr-dev
- board: nano-g1
- board: station-g1
- board: m5stack-core
- board: m5stack-coreink
- board: nano-g1-explorer
- board: chatter2
matrix: ${{ fromJson(needs.setup.outputs.esp32) }}
uses: ./.github/workflows/build_esp32.yml
with:
board: ${{ matrix.board }}
build-esp32-s3:
needs: setup
strategy:
fail-fast: false
matrix:
include:
- board: heltec-v3
- board: heltec-wsl-v3
- board: heltec-wireless-tracker
- board: heltec-wireless-tracker-V1-0
- board: heltec-wireless-paper-v1_0
- board: heltec-wireless-paper #v1.1
- board: tbeam-s3-core
- board: tlora-t3s3-v1
- board: t-watch-s3
- board: t-deck
- board: picomputer-s3
- board: station-g2
- board: unphone
matrix: ${{ fromJson(needs.setup.outputs.esp32s3) }}
uses: ./.github/workflows/build_esp32_s3.yml
with:
board: ${{ matrix.board }}
build-esp32-c3:
needs: setup
strategy:
fail-fast: false
matrix:
include:
- board: heltec-ht62-esp32c3-sx1262
matrix: ${{ fromJson(needs.setup.outputs.esp32c3) }}
uses: ./.github/workflows/build_esp32_c3.yml
with:
board: ${{ matrix.board }}
build-nrf52:
needs: setup
strategy:
fail-fast: false
matrix:
include:
- board: rak4631
- board: rak4631_eink
- board: monteops_hw1
- board: t-echo
- board: canaryone
- board: pca10059_diy_eink
- board: feather_diy
- board: nano-g2-ultra
matrix: ${{ fromJson(needs.setup.outputs.nrf52840) }}
uses: ./.github/workflows/build_nrf52.yml
with:
board: ${{ matrix.board }}
build-rpi2040:
needs: setup
strategy:
fail-fast: false
matrix:
include:
- board: pico
- board: picow
- board: rak11310
- board: senselora_rp2040
- board: rp2040-lora
matrix: ${{ fromJson(needs.setup.outputs.rp2040) }}
uses: ./.github/workflows/build_rpi2040.yml
with:
board: ${{ matrix.board }}

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python
"""Generate the CI matrix"""
"""Generate the CI matrix."""
import configparser
import json
@ -34,5 +34,10 @@ for subdir, dirs, files in os.walk(rootdir):
outlist.append(section)
else:
outlist.append(section)
if "board_check" in config[config[c].name]:
if (config[config[c].name]["board_check"] == "true") & (
"check" in options
):
outlist.append(section)
print(json.dumps(outlist))

View File

@ -1,8 +1,9 @@
[env:CDEBYTE_EoRa-S3]
extends = esp32s3_base
board = CDEBYTE_EoRa-S3
board_level = extra
build_flags =
${esp32s3_base.build_flags}
-D CDEBYTE_EORA_S3
-I variants/CDEBYTE_EoRa-S3
-D GPS_POWER_TOGGLE
-D GPS_POWER_TOGGLE

View File

@ -1,7 +1,6 @@
[env:pca10059_diy_eink]
extends = nrf52840_base
board = nordic_pca10059
board_level = extra
build_flags = ${nrf52840_base.build_flags} -Ivariants/Dongle_nRF52840-pca10059-v1 -D NORDIC_PCA10059
-L "${platformio.libdeps_dir}/${this.__env__}/BSEC2 Software Library/src/cortex-m4/fpv4-sp-d16-hard"
-DEINK_DISPLAY_MODEL=GxEPD2_420_M01
@ -11,4 +10,4 @@ build_src_filter = ${nrf52_base.build_src_filter} +<../variants/Dongle_nRF52840-
lib_deps =
${nrf52840_base.lib_deps}
zinggjm/GxEPD2@^1.4.9
debug_tool = jlink
debug_tool = jlink

View File

@ -1,6 +1,7 @@
[env:betafpv_900_tx_nano]
extends = esp32_base
board = esp32doit-devkit-v1
board_level = extra
build_flags =
${esp32_base.build_flags}
-D BETAFPV_900_TX_NANO
@ -13,4 +14,4 @@ upload_protocol = esptool
;upload_port = /dev/ttyUSB0
upload_speed = 460800
lib_deps =
${esp32_base.lib_deps}
${esp32_base.lib_deps}

View File

@ -2,7 +2,6 @@
[env:chatter2]
extends = esp32_base
board = esp32doit-devkit-v1
board_level = extra
build_flags =
${esp32_base.build_flags}
-D CHATTER_2

View File

@ -2,7 +2,7 @@
[env:meshtastic-diy-v1]
extends = esp32_base
board = esp32doit-devkit-v1
board_level = extra
board_check = true
build_flags =
${esp32_base.build_flags}
-D DIY_V1
@ -26,7 +26,6 @@ build_flags =
[env:meshtastic-dr-dev]
extends = esp32_base
board = esp32doit-devkit-v1
board_level = extra
board_upload.maximum_size = 4194304
board_upload.maximum_ram_size = 532480
build_flags =
@ -39,7 +38,6 @@ build_flags =
[env:hydra]
extends = esp32_base
board = esp32doit-devkit-v1
board_level = extra
build_flags =
${esp32_base.build_flags}
-D DIY_V1

View File

@ -2,7 +2,6 @@
[env:feather_diy]
extends = nrf52840_base
board = adafruit_feather_nrf52840
board_level = extra
build_flags = ${nrf52840_base.build_flags} -Ivariants/feather_diy -Dfeather_diy
-L "${platformio.libdeps_dir}/${this.__env__}/BSEC2 Software Library/src/cortex-m4/fpv4-sp-d16-hard"
build_src_filter = ${nrf52_base.build_src_filter} +<../variants/feather_diy>

View File

@ -1,7 +1,6 @@
[env:heltec-ht62-esp32c3-sx1262]
extends = esp32c3_base
board = esp32-c3-devkitm-1
board_level = extra
build_flags =
${esp32_base.build_flags}
-D HELTEC_HT62

View File

@ -2,7 +2,6 @@
;build_type = debug ; to make it possible to step through our jtag debugger
extends = esp32_base
board = heltec_wifi_lora_32_V2
board_level = extra
build_flags =
${esp32_base.build_flags} -D HELTEC_V2_1 -I variants/heltec_v2.1
-DGPS_POWER_TOGGLE ; comment this line to disable triple press function on the user button to turn off gps entirely.

View File

@ -2,6 +2,5 @@
;build_type = debug ; to make it possible to step through our jtag debugger
extends = esp32_base
board = heltec_wifi_lora_32_V2
board_level = extra
build_flags =
${esp32_base.build_flags} -D HELTEC_V2_0 -I variants/heltec_v2

View File

@ -1,6 +1,7 @@
[env:heltec-v3]
extends = esp32s3_base
board = heltec_wifi_lora_32_V3
board_check = true
# Temporary until espressif creates a release with this new target
build_flags =
${esp32s3_base.build_flags} -D HELTEC_V3 -I variants/heltec_v3

View File

@ -1,7 +1,6 @@
[env:m5stack-core]
extends = esp32_base
board = m5stack-core-esp32
board_level = extra
monitor_filters = esp32_exception_decoder
build_src_filter =
${esp32_base.build_src_filter}
@ -26,4 +25,4 @@ lib_ignore =
m5stack-core
lib_deps =
${esp32_base.lib_deps}
lovyan03/LovyanGFX@^1.1.8
lovyan03/LovyanGFX@^1.1.8

View File

@ -1,7 +1,7 @@
[env:m5stack-coreink]
extends = esp32_base
board = m5stack-coreink
board_level = extra
board_check = true
build_src_filter =
${esp32_base.build_src_filter}
build_flags =
@ -24,4 +24,4 @@ lib_ignore =
monitor_filters = esp32_exception_decoder
board_build.f_cpu = 240000000L
upload_protocol = esptool
upload_port = /dev/ttyACM0
upload_port = /dev/ttyACM0

View File

@ -1,6 +1,7 @@
; The very slick RAK wireless RAK10701 Field Tester device. Note you will have to flash to Arduino bootloader to use this firmware. Be aware touch is not currently working.
[env:rak10701]
extends = nrf52840_base
board_level = extra
board = wiscore_rak4631
build_flags = ${nrf52840_base.build_flags} -Ivariants/rak10701 -D RAK_4631
-L "${platformio.libdeps_dir}/${this.__env__}/BSEC2 Software Library/src/cortex-m4/fpv4-sp-d16-hard"

View File

@ -1,7 +1,7 @@
[env:rak11200]
extends = esp32_base
board_level = extra
board = wiscore_rak11200
board_check = true
build_flags =
${esp32_base.build_flags} -D RAK_11200 -I variants/rak11200
upload_speed = 115200
upload_speed = 115200

View File

@ -2,6 +2,7 @@
[env:rak4631]
extends = nrf52840_base
board = wiscore_rak4631
board_check = true
build_flags = ${nrf52840_base.build_flags} -Ivariants/rak4631 -D RAK_4631
-L "${platformio.libdeps_dir}/${this.__env__}/BSEC2 Software Library/src/cortex-m4/fpv4-sp-d16-hard"
-DGPS_POWER_TOGGLE ; comment this line to disable triple press function on the user button to turn off gps entirely.
@ -17,4 +18,4 @@ lib_deps =
rakwireless/RAKwireless NCP5623 RGB LED library@^1.0.2
debug_tool = jlink
; If not set we will default to uploading over serial (first it forces bootloader entry by talking 1200bps to cdcacm)
;upload_protocol = jlink
;upload_protocol = jlink

View File

@ -1,6 +1,7 @@
[env:pico_slowclock]
extends = rp2040_base
board = rpipico
board_level = extra
upload_protocol = jlink
# debug settings for external openocd with RP2040 support (custom build)
debug_tool = custom
@ -25,4 +26,4 @@ lib_deps =
${rp2040_base.lib_deps}
debug_build_flags = ${rp2040_base.build_flags}
-g
-DNO_USB
-DNO_USB

View File

@ -1,7 +1,6 @@
[env:picow]
extends = rp2040_base
board = rpipicow
board_level = extra
upload_protocol = picotool
# add our variants files to the include and src paths

View File

@ -1,6 +1,7 @@
[env:station-g2]
extends = esp32s3_base
board = station-g2
board_check = true
board_build.mcu = esp32s3
upload_protocol = esptool
;upload_port = /dev/ttyACM0

View File

@ -2,6 +2,7 @@
[env:t-deck]
extends = esp32s3_base
board = t-deck
board_check = true
upload_protocol = esptool
#upload_port = COM29

View File

@ -2,6 +2,7 @@
[env:t-echo]
extends = nrf52840_base
board = t-echo
board_check = true
debug_tool = jlink
# add -DCFG_SYSVIEW if you want to use the Segger systemview tool for OS profiling.
@ -23,4 +24,4 @@ lib_deps =
${nrf52840_base.lib_deps}
https://github.com/meshtastic/GxEPD2#55f618961db45a23eff0233546430f1e5a80f63a
lewisxhe/PCF8563_Library@^1.0.1
;upload_protocol = fs
;upload_protocol = fs

View File

@ -2,6 +2,7 @@
[env:t-watch-s3]
extends = esp32s3_base
board = t-watch-s3
board_check = true
upload_protocol = esptool
build_flags = ${esp32_base.build_flags}

View File

@ -2,6 +2,7 @@
[env:tbeam-s3-core]
extends = esp32s3_base
board = tbeam-s3-core
board_check = true
lib_deps =
${esp32s3_base.lib_deps}

View File

@ -2,9 +2,10 @@
[env:tbeam]
extends = esp32_base
board = ttgo-t-beam
board_check = true
lib_deps =
${esp32_base.lib_deps}
build_flags =
${esp32_base.build_flags} -D TBEAM_V10 -I variants/tbeam
-DGPS_POWER_TOGGLE ; comment this line to disable double press function on the user button to turn off gps entirely.
upload_speed = 921600
upload_speed = 921600

View File

@ -2,6 +2,5 @@
[env:tbeam0_7]
extends = esp32_base
board = ttgo-t-beam
board_level = extra
build_flags =
${esp32_base.build_flags} -D TBEAM_V07 -I variants/tbeam_v07

View File

@ -1,6 +1,7 @@
[env:tlora-t3s3-v1]
extends = esp32s3_base
board = tlora-t3s3-v1
board_check = true
upload_protocol = esp-builtin
build_flags =

View File

@ -1,6 +1,5 @@
[env:tlora_v1_3]
extends = esp32_base
board_level = extra
board = ttgo-lora32-v1
build_flags =
${esp32_base.build_flags} -D TLORA_V1_3 -I variants/tlora_v1_3

View File

@ -1,6 +1,5 @@
[env:tlora-v2]
extends = esp32_base
board = ttgo-lora32-v1
board_level = extra
build_flags =
${esp32_base.build_flags} -D TLORA_V2 -I variants/tlora_v2

View File

@ -1,6 +1,7 @@
[env:tlora-v2-1-1_6]
extends = esp32_base
board = ttgo-lora32-v21
board_check = true
build_flags =
${esp32_base.build_flags} -D TLORA_V2_1_16 -I variants/tlora_v2_1_16
-DGPS_POWER_TOGGLE ; comment this line to disable triple press function on the user button to turn off gps entirely.

View File

@ -3,7 +3,6 @@
[env:unphone]
extends = esp32s3_base
board_level = extra
board = unphone9
upload_speed = 921600
monitor_speed = 115200

View File

@ -1,6 +1,7 @@
[env:wiphone]
extends = esp32_base
board = wiphone
board_level = extra
monitor_filters = esp32_exception_decoder
board_build.partitions = default_16MB.csv
build_flags =
@ -9,5 +10,4 @@ lib_deps =
${esp32_base.lib_deps}
lovyan03/LovyanGFX@^1.1.8
sparkfun/SX1509 IO Expander@^3.0.5
pololu/APA102@^3.0.0
pololu/APA102@^3.0.0