GCS: clamp message interval to scheduler cap instead of rejecting #51134
Workflow file for this run
This file contains hidden or 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: test size | |
| on: | |
| push: | |
| paths-ignore: # ignore autotest stuffs | |
| - 'Tools/autotest/**' | |
| # Remove markdown files as irrelevant | |
| - '**.md' | |
| # Remove dotfile at root directory | |
| - '.dir-locals.el' | |
| - '.dockerignore' | |
| - '.editorconfig' | |
| - '.flake8' | |
| - '.gitattributes' | |
| - '.github' | |
| - '.gitignore' | |
| - '.pre-commit-config.yaml' | |
| - '.pydevproject' | |
| - '.valgrind-suppressions' | |
| - '.valgrindrc' | |
| - 'Dockerfile' | |
| - 'Vagrantfile' | |
| - 'Makefile' | |
| # Remove some directories check | |
| - '.vscode/**' | |
| - '.github/ISSUE_TEMPLATE/**' | |
| # Remove generic tools | |
| - 'Tools/cameras_gimbals/**' | |
| - 'Tools/CHDK-Scripts/**' | |
| - 'Tools/CodeStyle/**' | |
| - 'Tools/completion/**' | |
| - 'Tools/CPUInfo/**' | |
| - 'Tools/debug/**' | |
| - 'Tools/environment_install/**' | |
| - 'Tools/FilterTestTool/**' | |
| - 'Tools/geotag/**' | |
| - 'Tools/GIT_Test/**' | |
| - 'Tools/gittools/**' | |
| - 'Tools/Hello/**' | |
| - 'Tools/Linux_HAL_Essentials/**' | |
| - 'Tools/mavproxy_modules/**' | |
| - 'Tools/Pozyx/**' | |
| - 'Tools/PrintVersion.py' | |
| - 'Tools/simulink/**' | |
| - 'Tools/terrain-tools/**' | |
| - 'Tools/UDP_Proxy/**' | |
| - 'Tools/vagrant/**' | |
| - 'Tools/Vicon/**' | |
| # remove non CHIBIOS HAL | |
| - 'libraries/AP_HAL_SITL/**' | |
| - 'libraries/AP_HAL_ESP32/**' | |
| - 'libraries/AP_HAL_Linux/**' | |
| # Remove change on other workflows | |
| - '.github/**' | |
| - '!.github/workflows/test_size.yml' # except this one | |
| pull_request: | |
| paths-ignore: # ignore autotest stuffs | |
| - 'Tools/autotest/**' | |
| # Remove markdown files as irrelevant | |
| - '**.md' | |
| # Remove dotfile at root directory | |
| - '.dir-locals.el' | |
| - '.dockerignore' | |
| - '.editorconfig' | |
| - '.flake8' | |
| - '.gitattributes' | |
| - '.github' | |
| - '.gitignore' | |
| - '.pre-commit-config.yaml' | |
| - '.pydevproject' | |
| - '.valgrind-suppressions' | |
| - '.valgrindrc' | |
| - 'Dockerfile' | |
| - 'Vagrantfile' | |
| - 'Makefile' | |
| # Remove some directories check | |
| - '.vscode/**' | |
| - '.github/ISSUE_TEMPLATE/**' | |
| # Remove generic tools | |
| - 'Tools/cameras_gimbals/**' | |
| - 'Tools/CHDK-Scripts/**' | |
| - 'Tools/CodeStyle/**' | |
| - 'Tools/completion/**' | |
| - 'Tools/CPUInfo/**' | |
| - 'Tools/debug/**' | |
| - 'Tools/environment_install/**' | |
| - 'Tools/FilterTestTool/**' | |
| - 'Tools/geotag/**' | |
| - 'Tools/GIT_Test/**' | |
| - 'Tools/gittools/**' | |
| - 'Tools/Hello/**' | |
| - 'Tools/Linux_HAL_Essentials/**' | |
| - 'Tools/mavproxy_modules/**' | |
| - 'Tools/Pozyx/**' | |
| - 'Tools/PrintVersion.py' | |
| - 'Tools/simulink/**' | |
| - 'Tools/terrain-tools/**' | |
| - 'Tools/UDP_Proxy/**' | |
| - 'Tools/vagrant/**' | |
| - 'Tools/Vicon/**' | |
| # remove non CHIBIOS HAL | |
| - 'libraries/AP_HAL_SITL/**' | |
| - 'libraries/AP_HAL_ESP32/**' | |
| - 'libraries/AP_HAL_Linux/**' | |
| # Remove change on other workflows | |
| - '.github/**' | |
| - '!.github/workflows/test_size.yml' # except this one | |
| workflow_dispatch: | |
| inputs: | |
| base_ref: | |
| description: 'Base branch/ref to compare against' | |
| required: false | |
| default: 'master' | |
| base_repo: | |
| description: 'Base repo (owner/name) to compare against (defaults to this repo)' | |
| required: false | |
| default: '' | |
| concurrency: | |
| group: ci-${{github.workflow}}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| runs-on: ubuntu-22.04 | |
| container: ardupilot/ardupilot-dev-${{ matrix.toolchain }}:v0.2.0 | |
| permissions: | |
| contents: read | |
| actions: write # save-ccache deletes the previous cache entry before saving | |
| env: | |
| BASE_REF: ${{ github.event.pull_request.base.ref || inputs.base_ref || github.event.repository.default_branch }} | |
| BASE_REPO: ${{ github.event.pull_request.base.repo.full_name || inputs.base_repo || github.repository }} | |
| strategy: | |
| fail-fast: false # don't cancel if a job from the matrix fails | |
| matrix: | |
| toolchain: [ | |
| chibios, | |
| ] | |
| config: [ | |
| Durandal, | |
| MatekF405, | |
| KakuteF7, | |
| MatekH743-bdshot, | |
| MambaH743v4, # for littlefs support | |
| Pixhawk1-1M, | |
| MatekF405-CAN, # see special "build bootloader" code below | |
| DrotekP3Pro, # see special "build bootloader" code below | |
| Hitec-Airspeed, # see special code for Periph below (3 places!) | |
| f103-GPS # see special code for Periph below (3 places!) | |
| ] | |
| include: | |
| - config: disco | |
| toolchain: armhf | |
| exclude: | |
| - config: disco | |
| toolchain: chibios | |
| steps: | |
| # Sparse checkout to make .github/actions/* available without a full clone | |
| - uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 1 | |
| persist-credentials: false | |
| sparse-checkout: .github | |
| sparse-checkout-cone-mode: false | |
| - uses: actions/checkout@v7 | |
| with: | |
| ref: ${{ env.BASE_REF }} | |
| path: base_branch | |
| submodules: 'recursive' | |
| persist-credentials: false | |
| - uses: ./.github/actions/setup-ccache | |
| with: | |
| key-suffix: ${{ matrix.toolchain }}-${{ matrix.config }} | |
| - name: Build ${{ env.BASE_REF }} ${{matrix.config}} ${{ matrix.toolchain }} | |
| env: | |
| CI_BUILD_TARGET: ${{matrix.config}} | |
| GITHUB_EVENT_PULL_REQUEST_BASE_REF: ${{ env.BASE_REF }} | |
| shell: bash | |
| run: | | |
| set -ex | |
| # set up some variables based on what sort of build we're doing: | |
| BOOTLOADER=0 | |
| AP_PERIPH=0 | |
| if [ "${{matrix.config}}" = "Hitec-Airspeed" ] || | |
| [ "${{matrix.config}}" = "f103-GPS" ]; then | |
| AP_PERIPH=1 | |
| elif [ "${{matrix.config}}" = "MatekF405-CAN" ] || | |
| [ "${{matrix.config}}" = "DrotekP3Pro" ]; then | |
| BOOTLOADER=1 | |
| fi | |
| if [ $BOOTLOADER -eq 1 ]; then | |
| BIN_SRC="build/${{matrix.config}}/bootloader" | |
| else | |
| BIN_SRC="build/${{matrix.config}}/bin" | |
| fi | |
| git config --global --add safe.directory ${GITHUB_WORKSPACE} | |
| PATH="/github/home/.local/bin:$PATH" | |
| cd base_branch | |
| NO_VERSIONS_DIR="$GITHUB_WORKSPACE/base_branch_bin_no_versions" | |
| mkdir "$NO_VERSIONS_DIR" | |
| # export some environment variables designed to get | |
| # repeatable builds from the same source: | |
| export CHIBIOS_GIT_VERSION="12345678" | |
| export GIT_VERSION_EXTENDED="0123456789abcdef" | |
| export GIT_VERSION="abcdef" | |
| export GIT_VERSION_INT="15" | |
| if [ $BOOTLOADER -eq 1 ]; then | |
| ./waf configure --board ${{matrix.config}} --bootloader --consistent-builds | |
| else | |
| ./waf configure --board ${{matrix.config}} --consistent-builds | |
| fi | |
| if [ $AP_PERIPH -eq 1 ]; then | |
| ./waf AP_Periph | |
| elif [ $BOOTLOADER -eq 1 ]; then | |
| ./waf bootloader | |
| else | |
| ./waf | |
| fi | |
| cp -r $BIN_SRC/* "$NO_VERSIONS_DIR" | |
| - uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 0 | |
| path: 'pr' | |
| persist-credentials: false | |
| - name: Build PR rebased ${{matrix.config}} ${{ matrix.toolchain }} | |
| env: | |
| CI_BUILD_TARGET: ${{matrix.config}} | |
| GITHUB_EVENT_PULL_REQUEST_BASE_REPO_FULL_NAME: ${{ env.BASE_REPO }} | |
| GITHUB_EVENT_PULL_REQUEST_BASE_REF: ${{ env.BASE_REF }} | |
| shell: bash | |
| run: | | |
| set -ex | |
| # set up some variables based on what sort of build we're doing: | |
| BOOTLOADER=0 | |
| AP_PERIPH=0 | |
| if [ "${{matrix.config}}" = "Hitec-Airspeed" ] || | |
| [ "${{matrix.config}}" = "f103-GPS" ]; then | |
| AP_PERIPH=1 | |
| elif [ "${{matrix.config}}" = "MatekF405-CAN" ] || | |
| [ "${{matrix.config}}" = "DrotekP3Pro" ]; then | |
| BOOTLOADER=1 | |
| fi | |
| if [ $BOOTLOADER -eq 1 ]; then | |
| BIN_SRC="build/${{matrix.config}}/bootloader" | |
| else | |
| BIN_SRC="build/${{matrix.config}}/bin" | |
| fi | |
| git config --global --add safe.directory ${GITHUB_WORKSPACE} | |
| PATH="/github/home/.local/bin:$PATH" | |
| cd pr/ | |
| git config user.email "ardupilot-ci@ardupilot.org" | |
| git config user.name "ArduPilot CI" | |
| git remote add target_repo https://github.com/${GITHUB_EVENT_PULL_REQUEST_BASE_REPO_FULL_NAME} | |
| git fetch --no-tags --prune --progress target_repo ${GITHUB_EVENT_PULL_REQUEST_BASE_REF} | |
| git rebase target_repo/${GITHUB_EVENT_PULL_REQUEST_BASE_REF} | |
| git submodule update --init --recursive --depth=1 | |
| NO_VERSIONS_DIR="$GITHUB_WORKSPACE/pr_bin_no_versions" | |
| mkdir "$NO_VERSIONS_DIR" | |
| # export some environment variables designed to get | |
| # repeatable builds from the same source: | |
| export CHIBIOS_GIT_VERSION="12345678" | |
| export GIT_VERSION_EXTENDED="0123456789abcdef" | |
| export GIT_VERSION="abcdef" | |
| export GIT_VERSION_INT="15" | |
| if [ $BOOTLOADER -eq 1 ]; then | |
| ./waf configure --board ${{matrix.config}} --bootloader --consistent-builds | |
| else | |
| ./waf configure --board ${{matrix.config}} --consistent-builds | |
| fi | |
| if [ $AP_PERIPH -eq 1 ]; then | |
| ./waf AP_Periph | |
| elif [ $BOOTLOADER -eq 1 ]; then | |
| ./waf bootloader | |
| else | |
| ./waf | |
| fi | |
| cp -r $BIN_SRC/* "$NO_VERSIONS_DIR" | |
| # build MatekF405 Plane without quadplane | |
| if [ "${{matrix.config}}" = "MatekF405" ]; then | |
| PLANE_BINARY="build/MatekF405/bin/arduplane.bin" | |
| echo "normal size" | |
| ls -l "$PLANE_BINARY" | |
| EXTRA_HWDEF="/tmp/extra-options.def" | |
| echo "define HAL_QUADPLANE_ENABLED 0" >"$EXTRA_HWDEF" | |
| ./waf configure --board ${{matrix.config}} --extra-hwdef="$EXTRA_HWDEF" | |
| ./waf plane | |
| rm "$EXTRA_HWDEF" | |
| echo "non-quadplane size:" | |
| ls -l "$PLANE_BINARY" | |
| fi | |
| - name: Full size compare with base branch | |
| shell: bash | |
| run: | | |
| cd pr/ | |
| Tools/scripts/build_tests/pretty_diff_size.py \ | |
| -m $GITHUB_WORKSPACE/base_branch_bin_no_versions \ | |
| -s $GITHUB_WORKSPACE/pr_bin_no_versions \ | |
| --board ${{matrix.config}} \ | |
| --json-output $GITHUB_WORKSPACE/size_diff_${{matrix.config}}.json | |
| - name: Upload size diff artifact | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: size-diff-${{matrix.config}} | |
| path: ${{github.workspace}}/size_diff_${{matrix.config}}.json | |
| archive: false | |
| - name: Feature compare with ${{ env.BASE_REF }} | |
| shell: bash | |
| run: | | |
| set -ex | |
| cd pr/ | |
| BIN_PREFIX="arm-none-eabi-" | |
| if [ "${{matrix.toolchain}}" = "armhf" ]; then | |
| BIN_PREFIX="arm-linux-gnueabihf-" | |
| fi | |
| BOOTLOADER=0 | |
| AP_PERIPH=0 | |
| if [ "${{matrix.config}}" = "Hitec-Airspeed" ] || | |
| [ "${{matrix.config}}" = "f103-GPS" ]; then | |
| AP_PERIPH=1 | |
| elif [ "${{matrix.config}}" = "MatekF405-CAN" ] || | |
| [ "${{matrix.config}}" = "DrotekP3Pro" ]; then | |
| BOOTLOADER=1 | |
| fi | |
| if [ $AP_PERIPH -eq 1 ]; then | |
| EF_BINARY_NAME="AP_Periph" | |
| elif [ $BOOTLOADER -eq 1 ]; then | |
| EF_BINARY_NAME="AP_Bootloader" | |
| else | |
| EF_BINARY_NAME="arduplane" | |
| fi | |
| EF_BASE_BRANCH_BINARY="$GITHUB_WORKSPACE/base_branch_bin_no_versions/$EF_BINARY_NAME" | |
| EF_PR_BRANCH_BINARY="$GITHUB_WORKSPACE/pr_bin_no_versions/$EF_BINARY_NAME" | |
| Tools/scripts/extract_features.py "$EF_BASE_BRANCH_BINARY" --nm "${BIN_PREFIX}nm" >features-base_branch.txt | |
| Tools/scripts/extract_features.py "$EF_PR_BRANCH_BINARY" --nm "${BIN_PREFIX}nm" >features-pr.txt | |
| diff -u features-base_branch.txt features-pr.txt || true | |
| diff_output=$(diff -u features-base_branch.txt features-pr.txt || true) | |
| echo "### Features Diff Output" | |
| if [ -n "$diff_output" ]; then | |
| echo "$diff_output" | |
| else | |
| echo "No differences found." | |
| fi | |
| - name: Binary compare with ${{ env.BASE_REF }} | |
| shell: bash | |
| run: | | |
| diff -r $GITHUB_WORKSPACE/base_branch_bin_no_versions $GITHUB_WORKSPACE/pr_bin_no_versions --exclude=*.abin --exclude=*.apj || true | |
| diff_output=$(diff -r $GITHUB_WORKSPACE/base_branch_bin_no_versions $GITHUB_WORKSPACE/pr_bin_no_versions --exclude=*.abin --exclude=*.apj || true) | |
| echo "### Binary Diff Output" | |
| if [ -n "$diff_output" ]; then | |
| echo "$diff_output" | |
| else | |
| echo "No differences found." | |
| fi | |
| - uses: ./.github/actions/save-ccache | |
| with: | |
| key-suffix: ${{ matrix.toolchain }}-${{ matrix.config }} | |
| global-summary: | |
| needs: build | |
| runs-on: ubuntu-slim | |
| if: always() | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 1 | |
| persist-credentials: false | |
| - uses: actions/download-artifact@v8 | |
| with: | |
| pattern: size_diff_* | |
| merge-multiple: true | |
| path: size-diffs/ | |
| - name: Generate global size summary | |
| run: | | |
| mkdir -p size-diffs/ | |
| python3 Tools/scripts/build_tests/global_size_summary.py \ | |
| --input-dir size-diffs/ >> $GITHUB_STEP_SUMMARY |