Skip to content

Add a ci check for building w/ component (#3) #22

Add a ci check for building w/ component (#3)

Add a ci check for building w/ component (#3) #22

Workflow file for this run

name: Build app
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
container:
image: espressif/idf:release-v5.3
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Build
run: |
# set a phony project key
echo "CONFIG_MEMFAULT_PROJECT_KEY=\"1234\"" >> sdkconfig.defaults
. ${IDF_PATH}/export.sh
idf.py build
- name: Archive release
uses: actions/upload-artifact@v4
with:
name: elf
path: build/*.elf.memfault_log_fmt
build-with-component:
runs-on: ubuntu-latest
container:
image: espressif/idf:release-v5.3
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Build
run: |
# set a phony project key
echo "CONFIG_MEMFAULT_PROJECT_KEY=\"1234\"" >> sdkconfig.defaults
. ${IDF_PATH}/export.sh
# add the Memfaut component: first get the current submodule version
SDK_VERSION=$(grep -oP 'VERSION:\s*\K[^[:space:]]+' third-party/memfault-firmware-sdk/VERSION)
# delete the submodule
rm -rf third-party/memfault-firmware-sdk
# add the dep with the same version
idf.py add-dependency "memfault/memfault-firmware-sdk^${SDK_VERSION}"
MEMFAULT_SDK_COMPONENT=1 idf.py build
- name: Archive release
uses: actions/upload-artifact@v4
with:
name: elf.component
path: build/*.elf.memfault_log_fmt