Add a ci check for building w/ component (#3) #22
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |