diff --git a/.github/workflows/cygwin_build.yml b/.github/workflows/cygwin_build.yml index c2e00b051c..3a7c5efddb 100644 --- a/.github/workflows/cygwin_build.yml +++ b/.github/workflows/cygwin_build.yml @@ -2,6 +2,9 @@ name: Cygwin Build on: push: + branches: + - CxPilot + - master paths-ignore: # remove other vehicles - 'AntennaTracker/**' @@ -212,7 +215,7 @@ jobs: id: check_files uses: andstor/file-existence-action@v2 with: - files: "artifacts/*" + files: "artifacts/ArduPlane.elf.exe" fail: true - name: Archive build diff --git a/.github/workflows/macos_build.yml b/.github/workflows/macos_build.yml deleted file mode 100644 index 7dba405b03..0000000000 --- a/.github/workflows/macos_build.yml +++ /dev/null @@ -1,192 +0,0 @@ -name: Macos Build - -on: - push: - paths-ignore: - # remove other env install scripts - - 'Tools/environment_install/APM_install.sh' - - 'Tools/environment_install/install-ROS-ubuntu.sh' - - 'Tools/environment_install/install-prereqs-arch.sh' - - 'Tools/environment_install/install-prereqs-ubuntu.sh' - - 'Tools/environment_install/install-prereqs-windows-andAPMSource.ps1' - - 'Tools/environment_install/install-prereqs-windows.ps1' - # remove non esp32 HAL - - 'libraries/AP_HAL_ESP32/**' - # remove non SITL non stm32 directories - - 'Tools/AP_Bootloader/**' - - 'Tools/AP_Periph/**' - - 'Tools/CHDK-Script/**' - - 'Tools/CodeStyle/**' - - 'Tools/completion/**' - - 'Tools/CPUInfo/**' - - 'Tools/debug/**' - - 'Tools/FilterTestTool/**' - - 'Tools/Frame_params/**' - - 'Tools/geotag/**' - - 'Tools/GIT_Test/**' - - 'Tools/gittools/**' - - 'Tools/Hello/**' - - 'Tools/Linux_HAL_Essentials/**' - - 'Tools/LogAnalyzer/**' - - 'Tools/mavproxy_modules/**' - - 'Tools/Pozyx/**' - - 'Tools/PrintVersion.py' - - 'Tools/Replay/**' - - 'Tools/simulink/**' - - 'Tools/UDP_Proxy/**' - - 'Tools/vagrant/**' - - 'Tools/Vicon/**' - # Discard python file from Tools/scripts as not used - - 'Tools/scripts/**.py' - - 'Tools/scripts/build_sizes/**' - - 'Tools/scripts/build_tests/**' - - 'Tools/scripts/CAN/**' - - 'Tools/scripts/signing/**' - # Remove autotests stuff - - '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 change on other workflows - - '.github/workflows/test_environment.yml' - - pull_request: - paths-ignore: - # remove other env install scripts - - 'Tools/environment_install/APM_install.sh' - - 'Tools/environment_install/install-ROS-ubuntu.sh' - - 'Tools/environment_install/install-prereqs-arch.sh' - - 'Tools/environment_install/install-prereqs-ubuntu.sh' - - 'Tools/environment_install/install-prereqs-windows-andAPMSource.ps1' - - 'Tools/environment_install/install-prereqs-windows.ps1' - # remove non esp32 HAL - - 'libraries/AP_HAL_ESP32/**' - # remove non SITL non stm32 directories - - 'Tools/AP_Bootloader/**' - - 'Tools/AP_Periph/**' - - 'Tools/CHDK-Script/**' - - 'Tools/CodeStyle/**' - - 'Tools/completion/**' - - 'Tools/CPUInfo/**' - - 'Tools/debug/**' - - 'Tools/FilterTestTool/**' - - 'Tools/Frame_params/**' - - 'Tools/geotag/**' - - 'Tools/GIT_Test/**' - - 'Tools/gittools/**' - - 'Tools/Hello/**' - - 'Tools/Linux_HAL_Essentials/**' - - 'Tools/LogAnalyzer/**' - - 'Tools/mavproxy_modules/**' - - 'Tools/Pozyx/**' - - 'Tools/PrintVersion.py' - - 'Tools/Replay/**' - - 'Tools/simulink/**' - - 'Tools/UDP_Proxy/**' - - 'Tools/vagrant/**' - - 'Tools/Vicon/**' - # Discard python file from Tools/scripts as not used - - 'Tools/scripts/**.py' - - 'Tools/scripts/build_sizes/**' - - 'Tools/scripts/build_tests/**' - - 'Tools/scripts/CAN/**' - - 'Tools/scripts/signing/**' - # Remove autotests stuff - - '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 change on other workflows - - '.github/workflows/test_environment.yml' - - workflow_dispatch: - -concurrency: - group: ci-${{github.workflow}}-${{ github.ref }} - cancel-in-progress: true - -jobs: - build: - runs-on: macos-latest - strategy: - fail-fast: false # don't cancel if a job from the matrix fails - matrix: - config: [ - sitl, - CubeOrange, - ] - - steps: - - uses: actions/checkout@v4 - with: - submodules: 'recursive' - - name: Install Prerequisites - shell: bash - run: | - if [[ ${{ matrix.config }} == "sitl" ]]; then - export DO_AP_STM_ENV=0 - fi - Tools/environment_install/install-prereqs-mac.sh -y - source ~/.bash_profile - # Put ccache into github cache for faster build - - name: Prepare ccache timestamp - id: ccache_cache_timestamp - shell: bash - run: | - NOW=$(date -u +"%F-%T") - echo "timestamp=${NOW}" >> $GITHUB_OUTPUT - - name: ccache cache files - uses: actions/cache@v3 - with: - path: ~/.ccache - key: ${{github.workflow}}-ccache-${{matrix.config}}-${{steps.ccache_cache_timestamp.outputs.timestamp}} - restore-keys: ${{github.workflow}}-ccache-${{matrix.config}} # restore ccache from either previous build on this branch or on master - - name: setup ccache - run: | - . .github/workflows/ccache.env - - name: test build ${{matrix.config}} - env: - CI_BUILD_TARGET: ${{matrix.config}} - shell: bash - run: | - source ~/.bash_profile - PATH="/github/home/.local/bin:$PATH" - echo $PATH - ./waf configure --board ${{matrix.config}} - ./waf - ccache -s - ccache -z diff --git a/.github/workflows/test_ccache.yml b/.github/workflows/test_ccache.yml index c00521bc7b..627de1e613 100644 --- a/.github/workflows/test_ccache.yml +++ b/.github/workflows/test_ccache.yml @@ -2,6 +2,9 @@ name: test ccache on: push: + branches: + - CxPilot + - master paths-ignore: # remove other vehicles - 'AntennaTracker/**' diff --git a/.github/workflows/test_chibios.yml b/.github/workflows/test_chibios.yml index 6fe345defd..b00eb9e443 100644 --- a/.github/workflows/test_chibios.yml +++ b/.github/workflows/test_chibios.yml @@ -2,6 +2,9 @@ name: test chibios on: push: + branches: + - CxPilot + - master paths-ignore: # remove non chibios HAL - 'libraries/AP_HAL_Linux/**' diff --git a/.github/workflows/test_coverage.yml b/.github/workflows/test_coverage.yml deleted file mode 100644 index c6dba24a39..0000000000 --- a/.github/workflows/test_coverage.yml +++ /dev/null @@ -1,100 +0,0 @@ -name: test coverage - -on: - workflow_dispatch: - schedule: - - cron: '0 0 * * 0' # every sunday at midnight -# paths: -# - "*" -# - "!README.md" <-- don't rebuild on doc change -concurrency: - group: ci-${{github.workflow}}-${{ github.ref }} - cancel-in-progress: true - -jobs: - build: - runs-on: ubuntu-22.04 - container: - image: ardupilot/ardupilot-dev-${{ matrix.type }}:v0.1.3 - options: --privileged - strategy: - fail-fast: false # don't cancel if a job from the matrix fails - matrix: - toolchain: [ - base, # GCC - ] - config: [ - coverage, - sitltest-can, - ] - type: [ - coverage, - ] - include: - - config: sitltest-can - type: periph - exclude: - - config: sitltest-can - type: coverage - steps: - # git checkout the PR - - uses: actions/checkout@v4 - with: - submodules: 'recursive' - # Put ccache into github cache for faster build - - name: Prepare ccache timestamp - id: ccache_cache_timestamp - run: | - NOW=$(date -u +"%F-%T") - echo "timestamp=${NOW}" >> $GITHUB_OUTPUT - - name: ccache cache files - uses: actions/cache@v3 - with: - path: ~/.ccache - key: ${{github.workflow}}-ccache-${{ matrix.toolchain }}-${{steps.ccache_cache_timestamp.outputs.timestamp}} - restore-keys: ${{github.workflow}}-ccache-${{ matrix.toolchain }}- # restore ccache from either previous build on this branch or on master - - name: setup ccache - run: | - . .github/workflows/ccache.env - - name: test ${{matrix.config}} ${{ matrix.toolchain }} - env: - CI_BUILD_TARGET: ${{matrix.config}} - TERM: xterm - shell: 'script -q -e -c "bash {0}"' - run: | - git config --global --add safe.directory ${GITHUB_WORKSPACE} - PATH="/github/home/.local/bin:$PATH" - python -m pip install --progress-bar off --user mavproxy - python -m pip uninstall -y pymavlink - git submodule update --init --recursive --depth=1 - (cd modules/mavlink/pymavlink && DISABLE_MAVNATIVE=True MDEF="$PWD/../message_definitions" python -m pip install --progress-bar off --user .) - if [[ ${{ matrix.config }} == "coverage" ]]; then - Tools/scripts/run_coverage.py -f - else - Tools/scripts/run_coverage.py -i - ./waf configure --board sitl_periph_universal --debug --coverage - ./waf build --target bin/AP_Periph - Tools/scripts/run_coverage.py -i - Tools/autotest/autotest.py test.CAN --debug --coverage - Tools/scripts/run_coverage.py -u - fi - - - name: Coveralls - uses: coverallsapp/github-action@master - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - path-to-lcov: ./reports/lcov-report/lcov.info - flag-name: run-${{matrix.config}} - parallel: true - - - finish: - if: always() - needs: build - runs-on: ubuntu-22.04 - steps: - - name: Coveralls Finished - uses: coverallsapp/github-action@master - with: - github-token: ${{ secrets.github_token }} - parallel-finished: true diff --git a/.github/workflows/test_environment.yml b/.github/workflows/test_environment.yml deleted file mode 100644 index c19f39210e..0000000000 --- a/.github/workflows/test_environment.yml +++ /dev/null @@ -1,139 +0,0 @@ -name: test environment setup -on: - schedule: - - cron: '0 0 * * 6' # every saturday at midnight - workflow_dispatch: - push: - paths: - - '.github/workflows/test_environment.yml' - - 'Tools/environment_install/**' - - pull_request: - paths: - - '.github/workflows/test_environment.yml' - - 'Tools/environment_install/**' - - -concurrency: - group: ci-${{github.workflow}}-${{ github.ref }} - cancel-in-progress: true - -jobs: - build: - runs-on: ubuntu-22.04 - container: - image: ${{matrix.os}}:${{matrix.name}} - options: --privileged - strategy: - fail-fast: false # don't cancel if a job from the matrix fails - matrix: - include: - - os: ubuntu - name: focal - - os: ubuntu - name: jammy - - os: ubuntu - name: lunar - - os: ubuntu - name: mantic - - os: debian - name: bullseye - - os: debian - name: buster - steps: - - name: Install Git - timeout-minutes: 30 - env: - DEBIAN_FRONTEND: noninteractive - TZ: Europe/Paris - shell: 'script -q -e -c "bash {0}"' - run: | - case ${{matrix.os}} in - *"ubuntu"*) - apt-get update && apt-get install --no-install-recommends -qy \ - lsb-release \ - sudo \ - git \ - software-properties-common - add-apt-repository ppa:git-core/ppa -y - apt-get update && apt-get install --no-install-recommends -qy git - ;; - *"debian"*) - apt-get update && apt-get install --no-install-recommends -qy \ - lsb-release \ - sudo \ - git \ - software-properties-common - ;; - *"archlinux"*) - pacman -Syu --noconfirm --needed git sudo - ;; - esac - - # git checkout the PR - - uses: actions/checkout@v4 - with: - submodules: 'recursive' - - name: test install environment ${{matrix.os}}.${{matrix.name}} - timeout-minutes: 60 - env: - DISABLE_MAVNATIVE: True - DEBIAN_FRONTEND: noninteractive - TZ: Europe/Paris - SKIP_AP_GIT_CHECK: 1 - shell: 'script -q -e -c "bash {0}"' - run: | - PATH="/github/home/.local/bin:$PATH" - ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone - sed -i 's/\$EUID/\$ID/' Tools/environment_install/install-prereqs-ubuntu.sh - sed -i 's/sudo usermod/\#sudo usermod/' Tools/environment_install/install-prereqs-ubuntu.sh - sed -i 's/sudo usermod/\#sudo usermod/' Tools/environment_install/install-prereqs-arch.sh - case ${{matrix.os}} in - *"ubuntu"*) - echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections - Tools/environment_install/install-prereqs-ubuntu.sh -qy - ;; - *"debian"*) - Tools/environment_install/install-prereqs-ubuntu.sh -qy - ;; - *"archlinux"*) - cp /etc/skel/.bashrc /root - cp /etc/skel/.bashrc /github/home - git config --global --add safe.directory ${GITHUB_WORKSPACE} - Tools/environment_install/install-prereqs-arch.sh -qy - ;; - esac - - - name: test build STIL ${{matrix.os}}.${{matrix.name}} - env: - DISABLE_MAVNATIVE: True - DEBIAN_FRONTEND: noninteractive - TZ: Europe/Paris - shell: 'script -q -e -c "bash {0}"' - run: | - git config --global --add safe.directory ${GITHUB_WORKSPACE} - source ~/.bashrc - source $HOME/venv-ardupilot/bin/activate || true - git config --global --add safe.directory /__w/ardupilot/ardupilot - ./waf configure - ./waf rover - - - name: test build Chibios ${{matrix.os}}.${{matrix.name}} - env: - DISABLE_MAVNATIVE: True - DEBIAN_FRONTEND: noninteractive - TZ: Europe/Paris - shell: 'script -q -e -c "bash {0}"' - run: | - git config --global --add safe.directory ${GITHUB_WORKSPACE} - source ~/.bashrc - source $HOME/venv-ardupilot/bin/activate || true - case ${{matrix.os}} in - *"archlinux"*) - export PATH=/opt/gcc-arm-none-eabi-10-2020-q4-major/bin:$PATH - export PATH=/__w/ardupilot/ardupilot/ardupilot/Tools/autotest:$PATH - ;; - esac - git config --global --add safe.directory /__w/ardupilot/ardupilot - ./waf configure --board CubeOrange - ./waf plane diff --git a/.github/workflows/test_linux_sbc.yml b/.github/workflows/test_linux_sbc.yml index a66bc24de3..47d6e0e694 100644 --- a/.github/workflows/test_linux_sbc.yml +++ b/.github/workflows/test_linux_sbc.yml @@ -2,6 +2,9 @@ name: test Linux SBC on: push: + branches: + - CxPilot + - master paths-ignore: # remove non LINUX HAL - 'libraries/AP_HAL_ChibiOS/**' diff --git a/.github/workflows/test_replay.yml b/.github/workflows/test_replay.yml index 86cd8ba3b3..c2edad8dd9 100644 --- a/.github/workflows/test_replay.yml +++ b/.github/workflows/test_replay.yml @@ -2,6 +2,9 @@ name: test replay on: push: + branches: + - CxPilot + - master paths-ignore: # remove other vehicles - 'AntennaTracker/**' diff --git a/.github/workflows/test_scripting.yml b/.github/workflows/test_scripting.yml index fab7a226de..0a48117050 100644 --- a/.github/workflows/test_scripting.yml +++ b/.github/workflows/test_scripting.yml @@ -2,6 +2,9 @@ name: test scripting on: push: + branches: + - CxPilot + - master paths: # only run for scripting changes - 'libraries/AP_Scripting/tests/docs_check.py' - 'libraries/AP_Scripting/generator/**' diff --git a/.github/workflows/test_sitl_copter.yml b/.github/workflows/test_sitl_copter.yml index 0a37998097..57e2d05e41 100644 --- a/.github/workflows/test_sitl_copter.yml +++ b/.github/workflows/test_sitl_copter.yml @@ -2,6 +2,9 @@ name: test copter on: push: + branches: + - CxPilot + - master paths-ignore: # remove other vehicles - 'AntennaTracker/**' diff --git a/.github/workflows/test_sitl_periph.yml b/.github/workflows/test_sitl_periph.yml index df6588792c..88c4b40702 100644 --- a/.github/workflows/test_sitl_periph.yml +++ b/.github/workflows/test_sitl_periph.yml @@ -2,6 +2,9 @@ name: test ap_periph on: push: + branches: + - CxPilot + - master paths-ignore: # remove other vehicles than copter - 'AntennaTracker/**' diff --git a/.github/workflows/test_sitl_plane.yml b/.github/workflows/test_sitl_plane.yml index 18b1f0a801..d0d4f65652 100644 --- a/.github/workflows/test_sitl_plane.yml +++ b/.github/workflows/test_sitl_plane.yml @@ -2,6 +2,9 @@ name: test plane on: push: + branches: + - CxPilot + - master paths-ignore: # remove other vehicles - 'AntennaTracker/**' diff --git a/.github/workflows/test_sitl_rover.yml b/.github/workflows/test_sitl_rover.yml index 444ad7f211..cbfe777ee7 100644 --- a/.github/workflows/test_sitl_rover.yml +++ b/.github/workflows/test_sitl_rover.yml @@ -2,6 +2,9 @@ name: test rover on: push: + branches: + - CxPilot + - master paths-ignore: # remove other vehicles - 'AntennaTracker/**' diff --git a/.github/workflows/test_sitl_sub.yml b/.github/workflows/test_sitl_sub.yml index 65812b31b7..ceea4cca06 100644 --- a/.github/workflows/test_sitl_sub.yml +++ b/.github/workflows/test_sitl_sub.yml @@ -2,6 +2,9 @@ name: test sub on: push: + branches: + - CxPilot + - master paths-ignore: # remove other vehicles - 'AntennaTracker/**' diff --git a/.github/workflows/test_sitl_tracker.yml b/.github/workflows/test_sitl_tracker.yml index e9e20eccfd..75d631aecc 100644 --- a/.github/workflows/test_sitl_tracker.yml +++ b/.github/workflows/test_sitl_tracker.yml @@ -2,6 +2,9 @@ name: test tracker on: push: + branches: + - CxPilot + - master paths-ignore: # remove other vehicles - 'ArduCopter/**' diff --git a/.github/workflows/test_size.yml b/.github/workflows/test_size.yml deleted file mode 100644 index f8015bc88a..0000000000 --- a/.github/workflows/test_size.yml +++ /dev/null @@ -1,309 +0,0 @@ -name: test size - -on: - 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/CHDK-Script/**' - - '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/LogAnalyzer/**' - - 'Tools/mavproxy_modules/**' - - 'Tools/Pozyx/**' - - 'Tools/PrintVersion.py' - - 'Tools/simulink/**' - - '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/workflows/test_environment.yml' - workflow_dispatch: - - -concurrency: - group: ci-${{github.workflow}}-${{ github.ref }} - cancel-in-progress: true - -jobs: - build: - runs-on: ubuntu-22.04 - container: ardupilot/ardupilot-dev-${{ matrix.toolchain }}:v0.1.3 - strategy: - fail-fast: false # don't cancel if a job from the matrix fails - matrix: - toolchain: [ - chibios, - ] - config: [ - Durandal, - MatekF405, - KakuteF7, - MatekH743-bdshot, - 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: - - uses: actions/checkout@v4 - with: - ref: ${{ github.event.pull_request.base.ref }} - path: base_branch - submodules: 'recursive' - # Put ccache into github cache for faster build - - name: Prepare ccache timestamp - id: ccache_cache_timestamp - run: | - NOW=$(date -u +"%F-%T") - echo "timestamp=${NOW}" >> $GITHUB_OUTPUT - - name: ccache cache files - uses: actions/cache@v3 - with: - path: ~/.ccache - key: ${{github.workflow}}-ccache-${{ matrix.toolchain }}-${{steps.ccache_cache_timestamp.outputs.timestamp}} - restore-keys: ${{github.workflow}}-ccache-${{ matrix.toolchain }}- # restore ccache from either previous build on this branch or on base branch - - name: setup ccache - run: | - . base_branch/.github/workflows/ccache.env - - name: Build ${{ github.event.pull_request.base.ref }} ${{matrix.config}} ${{ matrix.toolchain }} - env: - CI_BUILD_TARGET: ${{matrix.config}} - 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" - - # build the base branch - cd base_branch - # configure: - if [ $BOOTLOADER -eq 1 ]; then - ./waf configure --board ${{matrix.config}} --bootloader - else - ./waf configure --board ${{matrix.config}} - fi - # build: - if [ $AP_PERIPH -eq 1 ]; then - ./waf AP_Periph - elif [ $BOOTLOADER -eq 1 ]; then - ./waf bootloader - else - ./waf - fi - mkdir -p $GITHUB_WORKSPACE/base_branch_bin - - cp -r $BIN_SRC/* $GITHUB_WORKSPACE/base_branch_bin/ - - # build a set of binaries without symbols so we can check if - # the binaries have changed. - echo [`date`] Building ${{ github.event.pull_request.base.ref }} with no versions - - 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="abcdef" - export GIT_VERSION_INT="15" - - 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" - - echo [`date`] Built ${{ github.event.pull_request.base.ref }} with no versions - - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - path: 'pr' - - - name: Build PR rebased ${{matrix.config}} ${{ matrix.toolchain }} - env: - CI_BUILD_TARGET: ${{matrix.config}} - 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 - # configure - if [ $BOOTLOADER -eq 1 ]; then - ./waf configure --board ${{matrix.config}} --bootloader - else - ./waf configure --board ${{matrix.config}} - fi - # build - if [ $AP_PERIPH -eq 1 ]; then - ./waf AP_Periph - elif [ $BOOTLOADER -eq 1 ]; then - ./waf bootloader - else - ./waf - fi - mkdir $GITHUB_WORKSPACE/pr_bin - cp -r $BIN_SRC/* $GITHUB_WORKSPACE/pr_bin/ - - # build a set of binaries without symbols so we can check if - # the binaries have changed. - echo [`date`] Building PR with no versions - - 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="abcdef" - export GIT_VERSION_INT="15" - - 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" - - echo [`date`] Built PR with no versions - - # 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/pretty_diff_size.py -m $GITHUB_WORKSPACE/base_branch_bin -s $GITHUB_WORKSPACE/pr_bin - - - name: Feature compare with ${{ github.event.pull_request.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/$EF_BINARY_NAME" - EF_PR_BRANCH_BINARY="$GITHUB_WORKSPACE/pr_bin/$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 - - - name: Checksum compare with ${{ github.event.pull_request.base.ref }} - shell: bash - run: | - diff -r $GITHUB_WORKSPACE/base_branch_bin_no_versions $GITHUB_WORKSPACE/pr_bin_no_versions --exclude=*.elf --exclude=*.apj || true diff --git a/.github/workflows/test_unit_tests.yml b/.github/workflows/test_unit_tests.yml index 609e30386c..833c979bc5 100644 --- a/.github/workflows/test_unit_tests.yml +++ b/.github/workflows/test_unit_tests.yml @@ -2,6 +2,9 @@ name: test unit tests and sitl building on: push: + branches: + - CxPilot + - master paths-ignore: # Remove markdown files as irrelevant - '**.md' diff --git a/Tools/scripts/cygwin_build.sh b/Tools/scripts/cygwin_build.sh index 37bbcb7e7c..4a4b6bf129 100755 --- a/Tools/scripts/cygwin_build.sh +++ b/Tools/scripts/cygwin_build.sh @@ -23,25 +23,25 @@ mkdir artifacts ( python ./waf --color yes --toolchain $TOOLCHAIN --board sitl configure 2>&1 python ./waf plane 2>&1 - python ./waf copter 2>&1 - python ./waf heli 2>&1 - python ./waf rover 2>&1 - python ./waf sub 2>&1 ) | tee artifacts/build.txt + # python ./waf copter 2>&1 + # python ./waf heli 2>&1 + # python ./waf rover 2>&1 + # python ./waf sub 2>&1 # copy both with exe and without to cope with differences # between windows versions in CI cp -v build/sitl/bin/arduplane artifacts/ArduPlane.elf.exe -cp -v build/sitl/bin/arducopter artifacts/ArduCopter.elf.exe -cp -v build/sitl/bin/arducopter-heli artifacts/ArduHeli.elf.exe -cp -v build/sitl/bin/ardurover artifacts/ArduRover.elf.exe -cp -v build/sitl/bin/ardusub artifacts/ArduSub.elf.exe +# cp -v build/sitl/bin/arducopter artifacts/ArduCopter.elf.exe +# cp -v build/sitl/bin/arducopter-heli artifacts/ArduHeli.elf.exe +# cp -v build/sitl/bin/ardurover artifacts/ArduRover.elf.exe +# cp -v build/sitl/bin/ardusub artifacts/ArduSub.elf.exe cp -v build/sitl/bin/arduplane artifacts/ArduPlane.elf -cp -v build/sitl/bin/arducopter artifacts/ArduCopter.elf -cp -v build/sitl/bin/arducopter-heli artifacts/ArduHeli.elf -cp -v build/sitl/bin/ardurover artifacts/ArduRover.elf -cp -v build/sitl/bin/ardusub artifacts/ArduSub.elf +# cp -v build/sitl/bin/arducopter artifacts/ArduCopter.elf +# cp -v build/sitl/bin/arducopter-heli artifacts/ArduHeli.elf +# cp -v build/sitl/bin/ardurover artifacts/ArduRover.elf +# cp -v build/sitl/bin/ardusub artifacts/ArduSub.elf # Find all cyg*.dll files returned by cygcheck for each exe in artifacts # and copy them over