Run CI build with fixed set of boards (#3389)

* run cmake ci build on github with a fixed set of board to keep the size stable
* Size Difference Report contain major >1% and minor <1& table
This commit is contained in:
Ha Thach
2025-12-05 10:21:28 +07:00
committed by GitHub
parent e7105b1fa3
commit 93b53158f0
6 changed files with 110 additions and 74 deletions

View File

@ -57,9 +57,9 @@ jobs:
echo "hil_matrix=$HIL_MATRIX_JSON" >> $GITHUB_OUTPUT
# ------------------------------------------------------------------------------
# CMake build: only one-per-family. Full built is done by CircleCI in PR
# CMake build: only one board per family (first alphabetically). Full build is done by CircleCI in PR
# Note:
# For Make and IAR build: will be done on CircleCI only (one-per-family too)
# For Make and IAR build: will be done on CircleCI only (one random per family as well)
# ------------------------------------------------------------------------------
cmake:
needs: set-matrix
@ -78,7 +78,7 @@ jobs:
build-system: 'cmake'
toolchain: ${{ matrix.toolchain }}
build-args: ${{ toJSON(fromJSON(needs.set-matrix.outputs.json)[matrix.toolchain]) }}
one-per-family: true
build-options: '--one-first'
upload-metrics: true
code-metrics:
@ -153,7 +153,7 @@ jobs:
build-system: 'cmake-make'
toolchain: 'arm-gcc-${{ matrix.os }}'
build-args: '["stm32h7"]'
one-per-family: true
build-options: '--one-random'
# ---------------------------------------
# Zephyr
@ -196,7 +196,6 @@ jobs:
build-system: 'cmake'
toolchain: ${{ matrix.toolchain }}
build-args: ${{ toJSON(fromJSON(needs.set-matrix.outputs.hil_json)[matrix.toolchain]) }}
one-per-family: true
upload-artifacts: true
# ---------------------------------------

View File

@ -12,10 +12,10 @@ on:
build-args:
required: true
type: string
one-per-family:
build-options:
required: false
default: false
type: boolean
default: ''
type: string
upload-artifacts:
required: false
default: false
@ -51,16 +51,6 @@ jobs:
with:
arg: ${{ matrix.arg }}
- name: Set build one-per-family option
id: set-one-per-family
run: |
if [[ "${{ inputs.one-per-family }}" == "true" ]]; then
BUILD_OPTION="--one-per-family"
fi
echo "build_option=$BUILD_OPTION"
echo "build_option=$BUILD_OPTION" >> $GITHUB_OUTPUT
shell: bash
- name: Build
env:
IAR_LMS_BEARER_TOKEN: ${{ secrets.IAR_LMS_BEARER_TOKEN }}
@ -69,10 +59,10 @@ jobs:
if [ "$TOOLCHAIN" == "esp-idf" ]; then
docker run --rm -v $PWD:/project -w /project espressif/idf:tinyusb python tools/build.py ${{ matrix.arg }}
elif [ "${{ inputs.build-system }}" == "cmake-make" ] || [ "${{ inputs.build-system }}" == "make-cmake" ]; then
python tools/build.py -s make ${{ steps.setup-toolchain.outputs.build_option }} ${{ steps.set-one-per-family.outputs.build_option }} ${{ matrix.arg }}
python tools/build.py -s cmake ${{ steps.setup-toolchain.outputs.build_option }} ${{ steps.set-one-per-family.outputs.build_option }} ${{ matrix.arg }}
python tools/build.py -s make ${{ steps.setup-toolchain.outputs.build_option }} ${{ inputs.build-options }} ${{ matrix.arg }}
python tools/build.py -s cmake ${{ steps.setup-toolchain.outputs.build_option }} ${{ inputs.build-options }} ${{ matrix.arg }}
else
python tools/build.py -s ${{ inputs.build-system }} ${{ steps.setup-toolchain.outputs.build_option }} ${{ steps.set-one-per-family.outputs.build_option }} ${{ matrix.arg }}
python tools/build.py -s ${{ inputs.build-system }} ${{ steps.setup-toolchain.outputs.build_option }} ${{ inputs.build-options }} ${{ matrix.arg }}
fi
shell: bash