From 9969bcd1bc8686586a787a73c13f22ed765f0f23 Mon Sep 17 00:00:00 2001 From: iabdalkader Date: Thu, 25 Jul 2024 12:33:54 +0300 Subject: [PATCH] misc/github: Fix workflows. --- .github/workflows/code-size-report.yml | 4 ++-- .github/workflows/firmware.yml | 15 ++++++--------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/.github/workflows/code-size-report.yml b/.github/workflows/code-size-report.yml index d73e788ca..2270ef334 100644 --- a/.github/workflows/code-size-report.yml +++ b/.github/workflows/code-size-report.yml @@ -1,4 +1,4 @@ -name: '📝 Code Report' +name: '📝 Code Size Report' on: workflow_run: @@ -30,7 +30,7 @@ jobs: PR_NUMBER=$(basename "${CODE_SIZE_REPORT}" .md) echo "Pull Request Number: $PR_NUMBER" - # If the report file is not empty set a flag for the next step. + # Set the outputs for the following step if [ -s "${CODE_SIZE_REPORT}" ]; then echo "pr_number=${PR_NUMBER}" >> $GITHUB_OUTPUT echo "code_size_report=${CODE_SIZE_REPORT}" >> $GITHUB_OUTPUT diff --git a/.github/workflows/firmware.yml b/.github/workflows/firmware.yml index 2739d92b2..ed90cfaae 100644 --- a/.github/workflows/firmware.yml +++ b/.github/workflows/firmware.yml @@ -28,7 +28,7 @@ jobs: runs-on: ubuntu-22.04 strategy: matrix: - target: [OPENMV3] + target: [OPENMV2, OPENMV3, OPENMV4, OPENMV4P, OPENMVPT, OPENMV_RT1060, ARDUINO_PORTENTA_H7, ARDUINO_GIGA, ARDUINO_NICLA_VISION, ARDUINO_NANO_RP2040_CONNECT, ARDUINO_NANO_33_BLE_SENSE] fail-fast: false steps: - name: '⏳ Checkout repository' @@ -114,20 +114,17 @@ jobs: out-file-path: 'old_firmware' - name: '📝 Generate report' - id: generate_report - CODE_SIZE_REPORT=${{ github.event.pull_request.number }}.md - python tools/code_size.py > ${GITHUB_WORKSPACE}/${CODE_SIZE_REPORT} - if [ -s ${GITHUB_WORKSPACE}/${CODE_SIZE_REPORT} ]; then - echo "code_size_report=${CODE_SIZE_REPORT}" >> $GITHUB_OUTPUT - fi + run: | + TOOLCHAIN_PATH=${HOME}/cache/gcc + export PATH=${TOOLCHAIN_PATH}/bin:${PATH} + python tools/code_size.py > ${GITHUB_WORKSPACE}/${{ github.event.pull_request.number }}.md - name: '⬆ Upload report' - if: steps.generate_report.outputs.code_size_report != '' uses: actions/upload-artifact@v4 with: overwrite: true name: code-size-report - path: ${{ github.workspace }}/${{ steps.generate_report.outputs.code_size_report }} + path: ${{ github.event.pull_request.number }}.md if-no-files-found: error stable-release: