Skip to content

Commit

Permalink
Reproduce merge_bin issue in Github Actions runner
Browse files Browse the repository at this point in the history
  • Loading branch information
CocoDico78 committed Dec 4, 2024
0 parents commit fdfc1d4
Show file tree
Hide file tree
Showing 6 changed files with 96 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/with-esptool.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: esptool as a python tool

on: push

jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-python@v5
with:
python-version: '3.12'

- run: pip install esptool

- name: Build firmware
run: python -m esptool --chip esp32 merge_bin --output output.bin 0x1000 test1.bin 0x2000 test2.bin
25 changes: 25 additions & 0 deletions .github/workflows/with-platformio.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: esptool as a pio tool

on: push

jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-python@v5
with:
python-version: '3.12'

- run: pip install --upgrade platformio

- name: Build firmware
run: pio pkg exec --package "platformio/tool-esptoolpy" -- esptool --chip esp32 merge_bin --output output.bin 0x1000 test1.bin 0x2000 test2.bin
22 changes: 22 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

The MIT License (MIT)

Copyright (c) 2024 Corentin Pane

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# PlatformIO `esptool` fail on `merge_bin` operation in Github Actions

This repo demonstrates an issue with the invocation of `merge_bin` command using `platformio/tool-esptoolpy` as a pio tool when running in Github Actions runner. A `UserSideException: [Errno 13] Permission denied: 'esptool'` is produced. The error appears on both Windows and Ubuntu.

Extract of the logs from the failed Github Actions run on Ubuntu (check the [Actions tab](/actions) for the full logs):

> `Run pio pkg exec --package "platformio/tool-esptoolpy" -- esptool --chip esp32 merge_bin --output output.bin 0x1000 test1.bin 0x2000 test2.bin`
>
> `Tool Manager: Installing platformio/tool-esptoolpy`
>
> `Downloading 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100%`
>
> `Unpacking 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100%`
>
> `Tool Manager: [email protected] has been installed!`
>
> `Using [email protected] package`
>
> `UserSideException: [Errno 13] Permission denied: 'esptool'`
>
> `Error: Process completed with exit code 1.`
Calling the same command `merge_bin` through `python -m esptool` works.
1 change: 1 addition & 0 deletions test1.bin
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
hello
1 change: 1 addition & 0 deletions test2.bin
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
world

0 comments on commit fdfc1d4

Please sign in to comment.