From f796f9eae9be7a3e40768a3fc5d37a3a72fbb276 Mon Sep 17 00:00:00 2001 From: Farhang Date: Thu, 8 Jun 2023 20:00:17 +0300 Subject: [PATCH 1/3] Temp sensor stuff --- .../AP_TemperatureSensor.cpp | 52 +++++++++++-------- .../AP_TemperatureSensor.h | 2 + .../AP_TemperatureSensor_HASAN.cpp | 35 +++++++++++++ .../AP_TemperatureSensor_HASAN.h | 29 +++++++++++ .../AP_TemperatureSensor_Params.cpp | 2 +- .../AP_TemperatureSensor_Params.h | 1 + .../AP_TemperatureSensor_config.h | 2 +- modules/uavcan | 1 + 8 files changed, 100 insertions(+), 24 deletions(-) create mode 100644 libraries/AP_TemperatureSensor/AP_TemperatureSensor_HASAN.cpp create mode 100644 libraries/AP_TemperatureSensor/AP_TemperatureSensor_HASAN.h create mode 160000 modules/uavcan diff --git a/libraries/AP_TemperatureSensor/AP_TemperatureSensor.cpp b/libraries/AP_TemperatureSensor/AP_TemperatureSensor.cpp index fce79c1a3b138..fa6c4e8eb8a30 100644 --- a/libraries/AP_TemperatureSensor/AP_TemperatureSensor.cpp +++ b/libraries/AP_TemperatureSensor/AP_TemperatureSensor.cpp @@ -27,6 +27,7 @@ #include "AP_TemperatureSensor_TSYS01.h" #include "AP_TemperatureSensor_MCP9600.h" #include "AP_TemperatureSensor_MAX31865.h" +#include "AP_TemperatureSensor_HASAN.h" #include #include @@ -116,47 +117,54 @@ void AP_TemperatureSensor::init() return; } - // For Sub set the Default: Type to TSYS01 and I2C_ADDR of 0x77 -#if APM_BUILD_TYPE(APM_BUILD_ArduSub) && AP_TEMPERATURE_SENSOR_TSYS01_ENABLED - AP_Param::set_default_by_name("TEMP1_TYPE", (float)AP_TemperatureSensor_Params::Type::TSYS01); - AP_Param::set_default_by_name("TEMP1_ADDR", TSYS01_ADDR_CSB0); -#endif + // For Sub set the Default: Type to TSYS01 and I2C_ADDR of 0x77 + #if APM_BUILD_TYPE(APM_BUILD_ArduSub) //&& AP_TEMPERATURE_SENSOR_TSYS01_ENABLED + AP_Param::set_default_by_name("TEMP1_TYPE", (float)AP_TemperatureSensor_Params::Type::HASAN); + AP_Param::set_default_by_name("TEMP1_ADDR", HASAN_ADDR); + #endif // create each instance for (uint8_t instance = 0; instance < AP_TEMPERATURE_SENSOR_MAX_INSTANCES; instance++) { _state[instance].instance = instance; switch (get_type(instance)) { -#if AP_TEMPERATURE_SENSOR_TSYS01_ENABLED + #if AP_TEMPERATURE_SENSOR_TSYS01_ENABLED case AP_TemperatureSensor_Params::Type::TSYS01: drivers[instance] = new AP_TemperatureSensor_TSYS01(*this, _state[instance], _params[instance]); break; -#endif -#if AP_TEMPERATURE_SENSOR_MCP9600_ENABLED + #endif + #if AP_TEMPERATURE_SENSOR_MCP9600_ENABLED case AP_TemperatureSensor_Params::Type::MCP9600: drivers[instance] = new AP_TemperatureSensor_MCP9600(*this, _state[instance], _params[instance]); break; -#endif -#if AP_TEMPERATURE_SENSOR_MAX31865_ENABLED - case AP_TemperatureSensor_Params::Type::MAX31865: - drivers[instance] = new AP_TemperatureSensor_MAX31865(*this, _state[instance], _params[instance]); + #endif + // #if AP_TEMPERATURE_SENSOR_MAX31865_ENABLED + // case AP_TemperatureSensor_Params::Type::MAX31865: + // drivers[instance] = new AP_TemperatureSensor_MAX31865(*this, _state[instance], _params[instance]); + // break; + // #endif + #if AP_TEMPERATURE_SENSOR_HASAN_ENABLED + case AP_TemperatureSensor_Params::Type::HASAN: + drivers[instance] = new AP_TemperatureSensor_HASAN(*this, _state[instance], _params[instance]); break; -#endif + #endif case AP_TemperatureSensor_Params::Type::NONE: default: break; } - // call init function for each backend - if (drivers[instance] != nullptr) { - drivers[instance]->init(); - // _num_instances is actually the index for looping over instances - // the user may have TEMP_TYPE=0 and TEMP2_TYPE=7, in which case - // there will be a gap, but as we always check for drivers[instances] being nullptr - // this is safe - _num_instances = instance + 1; - } + + + // call init function for each backend + if (drivers[instance] != nullptr) { + drivers[instance]->init(); + // _num_instances is actually the index for looping over instances + // the user may have TEMP_TYPE=0 and TEMP2_TYPE=7, in which case + // there will be a gap, but as we always check for drivers[instances] being nullptr + // this is safe + _num_instances = instance + 1; } +} if (_num_instances > 0) { // param count could have changed diff --git a/libraries/AP_TemperatureSensor/AP_TemperatureSensor.h b/libraries/AP_TemperatureSensor/AP_TemperatureSensor.h index cf5cdc84c17a1..ea17a4a142d67 100644 --- a/libraries/AP_TemperatureSensor/AP_TemperatureSensor.h +++ b/libraries/AP_TemperatureSensor/AP_TemperatureSensor.h @@ -25,6 +25,7 @@ class AP_TemperatureSensor_Backend; class AP_TemperatureSensor_TSYS01; class AP_TemperatureSensor_MCP9600; class AP_TemperatureSensor_MAX31865; +class AP_TemperatureSensor_HASAN; class AP_TemperatureSensor { @@ -32,6 +33,7 @@ class AP_TemperatureSensor friend class AP_TemperatureSensor_TSYS01; friend class AP_TemperatureSensor_MCP9600; friend class AP_TemperatureSensor_MAX31865; + friend class AP_TemperatureSensor_HASAN; public: diff --git a/libraries/AP_TemperatureSensor/AP_TemperatureSensor_HASAN.cpp b/libraries/AP_TemperatureSensor/AP_TemperatureSensor_HASAN.cpp new file mode 100644 index 0000000000000..c2988debd78ca --- /dev/null +++ b/libraries/AP_TemperatureSensor/AP_TemperatureSensor_HASAN.cpp @@ -0,0 +1,35 @@ +#include +#include +#include "AP_TemperatureSensor_HASAN.h" + +extern const AP_HAL::HAL &hal; + +void AP_TemperatureSensor_HASAN::init() { + _dev = std::move(hal.i2c_mgr->get_device(1 /* bus */, HASAN_ADDR)); + + if (!_dev) { + hal.console->printf("Device is null!\n"); + return; + } + + _dev->set_retries(10); +} + +// void AP_TemperatureSensor_HASAN::update() { +// // This could be where you read temperature and update state +// float temperature = read_temperature(); +// // update state here with temperature +// } + +float AP_TemperatureSensor_HASAN::read_temperature() { + if (!_dev->transfer(nullptr, 0, _buffer, sizeof(_buffer))) { + hal.console->printf("Reading temperature failed"); + return 0.0f; + } + + // Convert 4 bytes in _buffer to temperature + // Here, I am assuming the data is in floating point format + float temp = 0; + memcpy(&temp, &_buffer, sizeof(temp)); + return temp; +} diff --git a/libraries/AP_TemperatureSensor/AP_TemperatureSensor_HASAN.h b/libraries/AP_TemperatureSensor/AP_TemperatureSensor_HASAN.h new file mode 100644 index 0000000000000..a18513bc19830 --- /dev/null +++ b/libraries/AP_TemperatureSensor/AP_TemperatureSensor_HASAN.h @@ -0,0 +1,29 @@ +#pragma once +#include "AP_TemperatureSensor_Backend.h" + +#ifndef AP_TEMPERATURE_SENSOR_HASAN_ENABLED +#define AP_TEMPERATURE_SENSOR_HASAN_ENABLED AP_TEMPERATURE_SENSOR_ENABLED +#endif + +#if AP_TEMPERATURE_SENSOR_HASAN_ENABLED + +#define HASAN_ADDR 0x49 // hASAN's address + +class AP_TemperatureSensor_HASAN : public AP_TemperatureSensor_Backend { +public: + using AP_TemperatureSensor_Backend::AP_TemperatureSensor_Backend; + + void init(void) override; + void update() override {}; +private: + uint8_t _buffer[4]; // Buffer for incoming data + //AP_HAL::OwnPtr _dev; + + void start_next_sample(); + uint32_t read_adc(void) const; + void _timer(void); + float calculate(const uint32_t adc) const; + float read_temperature(); +}; + +#endif // AP_TEMPERATURE_SENSOR_HASAN_ENABLED diff --git a/libraries/AP_TemperatureSensor/AP_TemperatureSensor_Params.cpp b/libraries/AP_TemperatureSensor/AP_TemperatureSensor_Params.cpp index 763e4564d76c4..d3a41fc1ecbfc 100644 --- a/libraries/AP_TemperatureSensor/AP_TemperatureSensor_Params.cpp +++ b/libraries/AP_TemperatureSensor/AP_TemperatureSensor_Params.cpp @@ -34,7 +34,7 @@ const AP_Param::GroupInfo AP_TemperatureSensor_Params::var_info[] = { // @Param: TYPE // @DisplayName: Temperature Sensor Type // @Description: Enables temperature sensors - // @Values: 0:Disabled, 1:TSYS01, 2:MCP9600, 3:MAX31865 + // @Values: 0:Disabled, 1:TSYS01, 2:MCP9600, 3:MAX31865, 4:HASAN // @User: Standard // @RebootRequired: True AP_GROUPINFO_FLAGS("TYPE", 1, AP_TemperatureSensor_Params, type, (float)Type::NONE, AP_PARAM_FLAG_ENABLE), diff --git a/libraries/AP_TemperatureSensor/AP_TemperatureSensor_Params.h b/libraries/AP_TemperatureSensor/AP_TemperatureSensor_Params.h index 1e4bfbf22ee9e..c3a6ce391d7c8 100644 --- a/libraries/AP_TemperatureSensor/AP_TemperatureSensor_Params.h +++ b/libraries/AP_TemperatureSensor/AP_TemperatureSensor_Params.h @@ -31,6 +31,7 @@ class AP_TemperatureSensor_Params { TSYS01 = 1, MCP9600 = 2, MAX31865 = 3, + HASAN = 4, }; // option to map to another system component diff --git a/libraries/AP_TemperatureSensor/AP_TemperatureSensor_config.h b/libraries/AP_TemperatureSensor/AP_TemperatureSensor_config.h index 8e5bd97b1776a..7f441278f9575 100644 --- a/libraries/AP_TemperatureSensor/AP_TemperatureSensor_config.h +++ b/libraries/AP_TemperatureSensor/AP_TemperatureSensor_config.h @@ -24,7 +24,7 @@ // maximum number of Temperature Sensors #ifndef AP_TEMPERATURE_SENSOR_MAX_INSTANCES -#define AP_TEMPERATURE_SENSOR_MAX_INSTANCES 3 +#define AP_TEMPERATURE_SENSOR_MAX_INSTANCES 4 #endif // first sensor is always the primary sensor diff --git a/modules/uavcan b/modules/uavcan new file mode 160000 index 0000000000000..f845e02dcd2e9 --- /dev/null +++ b/modules/uavcan @@ -0,0 +1 @@ +Subproject commit f845e02dcd2e97f6c4743c96f3b2380c4b03ab5f From 33bf0f544362a456908161ea9787226f6956f17d Mon Sep 17 00:00:00 2001 From: FARHANG <46557204+farhangnaderi@users.noreply.github.com> Date: Fri, 9 Jun 2023 00:42:52 +0300 Subject: [PATCH 2/3] Delete .github/workflows directory --- .github/workflows/cache_cleanup.yml | 39 --- .github/workflows/ccache.env | 10 - .github/workflows/cygwin_build.yml | 218 -------------- .github/workflows/esp32_build.yml | 223 --------------- .github/workflows/macos_build.yml | 188 ------------ .github/workflows/test_ccache.yml | 144 ---------- .github/workflows/test_chibios.yml | 199 ------------- .github/workflows/test_coverage.yml | 108 ------- .github/workflows/test_dds.yml | 184 ------------ .github/workflows/test_environment.yml | 139 --------- .github/workflows/test_linux_sbc.yml | 197 ------------- .github/workflows/test_replay.yml | 197 ------------- .github/workflows/test_scripting.yml | 55 ---- .github/workflows/test_scripts.yml | 35 --- .github/workflows/test_sitl_copter.yml | 365 ------------------------ .github/workflows/test_sitl_periph.yml | 247 ---------------- .github/workflows/test_sitl_plane.yml | 266 ----------------- .github/workflows/test_sitl_rover.yml | 266 ----------------- .github/workflows/test_sitl_sub.yml | 267 ----------------- .github/workflows/test_sitl_tracker.yml | 267 ----------------- .github/workflows/test_size.yml | 305 -------------------- .github/workflows/test_unit_tests.yml | 153 ---------- 22 files changed, 4072 deletions(-) delete mode 100644 .github/workflows/cache_cleanup.yml delete mode 100644 .github/workflows/ccache.env delete mode 100644 .github/workflows/cygwin_build.yml delete mode 100644 .github/workflows/esp32_build.yml delete mode 100644 .github/workflows/macos_build.yml delete mode 100644 .github/workflows/test_ccache.yml delete mode 100644 .github/workflows/test_chibios.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_dds.yml delete mode 100644 .github/workflows/test_environment.yml delete mode 100644 .github/workflows/test_linux_sbc.yml delete mode 100644 .github/workflows/test_replay.yml delete mode 100644 .github/workflows/test_scripting.yml delete mode 100644 .github/workflows/test_scripts.yml delete mode 100644 .github/workflows/test_sitl_copter.yml delete mode 100644 .github/workflows/test_sitl_periph.yml delete mode 100644 .github/workflows/test_sitl_plane.yml delete mode 100644 .github/workflows/test_sitl_rover.yml delete mode 100644 .github/workflows/test_sitl_sub.yml delete mode 100644 .github/workflows/test_sitl_tracker.yml delete mode 100644 .github/workflows/test_size.yml delete mode 100644 .github/workflows/test_unit_tests.yml diff --git a/.github/workflows/cache_cleanup.yml b/.github/workflows/cache_cleanup.yml deleted file mode 100644 index cb3ffb5495c6a..0000000000000 --- a/.github/workflows/cache_cleanup.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: cleanup caches by a branch -on: - pull_request: - types: - - closed - workflow_dispatch: - -jobs: - cleanup: - runs-on: ubuntu-latest - permissions: - # `actions:write` permission is required to delete caches - # See also: https://docs.github.com/en/rest/actions/cache?apiVersion=2022-11-28#delete-a-github-actions-cache-for-a-repository-using-a-cache-id - actions: write - contents: read - steps: - - name: Check out code - uses: actions/checkout@v3 - - - name: Cleanup - run: | - gh extension install actions/gh-actions-cache - - REPO=${{ github.repository }} - BRANCH=refs/pull/${{ github.event.pull_request.number }}/merge - - echo "Fetching list of cache key" - cacheKeysForPR=$(gh actions-cache list -R $REPO -B $BRANCH | cut -f 1 ) - - ## Setting this to not fail the workflow while deleting cache keys. - set +e - echo "Deleting caches..." - for cacheKey in $cacheKeysForPR - do - gh actions-cache delete $cacheKey -R $REPO -B $BRANCH --confirm - done - echo "Done" - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/ccache.env b/.github/workflows/ccache.env deleted file mode 100644 index 2cae97776a704..0000000000000 --- a/.github/workflows/ccache.env +++ /dev/null @@ -1,10 +0,0 @@ -# common ccache env vars for CI -export CCACHE_SLOPPINESS=file_stat_matches - -mkdir -p ~/.ccache -echo "base_dir = ${GITHUB_WORKSPACE}" > ~/.ccache/ccache.conf -echo "compression = true" >> ~/.ccache/ccache.conf -echo "compression_level = 6" >> ~/.ccache/ccache.conf -echo "max_size = 400M" >> ~/.ccache/ccache.conf -ccache -s -ccache -z diff --git a/.github/workflows/cygwin_build.yml b/.github/workflows/cygwin_build.yml deleted file mode 100644 index cef7c8e9a979e..0000000000000 --- a/.github/workflows/cygwin_build.yml +++ /dev/null @@ -1,218 +0,0 @@ -name: Cygwin Build - -on: - push: - paths-ignore: - # remove other vehicles - - 'AntennaTracker/**' - - 'Blimp/**' - # remove non SITL HAL - - 'libraries/AP_HAL_ChibiOS/**' - - 'libraries/AP_HAL_ESP32/**' - # remove non SITL directories - - 'Tools/AP_Bootloader/**' - - 'Tools/AP_Periph/**' - - 'Tools/CHDK-Script/**' - - 'Tools/CPUInfo/**' - - 'Tools/CodeStyle/**' - - 'Tools/FilterTestTool/**' - - 'Tools/Frame_params/**' - - 'Tools/GIT_Test/**' - - 'Tools/Hello/**' - - 'Tools/IO_Firmware/**' - - 'Tools/Linux_HAL_Essentials/**' - - 'Tools/LogAnalyzer/**' - - 'Tools/Pozyx/**' - - 'Tools/PrintVersion.py' - - 'Tools/Replay/**' - - 'Tools/UDP_Proxy/**' - - 'Tools/Vicon/**' - - 'Tools/bootloaders/**' - - 'Tools/completion/**' - - 'Tools/debug/**' - - 'Tools/environment_install/**' - - 'Tools/geotag/**' - - 'Tools/gittools/**' - - 'Tools/mavproxy_modules/**' - - 'Tools/simulink/**' - - 'Tools/vagrant/**' - # 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 autotest - - '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/**' - - pull_request: - paths-ignore: - # remove other vehicles - - 'AntennaTracker/**' - - 'Blimp/**' - # remove non SITL HAL - - 'libraries/AP_HAL_ChibiOS/**' - - 'libraries/AP_HAL_ESP32/**' - # remove non SITL directories - - 'Tools/AP_Bootloader/**' - - 'Tools/AP_Periph/**' - - 'Tools/bootloaders/**' - - 'Tools/CHDK-Script/**' - - 'Tools/CodeStyle/**' - - 'Tools/completion/**' - - 'Tools/CPUInfo/**' - - 'Tools/debug/**' - - 'Tools/environment_install/**' - - 'Tools/FilterTestTool/**' - - 'Tools/Frame_params/**' - - 'Tools/geotag/**' - - 'Tools/GIT_Test/**' - - 'Tools/gittools/**' - - 'Tools/Hello/**' - - 'Tools/IO_Firmware/**' - - '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 autotest - - '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/**' - - workflow_dispatch: - -concurrency: - group: ci-${{github.workflow}}-${{ github.ref }} - cancel-in-progress: true - -jobs: - build: - runs-on: 'windows-latest' - - steps: - - uses: actions/checkout@v3 - with: - submodules: 'recursive' - - name: Prepare ccache timestamp - id: ccache_cache_timestamp - shell: bash - run: | - NOW=$(date -u +"%F-%T") - echo "timestamp=${NOW}" >> $GITHUB_OUTPUT - WORKFLOWNAME="${{github.workflow}}" - NAME_DASHED=${WORKFLOWNAME//+( )/_} - echo "cache-key=${NAME_DASHED}" >> $GITHUB_OUTPUT - - - uses: cygwin/cygwin-install-action@master - with: - packages: cygwin64 gcc-g++=10.2.0-1 ccache python37 python37-future python37-lxml python37-pip python37-setuptools python37-wheel git procps gettext - add-to-path: false - # Put ccache into github cache for faster build - - name: setup ccache - env: - PATH: /usr/bin:$(cygpath ${SYSTEMROOT})/system32 - shell: C:\cygwin\bin\bash.exe -eo pipefail '{0}' - run: >- - mkdir -p /cygdrive/d/a/ardupilot/ardupilot/ccache && - mkdir -p /usr/local/etc && - echo "export CCACHE_SLOPPINESS=file_stat_matches" >> ~/ccache.conf && - echo "export CCACHE_DIR=/cygdrive/d/a/ardupilot/ardupilot/ccache" >> ~/ccache.conf && - echo "export CCACHE_BASEDIR=/cygdrive/d/a/ardupilot/ardupilot" >> ~/ccache.conf && - echo "export CCACHE_COMPRESS=1" >> ~/ccache.conf && - echo "export CCACHE_COMPRESSLEVEL=6" >> ~/ccache.conf && - echo "export CCACHE_MAXSIZE=400M" >> ~/ccache.conf && - source ~/ccache.conf && - ccache -s - - name: ccache cache files - uses: actions/cache@v3 - with: - path: D:/a/ardupilot/ardupilot/ccache - key: ${{ steps.ccache_cache_timestamp.outputs.cache-key }}-ccache-${{steps.ccache_cache_timestamp.outputs.timestamp}} - restore-keys: ${{ steps.ccache_cache_timestamp.outputs.cache-key }}-ccache- # restore ccache from either previous build on this branch or on base branch - - name: Prepare Python environment - env: - PATH: /usr/bin:$(cygpath ${SYSTEMROOT})/system32 - shell: C:\cygwin\bin\bash.exe -eo pipefail '{0}' - run: >- - ln -sf /usr/bin/python3.7 /usr/bin/python && ln -sf /usr/bin/pip3.7 /usr/bin/pip && - python -m pip install --progress-bar off empy pexpect && - python -m pip install --progress-bar off dronecan --upgrade && - cp /usr/bin/ccache /usr/local/bin/ && - cd /usr/local/bin && ln -s ccache /usr/local/bin/gcc && - ln -s ccache /usr/local/bin/g++ && - ln -s ccache /usr/local/bin/x86_64-pc-cygwin-gcc && - ln -s ccache /usr/local/bin/x86_64-pc-cygwin-g++ - - - name: Build SITL - env: - PATH: /usr/bin:$(cygpath ${SYSTEMROOT})/system32 - shell: C:\cygwin\bin\bash.exe -eo pipefail '{0}' - run: >- - export PATH=/usr/local/bin:/usr/bin:$(cygpath ${SYSTEMROOT})/system32 && - source ~/ccache.conf && - Tools/scripts/cygwin_build.sh && - ccache -s - - - name: Check build files - id: check_files - uses: andstor/file-existence-action@v2 - with: - files: "artifacts/*" - fail: true - - - name: Archive build - uses: actions/upload-artifact@v3 - with: - name: binaries - path: artifacts - retention-days: 7 diff --git a/.github/workflows/esp32_build.yml b/.github/workflows/esp32_build.yml deleted file mode 100644 index 34bf567f6de92..0000000000000 --- a/.github/workflows/esp32_build.yml +++ /dev/null @@ -1,223 +0,0 @@ -name: ESP32 Build - -on: - push: - paths-ignore: - # remove non copter and plane vehicles - - 'AntennaTracker/**' - - 'ArduSub/**' - - 'Blimp/**' - - 'Rover/**' - # remove non esp32 HAL - - 'libraries/AP_HAL_ChibiOS/**' - - 'libraries/AP_HAL_SITL/**' - # remove non SITL directories - - 'Tools/AP_Bootloader/**' - - 'Tools/AP_Periph/**' - - 'Tools/bootloaders/**' - - 'Tools/CHDK-Script/**' - - 'Tools/CodeStyle/**' - - 'Tools/completion/**' - - 'Tools/CPUInfo/**' - - 'Tools/debug/**' - - 'Tools/environment_install/**' - - 'Tools/FilterTestTool/**' - - 'Tools/Frame_params/**' - - 'Tools/geotag/**' - - 'Tools/GIT_Test/**' - - 'Tools/gittools/**' - - 'Tools/Hello/**' - - 'Tools/IO_Firmware/**' - - '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 autotest - - '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/**' - - pull_request: - paths-ignore: - # remove non copter and plane vehicles - - 'AntennaTracker/**' - - 'ArduSub/**' - - 'Blimp/**' - - 'Rover/**' - # remove non esp32 HAL - - 'libraries/AP_HAL_ChibiOS/**' - - 'libraries/AP_HAL_SITL/**' - # remove non SITL directories - - 'Tools/AP_Bootloader/**' - - 'Tools/AP_Periph/**' - - 'Tools/bootloaders/**' - - 'Tools/CHDK-Script/**' - - 'Tools/CodeStyle/**' - - 'Tools/completion/**' - - 'Tools/CPUInfo/**' - - 'Tools/debug/**' - - 'Tools/environment_install/**' - - 'Tools/FilterTestTool/**' - - 'Tools/Frame_params/**' - - 'Tools/geotag/**' - - 'Tools/GIT_Test/**' - - 'Tools/gittools/**' - - 'Tools/Hello/**' - - 'Tools/IO_Firmware/**' - - '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 autotest - - '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/**' - - workflow_dispatch: - -concurrency: - group: ci-${{github.workflow}}-${{ github.ref }} - cancel-in-progress: true - -jobs: - build: - runs-on: ubuntu-20.04 - strategy: - fail-fast: false # don't cancel if a job from the matrix fails - matrix: - config: [ - esp32buzz, - ] - gcc: [10] - - steps: - - uses: actions/checkout@v3 - with: - submodules: 'recursive' - - name: Install Prerequisites - shell: bash - run: | - sudo apt-get install git wget libncurses-dev flex bison gperf python3 python3-pip python3-setuptools python3-serial python3-cryptography python3-future python3-pyparsing python3-pyelftools cmake ninja-build ccache libffi-dev libssl-dev dfu-util libusb-1.0-0 - sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 10 - - rm -rf /usr/local/bin/cmake - - sudo apt remove --purge --auto-remove cmake - sudo apt update && \ - sudo apt install -y software-properties-common lsb-release && \ - sudo apt clean all - wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | sudo tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null - sudo apt-add-repository "deb https://apt.kitware.com/ubuntu/ $(lsb_release -cs) main" - sudo apt update - sudo apt install cmake - - - git submodule update --init --recursive --depth=1 - ./Tools/scripts/esp32_get_idf.sh - - sudo ln -s /usr/bin/ninja /usr/bin/ninja-build - - cd modules/esp_idf - echo "Installing ESP-IDF tools...." - ./install.sh 2>&1 > /dev/null - cd ../.. - - - - name: build ${{matrix.config}} - env: - CI_BUILD_TARGET: ${{matrix.config}} - shell: bash - run: | - source ~/.bash_profile - PATH="/github/home/.local/bin:$PATH" - echo $PATH - - cd modules/esp_idf - ./install.sh - source ./export.sh - cd ../.. - python -m pip install --progress-bar off future lxml pymavlink MAVProxy pexpect flake8 geocoder empy dronecan - which cmake - ./waf configure --board ${{matrix.config}} - ./waf plane - cp build/esp32buzz/esp-idf_build/ardupilot.bin ./ArduPlane.bin - cp build/esp32buzz/esp-idf_build/ardupilot.elf ./ArduPlane.elf - ./waf copter - cp build/esp32buzz/esp-idf_build/ardupilot.bin ./ArduCopter.bin - cp build/esp32buzz/esp-idf_build/ardupilot.elf ./ArduCopter.elf - - - name: Archive artifacts - uses: actions/upload-artifact@v3 - with: - name: esp32-binaries -${{matrix.config}} - path: | - /home/runner/work/ardupilot/ardupilot/ArduPlane.bin - /home/runner/work/ardupilot/ardupilot/ArduPlane.elf - /home/runner/work/ardupilot/ardupilot/ArduCopter.bin - /home/runner/work/ardupilot/ardupilot/ArduCopter.elf - /home/runner/work/ardupilot/ardupilot/build/esp32buzz/esp-idf_build/bootloader/bootloader.bin - /home/runner/work/ardupilot/ardupilot/build/esp32buzz/esp-idf_build/partition_table/partition-table.bin - - - retention-days: 14 - diff --git a/.github/workflows/macos_build.yml b/.github/workflows/macos_build.yml deleted file mode 100644 index 20fc6fd894384..0000000000000 --- a/.github/workflows/macos_build.yml +++ /dev/null @@ -1,188 +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/**' - - 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/**' - - 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@v3 - 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 deleted file mode 100644 index 9029f2393d641..0000000000000 --- a/.github/workflows/test_ccache.yml +++ /dev/null @@ -1,144 +0,0 @@ -name: test ccache - -on: - push: - paths-ignore: - # remove other vehicles - - 'AntennaTracker/**' - - 'ArduPlane/**' - - 'ArduSub/**' - - 'Blimp/**' - - 'Rover/**' - # remove non chibios HAL - - 'libraries/AP_HAL_Linux/**' - - 'libraries/AP_HAL_ESP32/**' - - 'libraries/AP_HAL_SITL/**' - # remove non stm directories - - 'Tools/CHDK-Script/**' - - 'Tools/CodeStyle/**' - - 'Tools/completion/**' - - 'Tools/debug/**' - - 'Tools/environment_install/**' - - 'Tools/FilterTestTool/**' - - 'Tools/Frame_params/**' - - 'Tools/geotag/**' - - 'Tools/GIT_Test/**' - - 'Tools/gittools/**' - - 'Tools/Hello/**' - - 'Tools/LogAnalyzer/**' - - 'Tools/mavproxy_modules/**' - - 'Tools/Pozyx/**' - - 'Tools/PrintVersion.py' - - 'Tools/Replay/**' - - 'Tools/simulink/**' - - 'Tools/UDP_Proxy/**' - - 'Tools/vagrant/**' - - 'Tools/Vicon/**' - # 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/**' - - pull_request: - paths-ignore: - # remove other vehicles - - 'AntennaTracker/**' - - 'ArduPlane/**' - - 'ArduSub/**' - - 'Blimp/**' - - 'Rover/**' - # remove non chibios HAL - - 'libraries/AP_HAL_Linux/**' - - 'libraries/AP_HAL_ESP32/**' - - 'libraries/AP_HAL_SITL/**' - # remove non stm directories - - 'Tools/CHDK-Script/**' - - 'Tools/CodeStyle/**' - - 'Tools/completion/**' - - 'Tools/debug/**' - - 'Tools/environment_install/**' - - 'Tools/FilterTestTool/**' - - 'Tools/Frame_params/**' - - 'Tools/geotag/**' - - 'Tools/GIT_Test/**' - - 'Tools/gittools/**' - - 'Tools/Hello/**' - - 'Tools/LogAnalyzer/**' - - 'Tools/mavproxy_modules/**' - - 'Tools/Pozyx/**' - - 'Tools/PrintVersion.py' - - 'Tools/Replay/**' - - 'Tools/simulink/**' - - 'Tools/UDP_Proxy/**' - - 'Tools/vagrant/**' - - 'Tools/Vicon/**' - # 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/**' - - workflow_dispatch: - -concurrency: - group: ci-${{github.workflow}}-${{ github.ref }} - cancel-in-progress: true - -jobs: - build: - runs-on: ubuntu-20.04 - container: ardupilot/ardupilot-dev-${{ matrix.toolchain }}:v0.0.29 - strategy: - fail-fast: false # don't cancel if a job from the matrix fails - matrix: - toolchain: [ - chibios, - ] - gcc: [10] - steps: - # git checkout the PR - - uses: actions/checkout@v3 - with: - submodules: 'recursive' - - name: ccache test - shell: bash - run: | - PATH="/usr/lib/ccache:/opt/gcc-arm-none-eabi-${{matrix.gcc}}/bin:$PATH" - Tools/scripts/build_tests/test_ccache.py --boards MatekF405,MatekF405-bdshot --min-cache-pct=75 - Tools/scripts/build_tests/test_ccache.py --boards CubeOrange,Durandal --min-cache-pct=75 - diff --git a/.github/workflows/test_chibios.yml b/.github/workflows/test_chibios.yml deleted file mode 100644 index 038c7bbbe5b4f..0000000000000 --- a/.github/workflows/test_chibios.yml +++ /dev/null @@ -1,199 +0,0 @@ -name: test chibios - -on: - push: - paths-ignore: - # remove non chibios HAL - - 'libraries/AP_HAL_Linux/**' - - 'libraries/AP_HAL_ESP32/**' - - 'libraries/AP_HAL_SITL/**' - # remove non stm directories - - 'Tools/CHDK-Script/**' - - 'Tools/CodeStyle/**' - - 'Tools/completion/**' - - 'Tools/debug/**' - - 'Tools/environment_install/**' - - 'Tools/FilterTestTool/**' - - 'Tools/Frame_params/**' - - 'Tools/geotag/**' - - 'Tools/GIT_Test/**' - - 'Tools/gittools/**' - - 'Tools/Hello/**' - - 'Tools/LogAnalyzer/**' - - 'Tools/mavproxy_modules/**' - - 'Tools/Pozyx/**' - - 'Tools/PrintVersion.py' - - 'Tools/Replay/**' - - 'Tools/simulink/**' - - 'Tools/UDP_Proxy/**' - - 'Tools/vagrant/**' - - 'Tools/Vicon/**' - # Remove vehicles autotest we need support of test_build_option.py in the Tools/autotest directory - - 'Tools/autotest/antennatracker.py' - - 'Tools/autotest/arduplane.py' - - 'Tools/autotest/ardusub.py' - - 'Tools/autotest/balancebot.py' - - 'Tools/autotest/location.txt' - - 'Tools/autotest/quadplane.py' - - 'Tools/autotest/rover.py' - - 'Tools/autotest/sailboat.py' - - 'Tools/autotest/swarminit.txt' - # 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/**' - - pull_request: - paths-ignore: - # remove non chibios HAL - - 'libraries/AP_HAL_Linux/**' - - 'libraries/AP_HAL_ESP32/**' - - 'libraries/AP_HAL_SITL/**' - # remove non stm directories - - 'Tools/CHDK-Script/**' - - 'Tools/CodeStyle/**' - - 'Tools/completion/**' - - 'Tools/debug/**' - - 'Tools/environment_install/**' - - 'Tools/FilterTestTool/**' - - 'Tools/Frame_params/**' - - 'Tools/geotag/**' - - 'Tools/GIT_Test/**' - - 'Tools/gittools/**' - - 'Tools/Hello/**' - - 'Tools/LogAnalyzer/**' - - 'Tools/mavproxy_modules/**' - - 'Tools/Pozyx/**' - - 'Tools/PrintVersion.py' - - 'Tools/Replay/**' - - 'Tools/simulink/**' - - 'Tools/UDP_Proxy/**' - - 'Tools/vagrant/**' - - 'Tools/Vicon/**' - # Remove vehicles autotest we need support of test_build_option.py in the Tools/autotest directory - - 'Tools/autotest/antennatracker.py' - - 'Tools/autotest/arduplane.py' - - 'Tools/autotest/ardusub.py' - - 'Tools/autotest/autotest.py' - - 'Tools/autotest/balancebot.py' - - 'Tools/autotest/common.py' - - 'Tools/autotest/examples.py' - - 'Tools/autotest/quadplane.py' - - 'Tools/autotest/rover.py' - - 'Tools/autotest/sailboat.py' - - 'Tools/autotest/**.txt' - - 'Tools/autotest/logger_metadata/**' - - 'Tools/autotest/param_metadata/**' - # 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/**' - - workflow_dispatch: - -concurrency: - group: ci-${{github.workflow}}-${{ github.ref }} - cancel-in-progress: true - -jobs: - build: - runs-on: ubuntu-20.04 - container: ardupilot/ardupilot-dev-${{ matrix.toolchain }}:v0.0.29 - strategy: - fail-fast: false # don't cancel if a job from the matrix fails - matrix: - config: [ - stm32f7, - stm32h7, - fmuv2-plane, - periph-build, - iofirmware, - CubeOrange-bootloader, - fmuv3-bootloader, - revo-bootloader, - stm32h7-debug, - fmuv3, - revo-mini, - MatekF405-Wing, - CubeOrange-ODID, - CubeRedPrimary-bootloader, - configure-all, - build-options-defaults-test, - signing - ] - toolchain: [ - chibios, - #chibios-clang, - ] - gcc: [10] - exclude: - - gcc: 10 - toolchain: chibios-clang - - steps: - # git checkout the PR - - uses: actions/checkout@v3 - 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.config}}-${{ matrix.toolchain }}-${{ matrix.gcc }}-${{steps.ccache_cache_timestamp.outputs.timestamp}} - restore-keys: ${{github.workflow}}-ccache-${{matrix.config}}-${{ matrix.toolchain }}-${{ matrix.gcc }} # 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 }} gcc-${{matrix.gcc}} - env: - CI_BUILD_TARGET: ${{matrix.config}} - shell: bash - run: | - git config --global --add safe.directory ${GITHUB_WORKSPACE} - if [[ ${{ matrix.toolchain }} == "chibios-clang" ]]; then - export CC=clang - export CXX=clang++ - fi - PATH="/usr/lib/ccache:/opt/gcc-arm-none-eabi-${{matrix.gcc}}/bin:$PATH" - PATH="/github/home/.local/bin:$PATH" - Tools/scripts/build_ci.sh - ccache -s - ccache -z diff --git a/.github/workflows/test_coverage.yml b/.github/workflows/test_coverage.yml deleted file mode 100644 index b6c5403ac77f9..0000000000000 --- a/.github/workflows/test_coverage.yml +++ /dev/null @@ -1,108 +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-20.04 - container: - image: ardupilot/ardupilot-dev-${{ matrix.type }}:v0.0.29 - 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@v3 - 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: Configure CAN - if: ${{ matrix.config == 'sitltest-can'}} - run: | - sudo apt-get update - sudo apt-get -y install can-utils iproute2 linux-modules-extra-$(uname -r) - sudo modprobe vcan - sudo ip link add dev vcan0 type vcan - sudo ip link set up vcan0 - - 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_gps --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-latest - steps: - - name: Coveralls Finished - uses: coverallsapp/github-action@master - with: - github-token: ${{ secrets.github_token }} - parallel-finished: true diff --git a/.github/workflows/test_dds.yml b/.github/workflows/test_dds.yml deleted file mode 100644 index db77005988547..0000000000000 --- a/.github/workflows/test_dds.yml +++ /dev/null @@ -1,184 +0,0 @@ -name: test dds - -on: - push: - paths-ignore: - # remove not tests vehicles - - 'AntennaTracker/**' - - 'ArduSub/**' - - 'Blimp/**' - - 'Rover/**' - # remove esp32 HAL - - 'libraries/AP_HAL_ESP32/**' - # remove non SITL directories - - 'Tools/AP_Bootloader/**' - - 'Tools/bootloaders/**' - - 'Tools/CHDK-Script/**' - - 'Tools/CodeStyle/**' - - 'Tools/completion/**' - - 'Tools/CPUInfo/**' - - 'Tools/debug/**' - - 'Tools/environment_install/**' - - 'Tools/FilterTestTool/**' - - 'Tools/Frame_params/**' - - 'Tools/geotag/**' - - 'Tools/GIT_Test/**' - - 'Tools/gittools/**' - - 'Tools/Hello/**' - - 'Tools/IO_Firmware/**' - - '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/**' - - pull_request: - paths-ignore: - # remove not tests vehicles - - 'AntennaTracker/**' - - 'ArduSub/**' - - 'Rover/**' - - 'Blimp/**' - # remove esp32 HAL - - 'libraries/AP_HAL_ESP32/**' - # remove non SITL directories - - 'Tools/AP_Bootloader/**' - - 'Tools/CHDK-Script/**' - - 'Tools/CPUInfo/**' - - 'Tools/CodeStyle/**' - - 'Tools/FilterTestTool/**' - - 'Tools/Frame_params/**' - - 'Tools/GIT_Test/**' - - 'Tools/Hello/**' - - 'Tools/IO_Firmware/**' - - 'Tools/LogAnalyzer/**' - - 'Tools/Pozyx/**' - - 'Tools/PrintVersion.py' - - 'Tools/Replay/**' - - 'Tools/UDP_Proxy/**' - - 'Tools/Vicon/**' - - 'Tools/bootloaders/**' - - 'Tools/completion/**' - - 'Tools/debug/**' - - 'Tools/environment_install/**' - - 'Tools/geotag/**' - - 'Tools/gittools/**' - - 'Tools/mavproxy_modules/**' - - 'Tools/simulink/**' - - 'Tools/vagrant/**' - # 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/**' - - workflow_dispatch: - -concurrency: - group: ci-${{github.workflow}}-${{ github.ref }} - cancel-in-progress: true - -jobs: - build: - runs-on: ubuntu-20.04 - container: - image: ardupilot/ardupilot-dev-ros:latest - options: --user 1001 - strategy: - fail-fast: false # don't cancel if a job from the matrix fails - matrix: - config: [ - sitl, - stm32h7 - ] - steps: - # git checkout the PR - - uses: actions/checkout@v3 - 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.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 ${{matrix.config}} - env: - CI_BUILD_TARGET: dds-${{matrix.config}} - shell: 'script -q -e -c "bash {0}"' - run: | - git config --global --add safe.directory ${GITHUB_WORKSPACE} - PATH="/github/home/.local/bin:$PATH" - Tools/scripts/build_ci.sh - - - name: Archive buildlog artifacts - uses: actions/upload-artifact@v3 - if: failure() - with: - name: fail-${{matrix.config}} - path: /tmp/buildlogs - retention-days: 14 diff --git a/.github/workflows/test_environment.yml b/.github/workflows/test_environment.yml deleted file mode 100644 index dd1f4d2036cab..0000000000000 --- 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/scripts/environment_install/**' - - pull_request: - paths: - - '.github/workflows/test_environment.yml' - - 'Tools/scripts/environment_install/**' - - -concurrency: - group: ci-${{github.workflow}}-${{ github.ref }} - cancel-in-progress: true - -jobs: - build: - runs-on: ubuntu-20.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: bionic - - os: ubuntu - name: focal - - os: ubuntu - name: jammy - - os: ubuntu - name: lunar - - os: archlinux - name: latest - - 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 -Sy --noconfirm --needed git sudo - ;; - esac - - # git checkout the PR - - uses: actions/checkout@v3 - with: - submodules: 'recursive' - - name: test install environment ${{matrix.os}}.${{matrix.name}} - timeout-minutes: 30 - 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 /__w/ardupilot/ardupilot - 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 - 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 - 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 deleted file mode 100644 index fb8c8397752f0..0000000000000 --- a/.github/workflows/test_linux_sbc.yml +++ /dev/null @@ -1,197 +0,0 @@ -name: test Linux SBC - -on: - push: - paths-ignore: - # remove non LINUX HAL - - 'libraries/AP_HAL_ChibiOS/**' - - 'libraries/AP_HAL_ESP32/**' - - 'libraries/AP_HAL_SITL/**' - # remove non SITL directories - - 'Tools/AP_Bootloader/**' - - 'Tools/AP_Periph/**' - - 'Tools/bootloaders/**' - - 'Tools/CHDK-Script/**' - - 'Tools/CodeStyle/**' - - 'Tools/completion/**' - - 'Tools/CPUInfo/**' - - 'Tools/debug/**' - - 'Tools/environment_install/**' - - 'Tools/FilterTestTool/**' - - 'Tools/Frame_params/**' - - 'Tools/geotag/**' - - 'Tools/GIT_Test/**' - - 'Tools/gittools/**' - - 'Tools/Hello/**' - - 'Tools/IO_Firmware/**' - - 'Tools/LogAnalyzer/**' - - 'Tools/mavproxy_modules/**' - - 'Tools/Pozyx/**' - - 'Tools/PrintVersion.py' - - 'Tools/Replay/**' - - 'Tools/simulink/**' - - 'Tools/UDP_Proxy/**' - - 'Tools/vagrant/**' - - 'Tools/Vicon/**' - # Discard file from Tools/scripts as not used - - '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/**' - - pull_request: - paths-ignore: - # remove non LINUX HAL - - 'libraries/AP_HAL_ChibiOS/**' - - 'libraries/AP_HAL_ESP32/**' - - 'libraries/AP_HAL_SITL/**' - # remove non SITL directories - - 'Tools/AP_Bootloader/**' - - 'Tools/AP_Periph/**' - - 'Tools/bootloaders/**' - - 'Tools/CHDK-Script/**' - - 'Tools/CodeStyle/**' - - 'Tools/completion/**' - - 'Tools/CPUInfo/**' - - 'Tools/debug/**' - - 'Tools/environment_install/**' - - 'Tools/FilterTestTool/**' - - 'Tools/Frame_params/**' - - 'Tools/geotag/**' - - 'Tools/GIT_Test/**' - - 'Tools/gittools/**' - - 'Tools/Hello/**' - - 'Tools/IO_Firmware/**' - - '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/**' - - workflow_dispatch: - -concurrency: - group: ci-${{github.workflow}}-${{ github.ref }} - cancel-in-progress: true - -jobs: - build: - runs-on: ubuntu-20.04 - container: ardupilot/ardupilot-dev-${{ matrix.toolchain }}:v0.0.29 - strategy: - fail-fast: false # don't cancel if a job from the matrix fails - matrix: - config: [ - linux, - navigator, - navio, - navio2, - bbbmini, - bhat, - bebop, - erlebrain2, - pxfmini, - pxf - ] - toolchain: [ - armhf, - ] - include: - - config: navigator - toolchain: armhf-musl - - config: linux - toolchain: base # GCC - exclude: - - config: navigator - toolchain: armhf - - config: linux - toolchain: armhf - - steps: - # git checkout the PR - - uses: actions/checkout@v3 - 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.config}}-${{ matrix.toolchain }}-${{steps.ccache_cache_timestamp.outputs.timestamp}} - restore-keys: ${{github.workflow}}-ccache-${{matrix.config}}-${{ 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}} - shell: bash - run: | - git config --global --add safe.directory ${GITHUB_WORKSPACE} - if [[ ${{ matrix.toolchain }} == "clang" ]]; then - export CC=clang - export CXX=clang++ - fi - PATH="/github/home/.local/bin:$PATH" - Tools/scripts/build_ci.sh - ccache -s - ccache -z diff --git a/.github/workflows/test_replay.yml b/.github/workflows/test_replay.yml deleted file mode 100644 index e7a8cd72f8666..0000000000000 --- a/.github/workflows/test_replay.yml +++ /dev/null @@ -1,197 +0,0 @@ -name: test replay - -on: - push: - paths-ignore: - # remove other vehicles - - 'AntennaTracker/**' - - 'ArduCopter/**' - - 'ArduPlane/**' - - 'ArduSub/**' - - 'Blimp/**' - - 'Rover/**' - # remove non SITL HAL - - 'libraries/AP_HAL_ChibiOS/**' - - 'libraries/AP_HAL_ESP32/**' - # remove non SITL directories - - 'Tools/AP_Bootloader/**' - - 'Tools/AP_Periph/**' - - 'Tools/bootloaders/**' - - 'Tools/CHDK-Script/**' - - 'Tools/CodeStyle/**' - - 'Tools/completion/**' - - 'Tools/CPUInfo/**' - - 'Tools/debug/**' - - 'Tools/environment_install/**' - - 'Tools/FilterTestTool/**' - - 'Tools/Frame_params/**' - - 'Tools/geotag/**' - - 'Tools/GIT_Test/**' - - 'Tools/gittools/**' - - 'Tools/Hello/**' - - 'Tools/IO_Firmware/**' - - 'Tools/Linux_HAL_Essentials/**' - - 'Tools/LogAnalyzer/**' - - 'Tools/mavproxy_modules/**' - - 'Tools/Pozyx/**' - - 'Tools/PrintVersion.py' - - '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/**' - - pull_request: - paths-ignore: - # remove other vehicles - - 'AntennaTracker/**' - - 'ArduCopter/**' - - 'ArduPlane/**' - - 'ArduSub/**' - - 'Blimp/**' - - 'Rover/**' - # remove non SITL HAL - - 'libraries/AP_HAL_ChibiOS/**' - - 'libraries/AP_HAL_ESP32/**' - # remove non SITL directories - - 'Tools/AP_Bootloader/**' - - 'Tools/AP_Periph/**' - - 'Tools/bootloaders/**' - - 'Tools/CHDK-Script/**' - - 'Tools/CodeStyle/**' - - 'Tools/completion/**' - - 'Tools/CPUInfo/**' - - 'Tools/debug/**' - - 'Tools/environment_install/**' - - 'Tools/FilterTestTool/**' - - 'Tools/Frame_params/**' - - 'Tools/geotag/**' - - 'Tools/GIT_Test/**' - - 'Tools/gittools/**' - - 'Tools/Hello/**' - - 'Tools/IO_Firmware/**' - - 'Tools/Linux_HAL_Essentials/**' - - 'Tools/LogAnalyzer/**' - - 'Tools/mavproxy_modules/**' - - 'Tools/Pozyx/**' - - 'Tools/PrintVersion.py' - - '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/**' - - workflow_dispatch: - -concurrency: - group: ci-${{github.workflow}}-${{ github.ref }} - cancel-in-progress: true - -jobs: - build: - runs-on: ubuntu-20.04 - container: ardupilot/ardupilot-dev-${{ matrix.toolchain }}:v0.0.29 - strategy: - fail-fast: false # don't cancel if a job from the matrix fails - matrix: - toolchain: [ - base, # GCC - clang, - ] - config: [ - replay - ] - steps: - # git checkout the PR - - uses: actions/checkout@v3 - 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}} - shell: bash - run: | - git config --global --add safe.directory ${GITHUB_WORKSPACE} - if [[ ${{ matrix.toolchain }} == "clang" ]]; then - export CC=clang - export CXX=clang++ - fi - PATH="/github/home/.local/bin:$PATH" - Tools/scripts/build_ci.sh - - - name: Archive buildlog artifacts - uses: actions/upload-artifact@v3 - if: failure() - with: - name: fail-${{ matrix.toolchain }}-${{matrix.config}} - path: /tmp/buildlogs - retention-days: 14 diff --git a/.github/workflows/test_scripting.yml b/.github/workflows/test_scripting.yml deleted file mode 100644 index 8fbc8a10d7d15..0000000000000 --- a/.github/workflows/test_scripting.yml +++ /dev/null @@ -1,55 +0,0 @@ -name: test scripting - -on: - push: - paths: # only run for scripting changes - - 'libraries/AP_Scripting/tests/docs_check.py' - - 'libraries/AP_Scripting/generator/**' - - '**.lua' - - pull_request: - paths: # only run for scripting changes - - 'libraries/AP_Scripting/tests/docs_check.py' - - 'libraries/AP_Scripting/generator/**' - - '**.lua' - - workflow_dispatch: - -concurrency: - group: ci-${{github.workflow}}-${{ github.ref }} - cancel-in-progress: true - -jobs: - test-scripting: - runs-on: ubuntu-20.04 - container: ardupilot/ardupilot-dev-base:v0.0.29 - steps: - # git checkout the PR - - uses: actions/checkout@v3 - with: - submodules: 'recursive' - - - name: Lua Linter - shell: bash - run: | - sudo apt-get update - sudo apt-get -y install lua-check - ./Tools/scripts/run_luacheck.sh - - - name: copy docs - run: | - PATH="/github/home/.local/bin:$PATH" - mv "libraries/AP_Scripting/docs/docs.lua" "libraries/AP_Scripting/docs/current_docs.lua" - - - name: build sitl # we don't really need to build the full code, just trigger docs re-gen with --scripting-docs, timeout after 10 seconds - shell: bash - run: | - git config --global --add safe.directory ${GITHUB_WORKSPACE} - PATH="/github/home/.local/bin:$PATH" - ./waf configure --board sitl - timeout 10 ./waf antennatracker --scripting-docs || code=$?; if [[ $code -ne 124 && $code -ne 0 ]]; then exit $code; fi - - - name: run compare - run: | - PATH="/github/home/.local/bin:$PATH" - python ./libraries/AP_Scripting/tests/docs_check.py "./libraries/AP_Scripting/docs/docs.lua" "./libraries/AP_Scripting/docs/current_docs.lua" diff --git a/.github/workflows/test_scripts.yml b/.github/workflows/test_scripts.yml deleted file mode 100644 index 410037f5ba6e6..0000000000000 --- a/.github/workflows/test_scripts.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: test scripts - -on: [push, pull_request, workflow_dispatch] - -concurrency: - group: ci-${{github.workflow}}-${{ github.ref }} - cancel-in-progress: true - -jobs: - build: - runs-on: ubuntu-20.04 - container: ardupilot/ardupilot-dev-base:v0.0.29 - strategy: - fail-fast: false # don't cancel if a job from the matrix fails - matrix: - config: [ - check_autotest_options, - param_parse, - python-cleanliness, - astyle-cleanliness, - validate_board_list, - ] - steps: - # git checkout the PR - - uses: actions/checkout@v3 - with: - submodules: 'recursive' - - name: test ${{matrix.config}} - env: - CI_BUILD_TARGET: ${{matrix.config}} - shell: bash - run: | - sudo apt update - sudo apt-get install -y astyle - Tools/scripts/build_ci.sh diff --git a/.github/workflows/test_sitl_copter.yml b/.github/workflows/test_sitl_copter.yml deleted file mode 100644 index e5e53ce409f0b..0000000000000 --- a/.github/workflows/test_sitl_copter.yml +++ /dev/null @@ -1,365 +0,0 @@ -name: test copter - -on: - push: - paths-ignore: - # remove other vehicles - - 'AntennaTracker/**' - - 'ArduPlane/**' - - 'ArduSub/**' - - 'Blimp/**' - - 'Rover/**' - # remove non SITL HAL - - 'libraries/AP_HAL_ChibiOS/**' - - 'libraries/AP_HAL_ESP32/**' - # remove non SITL directories - - 'Tools/AP_Bootloader/**' - - 'Tools/AP_Periph/**' - - 'Tools/bootloaders/**' - - 'Tools/CHDK-Script/**' - - 'Tools/CodeStyle/**' - - 'Tools/completion/**' - - 'Tools/CPUInfo/**' - - 'Tools/debug/**' - - 'Tools/environment_install/**' - - 'Tools/FilterTestTool/**' - - 'Tools/Frame_params/**' - - 'Tools/geotag/**' - - 'Tools/GIT_Test/**' - - 'Tools/gittools/**' - - 'Tools/Hello/**' - - 'Tools/IO_Firmware/**' - - 'Tools/Linux_HAL_Essentials/**' - - 'Tools/LogAnalyzer/**' - - 'Tools/Pozyx/**' - - 'Tools/PrintVersion.py' - - '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 other vehicles autotest - - 'Tools/autotest/antennatracker.py' - - 'Tools/autotest/arduplane.py' - - 'Tools/autotest/ardusub.py' - - 'Tools/autotest/balancebot.py' - - 'Tools/autotest/location.txt' - - 'Tools/autotest/quadplane.py' - - 'Tools/autotest/rover.py' - - 'Tools/autotest/sailboat.py' - - 'Tools/autotest/swarminit.txt' - # 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/**' - - - pull_request: - paths-ignore: - # remove other vehicles - - 'AntennaTracker/**' - - 'ArduPlane/**' - - 'ArduSub/**' - - 'Blimp/**' - - 'Rover/**' - # remove non SITL HAL - - 'libraries/AP_HAL_ChibiOS/**' - - 'libraries/AP_HAL_ESP32/**' - # remove non SITL directories - - 'Tools/AP_Bootloader/**' - - 'Tools/AP_Periph/**' - - 'Tools/bootloaders/**' - - 'Tools/CHDK-Script/**' - - 'Tools/CodeStyle/**' - - 'Tools/completion/**' - - 'Tools/CPUInfo/**' - - 'Tools/debug/**' - - 'Tools/environment_install/**' - - 'Tools/FilterTestTool/**' - - 'Tools/Frame_params/**' - - 'Tools/geotag/**' - - 'Tools/GIT_Test/**' - - 'Tools/gittools/**' - - 'Tools/Hello/**' - - 'Tools/IO_Firmware/**' - - 'Tools/Linux_HAL_Essentials/**' - - 'Tools/LogAnalyzer/**' - - 'Tools/Pozyx/**' - - 'Tools/PrintVersion.py' - - '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 other vehicles autotest - - 'Tools/autotest/antennatracker.py' - - 'Tools/autotest/arduplane.py' - - 'Tools/autotest/ardusub.py' - - 'Tools/autotest/balancebot.py' - - 'Tools/autotest/location.txt' - - 'Tools/autotest/quadplane.py' - - 'Tools/autotest/rover.py' - - 'Tools/autotest/sailboat.py' - - 'Tools/autotest/swarminit.txt' - # 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/**' - - workflow_dispatch: - -concurrency: - group: ci-${{github.workflow}}-${{ github.ref }} - cancel-in-progress: true - -jobs: - build: - runs-on: ubuntu-20.04 - container: ardupilot/ardupilot-dev-${{ matrix.toolchain }}:v0.0.29 - strategy: - fail-fast: false # don't cancel if a job from the matrix fails - matrix: - toolchain: [ - base, # GCC - clang, - ] - steps: - # git checkout the PR - - uses: actions/checkout@v3 - 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: build copter ${{ matrix.toolchain }} - shell: bash - run: | - git config --global --add safe.directory ${GITHUB_WORKSPACE} - if [[ ${{ matrix.toolchain }} == "clang" ]]; then - export CC=clang - export CXX=clang++ - fi - PATH="/github/home/.local/bin:$PATH" - ./waf configure --board sitl - ./waf build --target bin/arducopter - ccache -s - ccache -z - - autotest: - needs: build # don't try to launch the tests matrix if it doesn't build first, profit from caching for fast build - runs-on: ubuntu-20.04 - container: - image: ardupilot/ardupilot-dev-base:v0.0.29 - options: --privileged --cap-add=SYS_PTRACE --security-opt apparmor=unconfined --security-opt seccomp=unconfined - strategy: - fail-fast: false # don't cancel if a job from the matrix fails - matrix: - config: [ - sitltest-copter-tests1a, - sitltest-copter-tests1b, - sitltest-copter-tests1c, - sitltest-copter-tests1d, - sitltest-copter-tests1e, - sitltest-copter-tests2a, - sitltest-copter-tests2b, - ] - - steps: - # git checkout the PR - - uses: actions/checkout@v3 - 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/restore@v3 - with: - path: ~/.ccache - key: ${{github.workflow}}-ccache-base-${{steps.ccache_cache_timestamp.outputs.timestamp}} - restore-keys: ${{github.workflow}}-ccache-base- # restore ccache from either previous build on this branch or on master - - name: setup ccache - run: | - . .github/workflows/ccache.env - - name: test ${{matrix.config}} - env: - CI_BUILD_TARGET: ${{matrix.config}} - shell: bash - run: | - git config --global --add safe.directory ${GITHUB_WORKSPACE} - PATH="/github/home/.local/bin:$PATH" - Tools/scripts/build_ci.sh - - - name: Archive buildlog artifacts - uses: actions/upload-artifact@v3 - if: failure() - with: - name: fail-${{matrix.config}} - path: | - /tmp/buildlogs - /__w/ardupilot/ardupilot/logs - /__w/ardupilot/ardupilot/ap-*.core - /__w/ardupilot/ardupilot/core.* - /__w/ardupilot/ardupilot/dumpstack.sh_* - /__w/ardupilot/ardupilot/dumpcore.sh_* - retention-days: 14 - - - name: Archive .bin artifacts - uses: actions/upload-artifact@v3 - with: - name: BIN-${{matrix.config}} - path: /__w/ardupilot/ardupilot/logs - retention-days: 7 - - build-gcc-heli: - runs-on: ubuntu-20.04 - container: - image: ardupilot/ardupilot-dev-base:v0.0.29 - options: --privileged --cap-add=SYS_PTRACE --security-opt apparmor=unconfined --security-opt seccomp=unconfined - steps: - # git checkout the PR - - uses: actions/checkout@v3 - 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-base-${{steps.ccache_cache_timestamp.outputs.timestamp}} - restore-keys: ${{github.workflow}}-ccache-base- # restore ccache from either previous build on this branch or on master - - name: setup ccache - run: | - . .github/workflows/ccache.env - - name: build heli - shell: bash - run: | - git config --global --add safe.directory ${GITHUB_WORKSPACE} - PATH="/github/home/.local/bin:$PATH" - ./waf configure --board sitl - ./waf build --target bin/arducopter-heli - ccache -s - ccache -z - - autotest-heli: - needs: build-gcc-heli # don't try to launch the tests matrix if it doesn't build first, profit from caching for fast build - runs-on: ubuntu-20.04 - container: ardupilot/ardupilot-dev-base:v0.0.29 - strategy: - fail-fast: false # don't cancel if a job from the matrix fails - matrix: - config: [ - sitltest-heli, - ] - - steps: - # git checkout the PR - - uses: actions/checkout@v3 - 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/restore@v3 - with: - path: ~/.ccache - key: ${{github.workflow}}-ccache-base-${{steps.ccache_cache_timestamp.outputs.timestamp}} - restore-keys: ${{github.workflow}}-ccache-base- # restore ccache from either previous build on this branch or on master - - name: setup ccache - run: | - . .github/workflows/ccache.env - - name: test ${{matrix.config}} - env: - CI_BUILD_TARGET: ${{matrix.config}} - shell: bash - run: | - git config --global --add safe.directory ${GITHUB_WORKSPACE} - PATH="/github/home/.local/bin:$PATH" - Tools/scripts/build_ci.sh - - - name: Archive buildlog artifacts - uses: actions/upload-artifact@v3 - if: failure() - with: - name: fail-${{matrix.config}} - path: | - /tmp/buildlogs - /__w/ardupilot/ardupilot/logs - /__w/ardupilot/ardupilot/ap-*.core - /__w/ardupilot/ardupilot/core.* - /__w/ardupilot/ardupilot/dumpstack.sh_* - /__w/ardupilot/ardupilot/dumpcore.sh_* - retention-days: 14 - - - name: Archive .bin artifacts - uses: actions/upload-artifact@v3 - with: - name: BIN-${{matrix.config}} - path: /__w/ardupilot/ardupilot/logs - retention-days: 7 diff --git a/.github/workflows/test_sitl_periph.yml b/.github/workflows/test_sitl_periph.yml deleted file mode 100644 index ddf9f5eb5f545..0000000000000 --- a/.github/workflows/test_sitl_periph.yml +++ /dev/null @@ -1,247 +0,0 @@ -name: test ap_periph - -on: - push: - paths-ignore: - # remove other vehicles than copter - - 'AntennaTracker/**' - - 'ArduPlane/**' - - 'ArduSub/**' - - 'Blimp/**' - - 'Rover/**' - # remove non SITL HAL - - 'libraries/AP_HAL_ChibiOS/**' - - 'libraries/AP_HAL_ESP32/**' - # remove non SITL directories - - 'Tools/bootloaders/**' - - 'Tools/CHDK-Script/**' - - 'Tools/CodeStyle/**' - - 'Tools/completion/**' - - 'Tools/CPUInfo/**' - - 'Tools/debug/**' - - 'Tools/environment_install/**' - - 'Tools/FilterTestTool/**' - - 'Tools/Frame_params/**' - - 'Tools/geotag/**' - - 'Tools/GIT_Test/**' - - 'Tools/gittools/**' - - 'Tools/Hello/**' - - 'Tools/IO_Firmware/**' - - 'Tools/Linux_HAL_Essentials/**' - - 'Tools/LogAnalyzer/**' - - '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 other vehicles autotest keep only coptertest - - 'Tools/autotest/antennatracker.py' - - 'Tools/autotest/arduplane.py' - - 'Tools/autotest/ardusub.py' - - 'Tools/autotest/balancebot.py' - - 'Tools/autotest/helicopter.py' - - 'Tools/autotest/location.txt' - - 'Tools/autotest/quadplane.py' - - 'Tools/autotest/rover.py' - - 'Tools/autotest/sailboat.py' - - 'Tools/autotest/swarminit.txt' - # 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/**' - - pull_request: - paths-ignore: - # remove other vehicles than copter - - 'AntennaTracker/**' - - 'ArduPlane/**' - - 'ArduSub/**' - - 'Blimp/**' - - 'Rover/**' - # remove non SITL HAL - - 'libraries/AP_HAL_ChibiOS/**' - - 'libraries/AP_HAL_ESP32/**' - # remove non SITL directories - - 'Tools/bootloaders/**' - - 'Tools/CHDK-Script/**' - - 'Tools/CodeStyle/**' - - 'Tools/completion/**' - - 'Tools/CPUInfo/**' - - 'Tools/debug/**' - - 'Tools/environment_install/**' - - 'Tools/FilterTestTool/**' - - 'Tools/Frame_params/**' - - 'Tools/geotag/**' - - 'Tools/GIT_Test/**' - - 'Tools/gittools/**' - - 'Tools/Hello/**' - - 'Tools/IO_Firmware/**' - - 'Tools/Linux_HAL_Essentials/**' - - 'Tools/LogAnalyzer/**' - - '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 other vehicles autotest keep only coptertest - - 'Tools/autotest/antennatracker.py' - - 'Tools/autotest/arduplane.py' - - 'Tools/autotest/ardusub.py' - - 'Tools/autotest/balancebot.py' - - 'Tools/autotest/helicopter.py' - - 'Tools/autotest/location.txt' - - 'Tools/autotest/quadplane.py' - - 'Tools/autotest/rover.py' - - 'Tools/autotest/sailboat.py' - - 'Tools/autotest/swarminit.txt' - # 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/**' - - workflow_dispatch: - -concurrency: - group: ci-${{github.workflow}}-${{ github.ref }} - cancel-in-progress: true - -jobs: - build-gcc-ap_periph: - runs-on: ubuntu-20.04 - container: ardupilot/ardupilot-dev-periph:v0.0.29 - steps: - # git checkout the PR - - uses: actions/checkout@v3 - 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-${{steps.ccache_cache_timestamp.outputs.timestamp}} - restore-keys: ${{github.workflow}}-ccache- # restore ccache from either previous build on this branch or on master - - name: setup ccache - run: | - . .github/workflows/ccache.env - - - name: run dronecan dsdlc generator test - run: | - PATH="/github/home/.local/bin:$PATH" - python modules/DroneCAN/dronecan_dsdlc/dronecan_dsdlc.py -O dsdlc_generated modules/DroneCAN/DSDL/uavcan modules/DroneCAN/DSDL/dronecan modules/DroneCAN/DSDL/com --run-test - - - name: build sitl_periph_gps - shell: bash - run: | - git config --global --add safe.directory ${GITHUB_WORKSPACE} - PATH="/github/home/.local/bin:$PATH" - ./waf configure --board sitl_periph_gps - ./waf build --target bin/AP_Periph - ccache -s - ccache -z - - autotest-can: - needs: build-gcc-ap_periph # don't try to launch the tests matrix if it doesn't build first, profit from caching for fast build - runs-on: ubuntu-20.04 - container: - image: ardupilot/ardupilot-dev-periph:v0.0.29 - options: --privileged - strategy: - fail-fast: false # don't cancel if a job from the matrix fails - matrix: - config: [ - sitltest-can, - ] - - steps: - # git checkout the PR - - uses: actions/checkout@v3 - 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-${{steps.ccache_cache_timestamp.outputs.timestamp}} - restore-keys: ${{github.workflow}}-ccache- # restore ccache from either previous build on this branch or on master - - name: setup ccache - run: | - . .github/workflows/ccache.env - - name: setup can-utils - run: | - kernel_ver=`uname -r` - if [ "$kernel_ver" = "5.4.0-1032-azure" ] || [ "$kernel_ver" = "5.11.4-051104-generic" ]; then echo "Unsupported Kernel $kernel_ver" && exit 0; fi; - sudo apt-get update - sudo apt-get -y install can-utils iproute2 linux-modules-extra-$(uname -r) - sudo modprobe vcan - sudo ip link add dev vcan0 type vcan - sudo ip link set up vcan0 - - name: test ${{matrix.config}} - env: - CI_BUILD_TARGET: ${{matrix.config}} - shell: bash - run: | - git config --global --add safe.directory ${GITHUB_WORKSPACE} - kernel_ver=`uname -r` - if [ "$kernel_ver" = "5.4.0-1032-azure" ] || [ "$kernel_ver" = "5.11.4-051104-generic" ]; then echo "Unsupported Kernel $kernel_ver" && exit 0; fi; - PATH="/github/home/.local/bin:$PATH" - Tools/scripts/build_ci.sh diff --git a/.github/workflows/test_sitl_plane.yml b/.github/workflows/test_sitl_plane.yml deleted file mode 100644 index 01b7b144f7a41..0000000000000 --- a/.github/workflows/test_sitl_plane.yml +++ /dev/null @@ -1,266 +0,0 @@ -name: test plane - -on: - push: - paths-ignore: - # remove other vehicles - - 'AntennaTracker/**' - - 'ArduCopter/**' - - 'ArduSub/**' - - 'Blimp/**' - - 'Rover/**' - # remove non SITL HAL - - 'libraries/AP_HAL_ChibiOS/**' - - 'libraries/AP_HAL_ESP32/**' - # remove non SITL directories - - 'Tools/AP_Bootloader/**' - - 'Tools/AP_Periph/**' - - 'Tools/bootloaders/**' - - 'Tools/CHDK-Script/**' - - 'Tools/CodeStyle/**' - - 'Tools/completion/**' - - 'Tools/CPUInfo/**' - - 'Tools/debug/**' - - 'Tools/environment_install/**' - - 'Tools/FilterTestTool/**' - - 'Tools/Frame_params/**' - - 'Tools/geotag/**' - - 'Tools/GIT_Test/**' - - 'Tools/gittools/**' - - 'Tools/Hello/**' - - 'Tools/IO_Firmware/**' - - 'Tools/Linux_HAL_Essentials/**' - - 'Tools/LogAnalyzer/**' - - '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 other vehicles autotest - - 'Tools/autotest/antennatracker.py' - - 'Tools/autotest/arducopter.py' - - 'Tools/autotest/ardusub.py' - - 'Tools/autotest/balancebot.py' - - 'Tools/autotest/helicopter.py' - - 'Tools/autotest/location.txt' - - 'Tools/autotest/rover.py' - - 'Tools/autotest/sailboat.py' - - 'Tools/autotest/swarminit.txt' - # 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/**' - - pull_request: - paths-ignore: - # remove other vehicles - - 'AntennaTracker/**' - - 'ArduCopter/**' - - 'ArduSub/**' - - 'Blimp/**' - - 'Rover/**' - # remove non SITL HAL - - 'libraries/AP_HAL_ChibiOS/**' - - 'libraries/AP_HAL_ESP32/**' - # remove non SITL directories - - 'Tools/AP_Bootloader/**' - - 'Tools/AP_Periph/**' - - 'Tools/bootloaders/**' - - 'Tools/CHDK-Script/**' - - 'Tools/CodeStyle/**' - - 'Tools/completion/**' - - 'Tools/CPUInfo/**' - - 'Tools/debug/**' - - 'Tools/environment_install/**' - - 'Tools/FilterTestTool/**' - - 'Tools/Frame_params/**' - - 'Tools/geotag/**' - - 'Tools/GIT_Test/**' - - 'Tools/gittools/**' - - 'Tools/Hello/**' - - 'Tools/IO_Firmware/**' - - 'Tools/Linux_HAL_Essentials/**' - - 'Tools/LogAnalyzer/**' - - '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 other vehicles autotest - - 'Tools/autotest/antennatracker.py' - - 'Tools/autotest/arducopter.py' - - 'Tools/autotest/ardusub.py' - - 'Tools/autotest/balancebot.py' - - 'Tools/autotest/helicopter.py' - - 'Tools/autotest/location.txt' - - 'Tools/autotest/rover.py' - - 'Tools/autotest/sailboat.py' - - 'Tools/autotest/swarminit.txt' - # 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/**' - - workflow_dispatch: - -concurrency: - group: ci-${{github.workflow}}-${{ github.ref }} - cancel-in-progress: true - -jobs: - build: - runs-on: ubuntu-20.04 - container: ardupilot/ardupilot-dev-${{ matrix.toolchain }}:v0.0.29 - strategy: - fail-fast: false # don't cancel if a job from the matrix fails - matrix: - toolchain: [ - base, # GCC - clang, - ] - steps: - # git checkout the PR - - uses: actions/checkout@v3 - 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: build plane ${{ matrix.toolchain }} - shell: bash - run: | - git config --global --add safe.directory ${GITHUB_WORKSPACE} - if [[ ${{ matrix.toolchain }} == "clang" ]]; then - export CC=clang - export CXX=clang++ - fi - PATH="/github/home/.local/bin:$PATH" - ./waf configure --board sitl - ./waf build --target bin/arduplane - ccache -s - ccache -z - - autotest: - needs: build # don't try to launch the tests matrix if it doesn't build first, profit from caching for fast build - runs-on: ubuntu-20.04 - container: - image: ardupilot/ardupilot-dev-base:v0.0.29 - options: --privileged --cap-add=SYS_PTRACE --security-opt apparmor=unconfined --security-opt seccomp=unconfined - strategy: - fail-fast: false # don't cancel if a job from the matrix fails - matrix: - config: [ - sitltest-plane, - sitltest-quadplane, - ] - - steps: - # git checkout the PR - - uses: actions/checkout@v3 - 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/restore@v3 - with: - path: ~/.ccache - key: ${{github.workflow}}-ccache-base-${{steps.ccache_cache_timestamp.outputs.timestamp}} - restore-keys: ${{github.workflow}}-ccache-base- # restore ccache from either previous build on this branch or on master - - name: setup ccache - run: | - . .github/workflows/ccache.env - - name: test ${{matrix.config}} - env: - CI_BUILD_TARGET: ${{matrix.config}} - shell: bash - run: | - git config --global --add safe.directory ${GITHUB_WORKSPACE} - PATH="/github/home/.local/bin:$PATH" - Tools/scripts/build_ci.sh - - - name: Archive buildlog artifacts - uses: actions/upload-artifact@v3 - if: failure() - with: - name: fail-${{matrix.config}} - path: | - /tmp/buildlogs - /__w/ardupilot/ardupilot/logs - /__w/ardupilot/ardupilot/ap-*.core - /__w/ardupilot/ardupilot/core.* - /__w/ardupilot/ardupilot/dumpstack.sh_* - /__w/ardupilot/ardupilot/dumpcore.sh_* - retention-days: 14 - - - name: Archive .bin artifacts - uses: actions/upload-artifact@v3 - with: - name: BIN-${{matrix.config}} - path: /__w/ardupilot/ardupilot/logs - retention-days: 7 - diff --git a/.github/workflows/test_sitl_rover.yml b/.github/workflows/test_sitl_rover.yml deleted file mode 100644 index d7776af231838..0000000000000 --- a/.github/workflows/test_sitl_rover.yml +++ /dev/null @@ -1,266 +0,0 @@ -name: test rover - -on: - push: - paths-ignore: - # remove other vehicles - - 'AntennaTracker/**' - - 'ArduCopter/**' - - 'ArduPlane/**' - - 'ArduSub/**' - - 'Blimp/**' - # remove non SITL HAL - - 'libraries/AP_HAL_ChibiOS/**' - - 'libraries/AP_HAL_ESP32/**' - # remove non SITL directories - - 'Tools/AP_Bootloader/**' - - 'Tools/AP_Periph/**' - - 'Tools/bootloaders/**' - - 'Tools/CHDK-Script/**' - - 'Tools/CodeStyle/**' - - 'Tools/completion/**' - - 'Tools/CPUInfo/**' - - 'Tools/debug/**' - - 'Tools/environment_install/**' - - 'Tools/FilterTestTool/**' - - 'Tools/Frame_params/**' - - 'Tools/geotag/**' - - 'Tools/GIT_Test/**' - - 'Tools/gittools/**' - - 'Tools/Hello/**' - - 'Tools/IO_Firmware/**' - - 'Tools/Linux_HAL_Essentials/**' - - 'Tools/LogAnalyzer/**' - - '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 other vehicles autotest - - 'Tools/autotest/antennatracker.py' - - 'Tools/autotest/arducopter.py' - - 'Tools/autotest/arduplane.py' - - 'Tools/autotest/ardusub.py' - - 'Tools/autotest/helicopter.py' - - 'Tools/autotest/location.txt' - - 'Tools/autotest/quadplane.py' - - 'Tools/autotest/swarminit.txt' - # 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/**' - - - pull_request: - paths-ignore: - # remove other vehicles - - 'AntennaTracker/**' - - 'ArduCopter/**' - - 'ArduPlane/**' - - 'ArduSub/**' - - 'Blimp/**' - # remove non SITL HAL - - 'libraries/AP_HAL_ChibiOS/**' - - 'libraries/AP_HAL_ESP32/**' - # remove non SITL directories - - 'Tools/AP_Bootloader/**' - - 'Tools/AP_Periph/**' - - 'Tools/bootloaders/**' - - 'Tools/CHDK-Script/**' - - 'Tools/CodeStyle/**' - - 'Tools/completion/**' - - 'Tools/CPUInfo/**' - - 'Tools/debug/**' - - 'Tools/environment_install/**' - - 'Tools/FilterTestTool/**' - - 'Tools/Frame_params/**' - - 'Tools/geotag/**' - - 'Tools/GIT_Test/**' - - 'Tools/gittools/**' - - 'Tools/Hello/**' - - 'Tools/IO_Firmware/**' - - 'Tools/Linux_HAL_Essentials/**' - - 'Tools/LogAnalyzer/**' - - '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 other vehicles autotest - - 'Tools/autotest/antennatracker.py' - - 'Tools/autotest/arducopter.py' - - 'Tools/autotest/arduplane.py' - - 'Tools/autotest/ardusub.py' - - 'Tools/autotest/helicopter.py' - - 'Tools/autotest/location.txt' - - 'Tools/autotest/quadplane.py' - - 'Tools/autotest/swarminit.txt' - # 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/**' - - workflow_dispatch: - -concurrency: - group: ci-${{github.workflow}}-${{ github.ref }} - cancel-in-progress: true - -jobs: - build: - runs-on: ubuntu-20.04 - container: ardupilot/ardupilot-dev-${{ matrix.toolchain }}:v0.0.29 - strategy: - fail-fast: false # don't cancel if a job from the matrix fails - matrix: - toolchain: [ - base, # GCC - clang, - ] - steps: - # git checkout the PR - - uses: actions/checkout@v3 - 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: build rover ${{ matrix.toolchain }} - shell: bash - run: | - git config --global --add safe.directory ${GITHUB_WORKSPACE} - if [[ ${{ matrix.toolchain }} == "clang" ]]; then - export CC=clang - export CXX=clang++ - fi - PATH="/github/home/.local/bin:$PATH" - ./waf configure --board sitl - ./waf build --target bin/ardurover - ccache -s - ccache -z - - autotest: - needs: build # don't try to launch the tests matrix if it doesn't build first, profit from caching for fast build - runs-on: ubuntu-20.04 - container: - image: ardupilot/ardupilot-dev-base:v0.0.29 - options: --privileged --cap-add=SYS_PTRACE --security-opt apparmor=unconfined --security-opt seccomp=unconfined - strategy: - fail-fast: false # don't cancel if a job from the matrix fails - matrix: - config: [ - sitltest-rover, - sitltest-sailboat, - sitltest-balancebot - ] - - steps: - # git checkout the PR - - uses: actions/checkout@v3 - 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/restore@v3 - with: - path: ~/.ccache - key: ${{github.workflow}}-ccache-base-${{steps.ccache_cache_timestamp.outputs.timestamp}} - restore-keys: ${{github.workflow}}-ccache-base- # restore ccache from either previous build on this branch or on master - - name: setup ccache - run: | - . .github/workflows/ccache.env - - name: test ${{matrix.config}} - env: - CI_BUILD_TARGET: ${{matrix.config}} - shell: bash - run: | - git config --global --add safe.directory ${GITHUB_WORKSPACE} - PATH="/github/home/.local/bin:$PATH" - Tools/scripts/build_ci.sh - - - name: Archive buildlog artifacts - uses: actions/upload-artifact@v3 - if: failure() - with: - name: fail-${{matrix.config}} - path: | - /tmp/buildlogs - /__w/ardupilot/ardupilot/logs - /__w/ardupilot/ardupilot/ap-*.core - /__w/ardupilot/ardupilot/core.* - /__w/ardupilot/ardupilot/dumpstack.sh_* - /__w/ardupilot/ardupilot/dumpcore.sh_* - retention-days: 14 - - - name: Archive .bin artifacts - uses: actions/upload-artifact@v3 - with: - name: BIN-${{matrix.config}} - path: /__w/ardupilot/ardupilot/logs - retention-days: 7 - diff --git a/.github/workflows/test_sitl_sub.yml b/.github/workflows/test_sitl_sub.yml deleted file mode 100644 index 2436abeae49c1..0000000000000 --- a/.github/workflows/test_sitl_sub.yml +++ /dev/null @@ -1,267 +0,0 @@ -name: test sub - -on: - push: - paths-ignore: - # remove other vehicles - - 'AntennaTracker/**' - - 'ArduCopter/**' - - 'ArduPlane/**' - - 'Blimp/**' - - 'Rover/**' - # remove non SITL HAL - - 'libraries/AP_HAL_ChibiOS/**' - - 'libraries/AP_HAL_ESP32/**' - # remove non SITL directories - - 'Tools/AP_Bootloader/**' - - 'Tools/AP_Periph/**' - - 'Tools/bootloaders/**' - - 'Tools/CHDK-Script/**' - - 'Tools/CodeStyle/**' - - 'Tools/completion/**' - - 'Tools/CPUInfo/**' - - 'Tools/debug/**' - - 'Tools/environment_install/**' - - 'Tools/FilterTestTool/**' - - 'Tools/Frame_params/**' - - 'Tools/geotag/**' - - 'Tools/GIT_Test/**' - - 'Tools/gittools/**' - - 'Tools/Hello/**' - - 'Tools/IO_Firmware/**' - - 'Tools/Linux_HAL_Essentials/**' - - 'Tools/LogAnalyzer/**' - - '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 other vehicles autotest - - 'Tools/autotest/antennatracker.py' - - 'Tools/autotest/arducopter.py' - - 'Tools/autotest/arduplane.py' - - 'Tools/autotest/balancebot.py' - - 'Tools/autotest/helicopter.py' - - 'Tools/autotest/location.txt' - - 'Tools/autotest/quadplane.py' - - 'Tools/autotest/rover.py' - - 'Tools/autotest/sailboat.py' - - 'Tools/autotest/swarminit.txt' - # 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/**' - - pull_request: - paths-ignore: - # remove other vehicles - - 'AntennaTracker/**' - - 'ArduCopter/**' - - 'ArduPlane/**' - - 'Blimp/**' - - 'Rover/**' - # remove non SITL HAL - - 'libraries/AP_HAL_ChibiOS/**' - - 'libraries/AP_HAL_ESP32/**' - # remove non SITL directories - - 'Tools/AP_Bootloader/**' - - 'Tools/AP_Periph/**' - - 'Tools/bootloaders/**' - - 'Tools/CHDK-Script/**' - - 'Tools/CodeStyle/**' - - 'Tools/completion/**' - - 'Tools/CPUInfo/**' - - 'Tools/debug/**' - - 'Tools/environment_install/**' - - 'Tools/FilterTestTool/**' - - 'Tools/Frame_params/**' - - 'Tools/geotag/**' - - 'Tools/GIT_Test/**' - - 'Tools/gittools/**' - - 'Tools/Hello/**' - - 'Tools/IO_Firmware/**' - - 'Tools/Linux_HAL_Essentials/**' - - 'Tools/LogAnalyzer/**' - - '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 other vehicles autotest - - 'Tools/autotest/antennatracker.py' - - 'Tools/autotest/arducopter.py' - - 'Tools/autotest/arduplane.py' - - 'Tools/autotest/balancebot.py' - - 'Tools/autotest/helicopter.py' - - 'Tools/autotest/location.txt' - - 'Tools/autotest/quadplane.py' - - 'Tools/autotest/rover.py' - - 'Tools/autotest/sailboat.py' - - 'Tools/autotest/swarminit.txt' - # 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/**' - - workflow_dispatch: - -concurrency: - group: ci-${{github.workflow}}-${{ github.ref }} - cancel-in-progress: true - -jobs: - build: - runs-on: ubuntu-20.04 - container: ardupilot/ardupilot-dev-${{ matrix.toolchain }}:v0.0.29 - strategy: - fail-fast: false # don't cancel if a job from the matrix fails - matrix: - toolchain: [ - base, # GCC - clang, - ] - steps: - # git checkout the PR - - uses: actions/checkout@v3 - 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: build sub ${{ matrix.toolchain }} - shell: bash - run: | - git config --global --add safe.directory ${GITHUB_WORKSPACE} - if [[ ${{ matrix.toolchain }} == "clang" ]]; then - export CC=clang - export CXX=clang++ - fi - PATH="/github/home/.local/bin:$PATH" - ./waf configure --board sitl - ./waf build --target bin/ardusub - ccache -s - ccache -z - - autotest: - needs: build # don't try to launch the tests matrix if it doesn't build first, profit from caching for fast build - runs-on: ubuntu-20.04 - container: - image: ardupilot/ardupilot-dev-base:v0.0.29 - options: --privileged --cap-add=SYS_PTRACE --security-opt apparmor=unconfined --security-opt seccomp=unconfined - strategy: - fail-fast: false # don't cancel if a job from the matrix fails - matrix: - config: [ - sitltest-sub - ] - - steps: - # git checkout the PR - - uses: actions/checkout@v3 - 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/restore@v3 - with: - path: ~/.ccache - key: ${{github.workflow}}-ccache-base-${{steps.ccache_cache_timestamp.outputs.timestamp}} - restore-keys: ${{github.workflow}}-ccache-base- # restore ccache from either previous build on this branch or on master - - name: setup ccache - run: | - . .github/workflows/ccache.env - - name: test ${{matrix.config}} - env: - CI_BUILD_TARGET: ${{matrix.config}} - shell: bash - run: | - git config --global --add safe.directory ${GITHUB_WORKSPACE} - PATH="/github/home/.local/bin:$PATH" - Tools/scripts/build_ci.sh - - - name: Archive buildlog artifacts - uses: actions/upload-artifact@v3 - if: failure() - with: - name: fail-${{matrix.config}} - path: | - /tmp/buildlogs - /__w/ardupilot/ardupilot/logs - /__w/ardupilot/ardupilot/ap-*.core - /__w/ardupilot/ardupilot/core.* - /__w/ardupilot/ardupilot/dumpstack.sh_* - /__w/ardupilot/ardupilot/dumpcore.sh_* - retention-days: 14 - - - name: Archive .bin artifacts - uses: actions/upload-artifact@v3 - with: - name: BIN-${{matrix.config}} - path: /__w/ardupilot/ardupilot/logs - retention-days: 7 - diff --git a/.github/workflows/test_sitl_tracker.yml b/.github/workflows/test_sitl_tracker.yml deleted file mode 100644 index 6f8acf59fea46..0000000000000 --- a/.github/workflows/test_sitl_tracker.yml +++ /dev/null @@ -1,267 +0,0 @@ -name: test tracker - -on: - push: - paths-ignore: - # remove other vehicles - - 'ArduCopter/**' - - 'ArduPlane/**' - - 'ArduSub/**' - - 'Blimp/**' - - 'Rover/**' - # remove non SITL HAL - - 'libraries/AP_HAL_ChibiOS/**' - - 'libraries/AP_HAL_ESP32/**' - # remove non SITL directories - - 'Tools/AP_Bootloader/**' - - 'Tools/AP_Periph/**' - - 'Tools/bootloaders/**' - - 'Tools/CHDK-Script/**' - - 'Tools/CodeStyle/**' - - 'Tools/completion/**' - - 'Tools/CPUInfo/**' - - 'Tools/debug/**' - - 'Tools/environment_install/**' - - 'Tools/FilterTestTool/**' - - 'Tools/Frame_params/**' - - 'Tools/geotag/**' - - 'Tools/GIT_Test/**' - - 'Tools/gittools/**' - - 'Tools/Hello/**' - - 'Tools/IO_Firmware/**' - - 'Tools/Linux_HAL_Essentials/**' - - 'Tools/LogAnalyzer/**' - - '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 other vehicles autotest - - 'Tools/autotest/arducopter.py' - - 'Tools/autotest/arduplane.py' - - 'Tools/autotest/ardusub.py' - - 'Tools/autotest/balancebot.py' - - 'Tools/autotest/helicopter.py' - - 'Tools/autotest/location.txt' - - 'Tools/autotest/quadplane.py' - - 'Tools/autotest/rover.py' - - 'Tools/autotest/sailboat.py' - - 'Tools/autotest/swarminit.txt' - # 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/**' - - pull_request: - paths-ignore: - # remove other vehicles - - 'ArduCopter/**' - - 'ArduPlane/**' - - 'ArduSub/**' - - 'Blimp/**' - - 'Rover/**' - # remove non SITL HAL - - 'libraries/AP_HAL_ChibiOS/**' - - 'libraries/AP_HAL_ESP32/**' - # remove non SITL directories - - 'Tools/AP_Bootloader/**' - - 'Tools/AP_Periph/**' - - 'Tools/bootloaders/**' - - 'Tools/CHDK-Script/**' - - 'Tools/CodeStyle/**' - - 'Tools/completion/**' - - 'Tools/CPUInfo/**' - - 'Tools/debug/**' - - 'Tools/environment_install/**' - - 'Tools/FilterTestTool/**' - - 'Tools/Frame_params/**' - - 'Tools/geotag/**' - - 'Tools/GIT_Test/**' - - 'Tools/gittools/**' - - 'Tools/Hello/**' - - 'Tools/IO_Firmware/**' - - 'Tools/Linux_HAL_Essentials/**' - - 'Tools/LogAnalyzer/**' - - '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 other vehicles autotest - - 'Tools/autotest/arducopter.py' - - 'Tools/autotest/arduplane.py' - - 'Tools/autotest/ardusub.py' - - 'Tools/autotest/balancebot.py' - - 'Tools/autotest/helicopter.py' - - 'Tools/autotest/location.txt' - - 'Tools/autotest/quadplane.py' - - 'Tools/autotest/rover.py' - - 'Tools/autotest/sailboat.py' - - 'Tools/autotest/swarminit.txt' - # 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/**' - - workflow_dispatch: - -concurrency: - group: ci-${{github.workflow}}-${{ github.ref }} - cancel-in-progress: true - -jobs: - build: - runs-on: ubuntu-20.04 - container: ardupilot/ardupilot-dev-${{ matrix.toolchain }}:v0.0.29 - strategy: - fail-fast: false # don't cancel if a job from the matrix fails - matrix: - toolchain: [ - base, # GCC - clang, - ] - steps: - # git checkout the PR - - uses: actions/checkout@v3 - 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: build tracker ${{ matrix.toolchain }} - shell: bash - run: | - git config --global --add safe.directory ${GITHUB_WORKSPACE} - if [[ ${{ matrix.toolchain }} == "clang" ]]; then - export CC=clang - export CXX=clang++ - fi - PATH="/github/home/.local/bin:$PATH" - ./waf configure --board sitl - ./waf build --target bin/antennatracker - ccache -s - ccache -z - - autotest: - needs: build # don't try to launch the tests matrix if it doesn't build first, profit from caching for fast build - runs-on: ubuntu-20.04 - container: - image: ardupilot/ardupilot-dev-base:v0.0.29 - options: --privileged --cap-add=SYS_PTRACE --security-opt apparmor=unconfined --security-opt seccomp=unconfined - strategy: - fail-fast: false # don't cancel if a job from the matrix fails - matrix: - config: [ - sitltest-tracker - ] - - steps: - # git checkout the PR - - uses: actions/checkout@v3 - 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/restore@v3 - with: - path: ~/.ccache - key: ${{github.workflow}}-ccache-base-${{steps.ccache_cache_timestamp.outputs.timestamp}} - restore-keys: ${{github.workflow}}-ccache-base- # restore ccache from either previous build on this branch or on master - - name: setup ccache - run: | - . .github/workflows/ccache.env - - name: test ${{matrix.config}} - env: - CI_BUILD_TARGET: ${{matrix.config}} - shell: bash - run: | - git config --global --add safe.directory ${GITHUB_WORKSPACE} - PATH="/github/home/.local/bin:$PATH" - Tools/scripts/build_ci.sh - - - name: Archive buildlog artifacts - uses: actions/upload-artifact@v3 - if: failure() - with: - name: fail-${{matrix.config}} - path: | - /tmp/buildlogs - /__w/ardupilot/ardupilot/logs - /__w/ardupilot/ardupilot/ap-*.core - /__w/ardupilot/ardupilot/core.* - /__w/ardupilot/ardupilot/dumpstack.sh_* - /__w/ardupilot/ardupilot/dumpcore.sh_* - retention-days: 14 - - - name: Archive .bin artifacts - uses: actions/upload-artifact@v3 - with: - name: BIN-${{matrix.config}} - path: /__w/ardupilot/ardupilot/logs - retention-days: 7 - diff --git a/.github/workflows/test_size.yml b/.github/workflows/test_size.yml deleted file mode 100644 index e1f45fabfe48c..0000000000000 --- a/.github/workflows/test_size.yml +++ /dev/null @@ -1,305 +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/**' - workflow_dispatch: - - -concurrency: - group: ci-${{github.workflow}}-${{ github.ref }} - cancel-in-progress: true - -jobs: - build: - runs-on: ubuntu-20.04 - container: ardupilot/ardupilot-dev-${{ matrix.toolchain }}:v0.0.29 - strategy: - fail-fast: false # don't cancel if a job from the matrix fails - matrix: - toolchain: [ - chibios, - ] - config: [ - Durandal, - MatekF405, - 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@v3 - 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@v3 - 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 deleted file mode 100644 index 2bd0abf9ebf1f..0000000000000 --- a/.github/workflows/test_unit_tests.yml +++ /dev/null @@ -1,153 +0,0 @@ -name: test unit tests and sitl building - -on: - push: - paths-ignore: - # Remove markdown files as irrelevant - - '**.md' - # Remove dotfile at root directory - - './.dir-locals.el' - - './.dockerignore' - - './.editorconfig' - - './.gitattributes' - - './.github' - - './.gitignore' - - './.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 SITL HAL - - 'libraries/AP_HAL_ChibiOS/**' - - 'libraries/AP_HAL_ESP32/**' - pull_request: - paths-ignore: - # Remove markdown files as irrelevant - - '**.md' - # Remove dotfile at root directory - - './.dir-locals.el' - - './.dockerignore' - - './.editorconfig' - - './.gitattributes' - - './.github' - - './.gitignore' - - './.valgrind-suppressions' - - './.valgrindrc' - - 'Dockerfile' - - 'Vagrantfile' - - 'Makefile' - # Remove some directories check - - '.vscode/**' - - '.github/ISSUE_TEMPLATE/**' - # Remove generic tools - - 'Tools/CHDK-Script/**' - - 'Tools/CPUInfo/**' - - 'Tools/CodeStyle/**' - - 'Tools/FilterTestTool/**' - - 'Tools/GIT_Test/**' - - 'Tools/Hello/**' - - 'Tools/Linux_HAL_Essentials/**' - - 'Tools/LogAnalyzer/**' - - 'Tools/Pozyx/**' - - 'Tools/PrintVersion.py' - - 'Tools/completion/**' - - 'Tools/debug/**' - - 'Tools/environment_install/**' - - 'Tools/geotag/**' - - 'Tools/gittools/**' - - 'Tools/mavproxy_modules/**' - - 'Tools/simulink/**' - - 'Tools/vagrant/**' - - 'Tools/UDP_Proxy/**' - - 'Tools/Vicon/**' - # remove non SITL HAL - - 'libraries/AP_HAL_ChibiOS/**' - - 'libraries/AP_HAL_ESP32/**' - workflow_dispatch: - -concurrency: - group: ci-${{github.workflow}}-${{ github.ref }} - cancel-in-progress: true - -jobs: - build: - runs-on: ubuntu-20.04 - container: - image: ardupilot/ardupilot-dev-${{ matrix.toolchain }}:v0.0.29 - options: --user 1001 - strategy: - fail-fast: false # don't cancel if a job from the matrix fails - matrix: - toolchain: [ - base, # GCC - clang, - ] - config: [ - unit-tests, - sitl - # examples, - ] - steps: - # git checkout the PR - - uses: actions/checkout@v3 - 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}} - shell: 'script -q -e -c "bash {0}"' - run: | - git config --global --add safe.directory ${GITHUB_WORKSPACE} - if [[ ${{ matrix.toolchain }} == "clang" ]]; then - export CC=clang - export CXX=clang++ - fi - PATH="/github/home/.local/bin:$PATH" - Tools/scripts/build_ci.sh - - - name: Archive buildlog artifacts - uses: actions/upload-artifact@v3 - if: failure() - with: - name: fail-${{ matrix.toolchain }}-${{matrix.config}} - path: /tmp/buildlogs - retention-days: 14 From f025bbd972a83b3a79d1e2617b2e0badabdf44fd Mon Sep 17 00:00:00 2001 From: Tezel Celebi Date: Sat, 10 Jun 2023 13:09:02 +0300 Subject: [PATCH 3/3] removed uavcan --- modules/uavcan | 1 - 1 file changed, 1 deletion(-) delete mode 160000 modules/uavcan diff --git a/modules/uavcan b/modules/uavcan deleted file mode 160000 index f845e02dcd2e9..0000000000000 --- a/modules/uavcan +++ /dev/null @@ -1 +0,0 @@ -Subproject commit f845e02dcd2e97f6c4743c96f3b2380c4b03ab5f