Closed NightSkySK closed 1 year ago
It took me few hours, but I finally found what was wrong with my github action yaml script, error was result of merging few different files which I wanted combine to match my needs, once I didn't fully understand how it works.
So the problem was at line container: espressif/idf:${{ matrix.idf_ver }}
which shouldn't be there as it caused that following steps was executed in idf container already.
For long time I couldn't understand why there is docker
command to be executed by espressif/esp-idf-ci-action@v1
. It was intuitive for me that checkout should be executed in idf environment. Once I finally understood that checkout is going to be passed to espressif/esp-idf-ci-action@v1
and only than docker image need to be run than fixing the yaml code become easy task. I will leave my experience here, may be someone will face same issue as me.
Here is the yaml code for github action which is finally working for me:
# This is a basic workflow that is manually triggered
name: Build and Publish Application
# Controls when the action will run. Workflow runs when manually triggered using the UI
# or API.
on:
push:
pull_request:
branches: [main]
workflow_dispatch:
# Inputs the workflow accepts.
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build:
strategy:
fail-fast: false
matrix:
# The version names here correspond to the versions of espressif/idf Docker image.
# See https://hub.docker.com/r/espressif/idf/tags and
# https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/tools/idf-docker-image.html
# for details.
idf_ver: ["release-v4.3", "release-v4.4"]
idf_target: ["esp32"]
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: Build Application
uses: espressif/esp-idf-ci-action@v1
with:
esp_idf_version: ${{ matrix.idf_ver }}
target: ${{ matrix.idf_target }}
- name: Rename artifact
run: |
ls -lah
cp build/bootloader/bootloader.bin bootloader-${{ matrix.idf_ver }}.bin
cp build/partition_table/partition-table.bin partition-table-${{ matrix.idf_ver }}.bin
cp build/mspacelock.bin mspacelock-${{ matrix.idf_ver }}.bin
cp build/ota_data_initial.bin ota_data_initial-${{ matrix.idf_ver }}.bin
- name: Upload
uses: actions/upload-artifact@v3
with:
name: mSpaceLock_${{ matrix.idf_target }}_${{ matrix.idf_ver }}
path: "*-${{ matrix.idf_ver }}.bin"
release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download Firmware Files
uses: actions/download-artifact@v3
with:
path: build
I'm building my first CI for GitHub Action and I have problem with building the code.
as an output from logs I receive:
What I did wrong? The same output I got on `release-v4.4'