File tree Expand file tree Collapse file tree 2 files changed +45
-10
lines changed Expand file tree Collapse file tree 2 files changed +45
-10
lines changed Original file line number Diff line number Diff line change 1111
1212jobs :
1313  build :
14-     runs-on : ubuntu-22.04  
14+     runs-on : ubuntu-latest  
1515    container :
16-       image : espressif/idf:release-v5.0  
16+       image : espressif/idf:release-v5.3  
1717
1818    steps :
19-       - uses : actions/checkout@v3  
19+       - uses : actions/checkout@v4  
2020        with :
2121          submodules : recursive 
2222
2828          idf.py build 
2929
3030name : Archive release 
31-         uses : actions/upload-artifact@v3  
31+         uses : actions/upload-artifact@v4  
3232        with :
3333          name : elf 
3434          path : build/*.elf.memfault_log_fmt 
35+ 
36+   build-with-component :
37+     runs-on : ubuntu-latest 
38+     container :
39+       image : espressif/idf:release-v5.3 
40+ 
41+     steps :
42+       - uses : actions/checkout@v4 
43+         with :
44+           submodules : recursive 
45+ 
46+       - name : Build 
47+         run : | 
48+           # set a phony project key 
49+           echo "CONFIG_MEMFAULT_PROJECT_KEY=\"1234\"" >> sdkconfig.defaults 
50+           . ${IDF_PATH}/export.sh 
51+ 
52+           # add the Memfaut component: first get the current submodule version 
53+           SDK_VERSION=$(grep -oP 'VERSION:\s*\K[^[:space:]]+' third-party/memfault-firmware-sdk/VERSION) 
54+           # delete the submodule 
55+           rm -rf third-party/memfault-firmware-sdk 
56+           # add the dep with the same version 
57+           idf.py add-dependency "memfault/memfault-firmware-sdk^${SDK_VERSION}" 
58+ 
59+           MEMFAULT_SDK_COMPONENT=1 idf.py build 
60+ 
61+ name : Archive release 
62+         uses : actions/upload-artifact@v4 
63+         with :
64+           name : elf.component 
65+           path : build/*.elf.memfault_log_fmt 
Original file line number Diff line number Diff line change @@ -15,13 +15,17 @@ if(DEFINED IDF_VERSION_MAJOR)
1515  endif ()
1616endif ()
1717
18- # Look for the Memfault SDK in a subdirectory first, when this app is used 
19- # standalone (not from within the Memfault SDK) 
20- get_filename_component (memfault_firmware_sdk_dir third-party/memfault-firmware-sdk ABSOLUTE )
21- if (NOT  EXISTS  ${memfault_firmware_sdk_dir} )
22- get_filename_component (memfault_firmware_sdk_dir ../../../../ ABSOLUTE )
18+ # Pull in the Memfault SDK if we're not building as a component, indicated by 
19+ # the absence of the MEMFAULT_SDK_COMPONENT env var. 
20+ if (NOT  DEFINED  ENV{MEMFAULT_SDK_COMPONENT})
21+   # Look for the Memfault SDK in a subdirectory first, when this app is used 
22+   # standalone (not from within the Memfault SDK) 
23+   get_filename_component (memfault_firmware_sdk_dir third-party/memfault-firmware-sdk ABSOLUTE )
24+   if (NOT  EXISTS  ${memfault_firmware_sdk_dir} )
25+     get_filename_component (memfault_firmware_sdk_dir ../../../../ ABSOLUTE )
26+   endif ()
27+   include (${memfault_firmware_sdk_dir} /ports/esp_idf/memfault.cmake)
2328endif ()
24- include (${memfault_firmware_sdk_dir} /ports/esp_idf/memfault.cmake)
2529
2630# NOTE: This include also applies global compiler options, make sure 
2731# this happens first before defining other targets! 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments