Skip to content

Commit

Permalink
dynamic core version planner
Browse files Browse the repository at this point in the history
  • Loading branch information
tobozo committed Oct 5, 2023
1 parent 066a6fb commit dd67460
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 12 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/PlatformioBuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
name: Version planner ⊹
runs-on: ubuntu-latest
env:
max-versions: 5
max-versions: 3 # maximum core versions to test, starting at latest
outputs:
matrix: ${{steps.set-matrix.outputs.matrix}}
project_dir: ${{steps.set-matrix.outputs.project_dir}}
Expand All @@ -38,8 +38,8 @@ jobs:
- name: Setup matrix
id: set-matrix
run: |
json=`curl -s "https://espressif.github.io/arduino-esp32/package_esp32_index.json"` # get esp32 packages list
core_versions_arr=(`echo $json | jq -r .packages[0].platforms[].version | awk "NR <= ${{ env.max-versions}}"`) # get platform versions
json=`curl -s "https://espressif.github.io/arduino-esp32/package_esp32_index.json"` # get a list of arduino-esp32 packages
core_versions_arr=(`echo $json | jq -r .packages[0].platforms[].version | awk "NR <= ${{ env.max-versions}}"`) # extract platform versions
core_versions_json=`printf '%s\n' "${core_versions_arr[@]}" | jq -R . | jq -s .` # convert to json
pio_envs_arr=(`cat ${{env.PROJECT_DIR}}/platformio.ini | awk 'match($0, /^\[env:([a-zA-Z0-9\-_])+/){print substr($0, RSTART+5, RLENGTH-5)}'`) # get pio [env:*] names
pio_envs_json=`printf '%s\n' "${pio_envs_arr[@]}" | jq -R . | jq -s .` # convert to json array
Expand Down Expand Up @@ -100,7 +100,6 @@ jobs:
echo "platform = https://github.com/tasmota/platform-espressif32">>platformio.ini
echo "platform_packages = framework-arduinoespressif32@https://github.com/espressif/arduino-esp32/releases/download/${pio_ver}/esp32-${pio_ver}.zip">>platformio.ini
echo "">>platformio.ini
cat platformio.ini
# keep cache and dev_lib_deps.ini unless running from the master branch
[[ "${{ needs.set_matrix.outputs.branch_name }}" == "master" ]] && rm dev_lib_deps.ini || echo "Develop!" && pio system prune -f
# install local version of the library
Expand Down
1 change: 0 additions & 1 deletion examples/Test/build_test/dev_lib_deps.ini
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ lib_deps =
M5StickC
${lib_sdupdater.lib_deps}


[lib_sdfatupdater]
lib_deps =
SdFat
Expand Down
8 changes: 1 addition & 7 deletions examples/Test/build_test/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ lib_deps =

[env:m5stack-cores3]
extends = lib_m5unified, platform_default
platform = espressif32 @ 6.2.0
# platform = espressif32 @ 6.2.0
board = esp32-s3-devkitc-1
board_upload.flash_size = 16MB
board_upload.maximum_size = 16777216
Expand All @@ -136,9 +136,3 @@ build_flags =
-DBOARD_HAS_PSRAM
-DARDUINO_UDB_MODE=1
-DTestM5CoreS3

; [env:test]
; extends = env.${target-env-name}
; platform = https://github.com/tasmota/platform-espressif32
; platform_packages = framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32/releases/download/${core-version}/esp32-${core-version}.zip

0 comments on commit dd67460

Please sign in to comment.