Skip to content

Commit

Permalink
CI: add patch to platformio
Browse files Browse the repository at this point in the history
an ugly bug with LDF needs to be patched
  • Loading branch information
vortigont committed Oct 29, 2024
1 parent f1b445a commit 85ceb06
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 12 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/pio_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,6 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: PIP Cache
id: cache-pip
uses: actions/cache@v4
env:
cache-name: cache-pip-pkgs
with:
path: |
~/.cache/pip
key: ${{ runner.os }}-pip-${{env.cache-name}}
restore-keys: |
${{ runner.os }}-pio-
${{ runner.os }}-
- name: Set up Python
uses: actions/setup-python@v5
with:
Expand All @@ -57,7 +45,19 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install --upgrade platformio
#platformio run -t buildfs
#platformio pkg update
- name: Patch Platformio
run: |
pwd
echo "REPO_NAME=$(basename ${{ github.repository }})" >> $GITHUB_ENV
cd $(dirname $(which pio) )
cd ../
echo $(find -type d -name site-packages)
cd $(find -type d -name site-packages)
pwd
git apply --verbose $GITHUB_WORKSPACE/extra/0001-LDF-refresh-lib-dependency-after-recursive-search.patch
cd $GITHUB_WORKSPACE
- name: Run PlatformIO
run: |
pio run -e espem -e espem_debug
Expand Down
29 changes: 29 additions & 0 deletions extra/0001-LDF-refresh-lib-dependency-after-recursive-search.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
From 7d12a010a2a71428e6945c8c9c2d05073df379a2 Mon Sep 17 00:00:00 2001
From: Emil Muratov <gpm@hotplug.ru>
Date: Fri, 21 Jun 2024 17:01:38 +0900
Subject: [PATCH] LDF: refresh lib dependency after recursive search

LDF might mistakenly remove recursive dependency libs from a graph
usually platform bundled ones

Closes #4940
---
platformio/builder/tools/piolib.py | 2 ++
1 file changed, 2 insertions(+)

diff --git a/platformio/builder/tools/piolib.py b/platformio/builder/tools/piolib.py
index ca9c9f1..36b72d2 100644
--- a/platformio/builder/tools/piolib.py
+++ b/platformio/builder/tools/piolib.py
@@ -1159,6 +1159,8 @@ def ConfigureProjectLibBuilder(env):
for lb in lib_builders:
if lb in found_lbs:
lb.search_deps_recursive(lb.get_search_files())
+ # refill found libs after recursive search
+ found_lbs = [lb for lb in lib_builders if lb.is_dependent]
for lb in lib_builders:
for deplb in lb.depbuilders[:]:
if deplb not in found_lbs:
--
2.34.1

0 comments on commit 85ceb06

Please sign in to comment.