|
82 | 82 |
|
83 | 83 | - name: Process size (HEAD) |
84 | 84 | shell: bash |
85 | | - working-directory: head/${{ inputs.app_path }} |
86 | 85 | run: |
87 | | - python ${{ github.action_path }}/idf_size_report.py --in-file idf_size.json --out-file size.json --flash-total-override "${{ inputs.flash_total_override }}" || echo '{"flash":0,"dram":0,"iram":0,"ram":0}' > size.json |
| 86 | + python ${{ github.action_path }}/idf_size_report.py --in-file head/${{ inputs.app_path }}/idf_size.json --out-file head_size.json --flash-total-override "${{ inputs.flash_total_override }}" || echo '{"flash":0,"dram":0,"iram":0,"ram":0}' > head_size.json |
| 87 | + |
| 88 | + # delete the head directory |
| 89 | + - name: Clean up head directory |
| 90 | + shell: bash |
| 91 | + run: | |
| 92 | + rm -rf head |
88 | 93 |
|
89 | 94 | - name: Determine base ref |
90 | 95 | id: determine_base_ref |
@@ -170,26 +175,31 @@ runs: |
170 | 175 | - name: Process size (BASE) |
171 | 176 | if: ${{ steps.determine_base_ref.outputs.has_base_ref == 'true' }} |
172 | 177 | shell: bash |
173 | | - working-directory: base/${{ inputs.app_path }} |
174 | 178 | run: |
175 | | - python ${{ github.action_path }}/idf_size_report.py --in-file idf_size.json --out-file size.json --flash-total-override "${{ inputs.flash_total_override }}" || echo '{"flash":0,"dram":0,"iram":0,"ram":0}' > size.json |
| 179 | + python ${{ github.action_path }}/idf_size_report.py --in-file base/${{ inputs.app_path }}/idf_size.json --out-file base_size.json --flash-total-override "${{ inputs.flash_total_override }}" || echo '{"flash":0,"dram":0,"iram":0,"ram":0}' > base_size.json |
176 | 180 |
|
177 | 181 | - name: Create empty base size (no base ref) |
178 | 182 | if: ${{ steps.determine_base_ref.outputs.has_base_ref == 'false' }} |
179 | 183 | shell: bash |
180 | 184 | run: | |
181 | | - mkdir -p base/${{ inputs.app_path }} |
182 | | - echo '{"flash":0,"dram":0,"iram":0,"ram":0}' > base/${{ inputs.app_path }}/size.json |
| 185 | + echo '{"flash":0,"dram":0,"iram":0,"ram":0}' > base_size.json |
| 186 | +
|
| 187 | + # delete the base directory |
| 188 | + - name: Clean up base directory |
| 189 | + if: ${{ steps.determine_base_ref.outputs.has_base_ref == 'true' }} |
| 190 | + shell: bash |
| 191 | + run: | |
| 192 | + rm -rf base |
183 | 193 |
|
184 | 194 | - name: Make markdown |
185 | 195 | id: mkdown |
186 | 196 | shell: bash |
187 | 197 | run: | |
188 | 198 | # generate markdown |
189 | 199 | if [ "${{ steps.determine_base_ref.outputs.has_base_ref }}" = "true" ]; then |
190 | | - md=$(${{ steps.id_python_313.outputs.python-path }} ${{ github.action_path }}/render_markdown.py --app-name "${{ inputs.app_name }}" --base-name "${{ steps.determine_base_ref.outputs.base_name }}" --head-name "${{ steps.determine_base_ref.outputs.head_name }}" --head-json head/${{ inputs.app_path }}/size.json --base-json base/${{ inputs.app_path }}/size.json) |
| 200 | + md=$(${{ steps.id_python_313.outputs.python-path }} ${{ github.action_path }}/render_markdown.py --app-name "${{ inputs.app_name }}" --base-name "${{ steps.determine_base_ref.outputs.base_name }}" --head-name "${{ steps.determine_base_ref.outputs.head_name }}" --head-json head_size.json --base-json base_size.json) |
191 | 201 | else |
192 | | - md=$(${{ steps.id_python_313.outputs.python-path }} ${{ github.action_path }}/render_markdown.py --app-name "${{ inputs.app_name }}" --head-name "${{ steps.determine_base_ref.outputs.head_name }}" --head-json head/${{ inputs.app_path }}/size.json --no-base) |
| 202 | + md=$(${{ steps.id_python_313.outputs.python-path }} ${{ github.action_path }}/render_markdown.py --app-name "${{ inputs.app_name }}" --head-name "${{ steps.determine_base_ref.outputs.head_name }}" --head-json head_size.json --no-base) |
193 | 203 | fi |
194 | 204 | # append to summary and set output |
195 | 205 | echo "$md" >> "$GITHUB_STEP_SUMMARY" |
|
0 commit comments