Github Workflow Builds not working

Hello all,

I am trying to get our builds for our esp32 project working github actions. However, the .bin file produced by the build in github does not run. (Sorry, I don’t have a core dump, but we fail to boot.) Building locally is totally fine.

Everything builds. Files get uploaded. But the builds are bad.

Locally, working, I do this.

pio run -e V5_0_prototype
cp .pio/build/V5_0_prototype/poseidon_V5_0_prototype.bin ~/Documents/v0.0.3.bin
aws s3 cp ~/Documents/v0.0.3.bin s3://XXX/V5_0_prototype/

In Github, I do this.

# in .github/setup-platformio/action.yml
name: Setup PlatoformIO
description: Installs Python and Platform IO
  using: "composite"
    - name: Cache PlatformIO dependencies
      uses: actions/cache@v3
        key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
        path: |

    - name: Set up Python
      uses: actions/setup-python@v4
        python-version: '3.10'
        cache: 'pip'  # caching pip dependencies

    - name: Install PlatformIO
      run: pip install --upgrade platformio
      shell: bash

# in .github/workflows/pull_request.yml
name: Pull Requests

      - main

    name: Upload Builds
    runs-on: ubuntu-latest
    needs: build-all
    timeout-minutes: 20
        target: [V5_0_devkit_16MB, V5_0_prototype, V5_0_staging]
      - name: Checkout Code
        uses: actions/checkout@v3

      - name: set timestamp
        id: timestamp
        run: echo "TIMESTAMP=$(git log -1 --format=%cd --date=unix)" >> $GITHUB_ENV

      - name: Setup PlatformIO
        uses: ./.github/actions/setup-platformio

      - name: PIO build primary target
        run: pio run -e ${{}}

      - name: Upload artifacts
        uses: lumo-systems/s3-upload-github-action@master
          FILE: .pio/build/${{ }}/poseidon_${{ }}.bin
          AWS_REGION: us-east-1
          AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
          S3_BUCKET: poseidon-builds
          S3_KEY: ${{ }}/${{ env.TIMESTAMP }}.bin


OSX: 12.6
PIO: Locally, I’m running 6.1.5. A coworker has verified that it also works with 6.1.6.
PIP: pip 22.3.1 from /opt/homebrew/lib/python3.10/site-packages/pip (python 3.10)

Any ideas?

How do you flash the built binary onto the target?

If I build locally, and then upload manually to S3 and run OTA, my program updates fine

I have downloaded the file produced by github workflows, copying it into place, and using

cp ~/Downloads/v0.0.4.bin ./.pio/build/V5_0_prototype/poseidon_V5_0_prototype.bin
pio run --environment V5_0_prototype --target nobuild --target upload

Seems to be rather the complex project.

Do you see in the CI build logs that it’s using the same Espressif32 platform version as you in your local build? E.g., “Espressif32 6.1.0”.

@maxgerhardt I really, really appreciate how good you are at knowing what’s going on. I regret not asking for help sooner.

Github logs are showing Platform Manager: espressif32@6.1.0 has been installed! while locally I am running 5.2. We know we have an upgrade problem, but haven’t had a chance to chase it down yet.

In our platformio.ini, we are currently specifying platform = espressif32. I will try changing this to platform = espressif32@^5.2.0. I’ll report back later today if this fixes our issues.

Thank you, Max. That worked.

For those who come after, the issue I had was that I was not pinning my platform to a specific version in my platformio.ini file. The platform had upgraded since I started my project, and I had not kept up with the new versions locally.


# platformio.ini 

platform = espressif32
monitor_speed = 115200
monitor_filters = esp32_exception_decoder



# platformio.ini

platform = espressif32@5.2.0
monitor_speed = 115200
monitor_filters = esp32_exception_decoder

1 Like