Skip to content

Commit f246774

Browse files
committed
hopefully fixes esp32 build
1 parent f5a7e2f commit f246774

File tree

5 files changed

+17
-33
lines changed

5 files changed

+17
-33
lines changed

.github/actions/esp-idf-action/action.yml

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -37,26 +37,13 @@ runs:
3737
fetch-depth: ${{ inputs.fetch-depth }}
3838
token: ${{ inputs.token }}
3939
submodules: ${{ inputs.submodules }}
40-
41-
- name: Cache esp-idf and its tools
42-
id: esp-idf-cache
43-
uses: actions/cache@v3
44-
with:
45-
path: |
46-
~/esp/esp-idf
47-
~/.espressif
48-
key: ${{ runner.os }}-esp-${{ inputs.esp_idf_version }}
49-
50-
- run: |
51-
if echo ${{ steps.esp-idf-cache.outputs.cache-hit }} | grep -c "true"
52-
then
53-
echo "Cache hit - skipping dependency installation"
54-
else
55-
sh ${{ github.action_path }}/install.sh ${{ inputs.esp_idf_version }}
56-
fi
57-
shell: bash
5840

5941
- run: |
42+
cd
43+
44+
git clone --recursive https://github.com/espressif/esp-idf.git
45+
46+
sh ${{ github.action_path }}/install.sh ${{ inputs.esp_idf_version }}
6047
source ~/esp/esp-idf/export.sh
6148
idf.py set-target ${{ inputs.esp_idf_target }}
6249
shell: bash

.github/workflows/macOS.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,6 @@ jobs:
1919
with:
2020
python-version: '3.10'
2121

22-
- uses: ./.github/actions/esp-idf-action
23-
with:
24-
esp_idf_version: v5.0.4
25-
esp_idf_target: esp32s3
26-
2722
- name: Install Dependencies
2823
run: brew install --force gcc libffi cmake ninja make
2924

.github/workflows/unix.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,6 @@ jobs:
2020
with:
2121
python-version: '3.10'
2222

23-
- uses: ./.github/actions/esp-idf-action
24-
with:
25-
esp_idf_version: v5.0.4
26-
esp_idf_target: esp32s3
27-
2823
- name: Install Deps
2924
run: sudo apt-get install --force-yes -y build-essential pkg-config cmake ninja-build libffi-dev gnome-desktop-testing libasound2-dev libpulse-dev libaudio-dev libjack-dev libsndio-dev libx11-dev libxext-dev libxrandr-dev libxcursor-dev libxfixes-dev libxi-dev libxss-dev libxkbcommon-dev libdrm-dev libgbm-dev libgl1-mesa-dev libgles2-mesa-dev libegl1-mesa-dev libdbus-1-dev libibus-1.0-dev libudev-dev fcitx-libs-dev libpipewire-0.3-dev libwayland-dev libdecor-0-dev
3025

.github/workflows/windows.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,6 @@ jobs:
2020
with:
2121
python-version: '3.10'
2222

23-
- uses: ./.github/actions/esp-idf-action
24-
with:
25-
esp_idf_version: v5.0.4
26-
esp_idf_target: esp32s3
27-
2823
- name: Install Dependencies
2924
run: |
3025
winget install --accept-source-agreements --accept-package-agreements ezwinports.make

builder/esp32.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,15 @@ def setup_idf_environ():
298298
env = {k: v for k, v in os.environ.items() if not k.startswith('IDF')}
299299
env['IDF_PATH'] = os.path.abspath(idf_path)
300300

301+
py_path = os.path.split(sys.executable)[0]
302+
303+
if 'PATH' in os.environ:
304+
os.environ['PATH'] = py_path + os.pathsep + os.environ['PATH']
305+
elif 'path' in os.environ:
306+
os.environ['path'] = py_path + os.pathsep + os.environ['path']
307+
else:
308+
os.environ['PATH'] = py_path + os.pathsep
309+
301310
result, output = spawn(cmds, env=env, out_to_screen=False)
302311

303312
if result != 0:
@@ -310,6 +319,9 @@ def setup_idf_environ():
310319
line.split('=', 1)[0]: line.split('=', 1)[1]
311320
for line in output
312321
}
322+
323+
print(temp_env)
324+
313325
if 'PATH' in temp_env:
314326
env['PATH'] = temp_env['PATH']
315327
elif 'path' in temp_env:

0 commit comments

Comments
 (0)