From 1c6d0ae7402ea491c48e870ebc766aece8c5bb7f Mon Sep 17 00:00:00 2001 From: Timo Sairiala Date: Mon, 4 Mar 2024 07:54:35 +0200 Subject: [PATCH] run codeql --- .github/workflows/checks.yml | 50 ------- .github/workflows/clang-tidy.yml | 21 --- .github/workflows/compile_linux.yml | 54 ------- .github/workflows/compile_linux_arm64.yml | 51 ------- .github/workflows/compile_macos.yml | 56 ------- .github/workflows/compile_nuttx.yml | 129 ---------------- .github/workflows/deploy_all.yml | 54 ------- .../ekf_functional_change_indicator.yml | 21 --- .../workflows/ekf_update_change_indicator.yml | 29 ---- .github/workflows/failsafe_sim.yml | 44 ------ .github/workflows/mavros_mission_tests.yml | 139 ------------------ .github/workflows/mavros_offboard_tests.yml | 134 ----------------- .github/workflows/metadata.yml | 131 ----------------- .github/workflows/python_checks.yml | 25 ---- .github/workflows/sitl_tests.yml | 135 ----------------- .github/workflows/tiiuae-blackduck-scan.yaml | 56 ------- .github/workflows/tiiuae-builder-images.yaml | 42 ------ .github/workflows/tiiuae-check-format.yml | 18 --- .github/workflows/tiiuae-codeql.yaml | 40 +++++ .../workflows/tiiuae-coverity-scan-image.yaml | 47 ------ .github/workflows/tiiuae-coverity-scan.yaml | 36 ----- .github/workflows/tiiuae-sitl-gzsim.yaml | 63 -------- .github/workflows/tiiuae-sitl-tests.yml | 72 --------- .github/workflows/tiiuae-sitl.yaml | 102 ------------- 24 files changed, 40 insertions(+), 1509 deletions(-) delete mode 100644 .github/workflows/checks.yml delete mode 100644 .github/workflows/clang-tidy.yml delete mode 100644 .github/workflows/compile_linux.yml delete mode 100644 .github/workflows/compile_linux_arm64.yml delete mode 100644 .github/workflows/compile_macos.yml delete mode 100644 .github/workflows/compile_nuttx.yml delete mode 100644 .github/workflows/deploy_all.yml delete mode 100644 .github/workflows/ekf_functional_change_indicator.yml delete mode 100644 .github/workflows/ekf_update_change_indicator.yml delete mode 100644 .github/workflows/failsafe_sim.yml delete mode 100644 .github/workflows/mavros_mission_tests.yml delete mode 100644 .github/workflows/mavros_offboard_tests.yml delete mode 100644 .github/workflows/metadata.yml delete mode 100644 .github/workflows/python_checks.yml delete mode 100644 .github/workflows/sitl_tests.yml delete mode 100644 .github/workflows/tiiuae-blackduck-scan.yaml delete mode 100644 .github/workflows/tiiuae-builder-images.yaml delete mode 100644 .github/workflows/tiiuae-check-format.yml create mode 100644 .github/workflows/tiiuae-codeql.yaml delete mode 100644 .github/workflows/tiiuae-coverity-scan-image.yaml delete mode 100644 .github/workflows/tiiuae-coverity-scan.yaml delete mode 100644 .github/workflows/tiiuae-sitl-gzsim.yaml delete mode 100644 .github/workflows/tiiuae-sitl-tests.yml delete mode 100644 .github/workflows/tiiuae-sitl.yaml diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml deleted file mode 100644 index 3775602e33b1..000000000000 --- a/.github/workflows/checks.yml +++ /dev/null @@ -1,50 +0,0 @@ -name: Checks - -on: - push: - branches: - - 'main' - pull_request: - branches: - - '*' - -jobs: - build: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - check: [ - "check_format", - "tests", - "tests_coverage", - "px4_fmu-v2_default stack_check", - "validate_module_configs", - "shellcheck_all", - "NO_NINJA_BUILD=1 px4_fmu-v5_default", - "NO_NINJA_BUILD=1 px4_sitl_default", - "airframe_metadata", - "module_documentation", - "parameters_metadata", - ] - container: - image: px4io/px4-dev-nuttx-focal:2021-09-08 - options: --privileged --ulimit core=-1 --security-opt seccomp=unconfined - steps: - - uses: actions/checkout@v4 - with: - token: ${{ secrets.ACCESS_TOKEN }} - - - name: check environment - run: | - export - ulimit -a - - name: ${{matrix.check}} - run: make ${{matrix.check}} - - name: upload coverage - if: contains(matrix.check, 'coverage') - uses: codecov/codecov-action@v3 - with: - token: ${{ secrets.CODECOV_TOKEN }} - flags: unittests - file: coverage/lcov.info diff --git a/.github/workflows/clang-tidy.yml b/.github/workflows/clang-tidy.yml deleted file mode 100644 index af6b812bd6e6..000000000000 --- a/.github/workflows/clang-tidy.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: Clang Tidy - -on: - push: - branches: - - 'main' - pull_request: - branches: - - '*' - -jobs: - build: - runs-on: ubuntu-latest - container: px4io/px4-dev-clang:2021-09-08 - steps: - - uses: actions/checkout@v4 - with: - token: ${{secrets.ACCESS_TOKEN}} - - - name: make clang-tidy-quiet - run: make clang-tidy-quiet diff --git a/.github/workflows/compile_linux.yml b/.github/workflows/compile_linux.yml deleted file mode 100644 index 7c2463b3ffa5..000000000000 --- a/.github/workflows/compile_linux.yml +++ /dev/null @@ -1,54 +0,0 @@ -name: Linux Targets - -on: - push: - branches: - - 'main' - pull_request: - branches: - - '*' - -jobs: - build: - runs-on: ubuntu-latest - container: px4io/px4-dev-armhf:2021-09-08 - strategy: - matrix: - config: [ - beaglebone_blue_default, - emlid_navio2_default, - px4_raspberrypi_default, - scumaker_pilotpi_default, - ] - steps: - - uses: actions/checkout@v4 - with: - token: ${{secrets.ACCESS_TOKEN}} - - - name: Prepare ccache timestamp - id: ccache_cache_timestamp - shell: cmake -P {0} - run: | - string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC) - message("::set-output name=timestamp::${current_date}") - - name: ccache cache files - uses: actions/cache@v3 - with: - path: ~/.ccache - key: ${{matrix.config}}-ccache-${{steps.ccache_cache_timestamp.outputs.timestamp}} - restore-keys: ${{matrix.config}}-ccache- - - name: setup ccache - run: | - 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 = 100M" >> ~/.ccache/ccache.conf - echo "hash_dir = false" >> ~/.ccache/ccache.conf - ccache -s - ccache -z - - - name: make ${{matrix.config}} - run: make ${{matrix.config}} - - name: ccache post-run - run: ccache -s diff --git a/.github/workflows/compile_linux_arm64.yml b/.github/workflows/compile_linux_arm64.yml deleted file mode 100644 index c67d8153969e..000000000000 --- a/.github/workflows/compile_linux_arm64.yml +++ /dev/null @@ -1,51 +0,0 @@ -name: Linux ARM64 Targets - -on: - push: - branches: - - 'main' - pull_request: - branches: - - '*' - -jobs: - build: - runs-on: ubuntu-latest - container: px4io/px4-dev-aarch64:2021-09-08 - strategy: - matrix: - config: [ - scumaker_pilotpi_arm64, - ] - steps: - - uses: actions/checkout@v4 - with: - token: ${{secrets.ACCESS_TOKEN}} - - - name: Prepare ccache timestamp - id: ccache_cache_timestamp - shell: cmake -P {0} - run: | - string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC) - message("::set-output name=timestamp::${current_date}") - - name: ccache cache files - uses: actions/cache@v3 - with: - path: ~/.ccache - key: ${{matrix.config}}-ccache-${{steps.ccache_cache_timestamp.outputs.timestamp}} - restore-keys: ${{matrix.config}}-ccache- - - name: setup ccache - run: | - 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 = 100M" >> ~/.ccache/ccache.conf - echo "hash_dir = false" >> ~/.ccache/ccache.conf - ccache -s - ccache -z - - - name: make ${{matrix.config}} - run: make ${{matrix.config}} - - name: ccache post-run - run: ccache -s diff --git a/.github/workflows/compile_macos.yml b/.github/workflows/compile_macos.yml deleted file mode 100644 index 71db6ce4a312..000000000000 --- a/.github/workflows/compile_macos.yml +++ /dev/null @@ -1,56 +0,0 @@ -name: MacOS build - -on: - push: - branches: - - 'main' - pull_request: - branches: - - '*' - -jobs: - build: - runs-on: macos-10.15 - strategy: - matrix: - config: [ - px4_fmu-v5_default, - px4_sitl - #tests, # includes px4_sitl - ] - steps: - - uses: actions/checkout@v4 - with: - token: ${{secrets.ACCESS_TOKEN}} - - - name: setup - run: ./Tools/setup/macos.sh; ./Tools/setup/macos.sh - - - name: Prepare ccache timestamp - id: ccache_cache_timestamp - shell: cmake -P {0} - run: | - string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC) - message("::set-output name=timestamp::${current_date}") - - name: ccache cache files - uses: actions/cache@v3 - with: - path: ~/.ccache - key: macos_${{matrix.config}}-ccache-${{steps.ccache_cache_timestamp.outputs.timestamp}} - restore-keys: macos_${{matrix.config}}-ccache- - - name: setup ccache - run: | - 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 = 40M" >> ~/.ccache/ccache.conf - echo "hash_dir = false" >> ~/.ccache/ccache.conf - ccache -s - ccache -z - - - name: make ${{matrix.config}} - run: | - ccache -z - make ${{matrix.config}} - ccache -s diff --git a/.github/workflows/compile_nuttx.yml b/.github/workflows/compile_nuttx.yml deleted file mode 100644 index d9ff5cce2e9b..000000000000 --- a/.github/workflows/compile_nuttx.yml +++ /dev/null @@ -1,129 +0,0 @@ -name: Nuttx Targets - -on: - push: - branches: - - 'main' - pull_request: - branches: - - '*' - -jobs: - build: - runs-on: ubuntu-latest - container: px4io/px4-dev-nuttx-focal:2021-09-08 - strategy: - fail-fast: false - matrix: - config: [ - airmind_mindpx-v2, - ark_can-flow, - ark_can-gps, - ark_can-rtk-gps, - ark_cannode, - ark_fmu-v6x, - atl_mantis-edu, - av_x-v1, - bitcraze_crazyflie, - bitcraze_crazyflie21, - cuav_can-gps-v1, - cuav_nora, - cuav_x7pro, - cubepilot_cubeorange, - cubepilot_cubeorangeplus, - cubepilot_cubeyellow, - diatone_mamba-f405-mk2, - freefly_can-rtk-gps, - holybro_can-gps-v1, - holybro_durandal-v1, - holybro_kakutef7, - holybro_kakuteh7, - holybro_pix32v5, - matek_gnss-m9n-f4, - matek_h743, - matek_h743-mini, - matek_h743-slim, - modalai_fc-v1, - modalai_fc-v2, - mro_ctrl-zero-f7, - mro_ctrl-zero-f7-oem, - mro_ctrl-zero-h7, - mro_ctrl-zero-h7-oem, - mro_pixracerpro, - mro_x21, - mro_x21-777, - nxp_fmuk66-e, - nxp_fmuk66-v3, - nxp_mr-canhubk3, - nxp_ucans32k146, - omnibus_f4sd, - px4_fmu-v2, - px4_fmu-v3, - px4_fmu-v4, - px4_fmu-v4pro, - px4_fmu-v5, - px4_fmu-v5x, - px4_fmu-v6c, - px4_fmu-v6u, - px4_fmu-v6x, - px4_fmu-v6xrt, - raspberrypi_pico, - sky-drones_smartap-airlink, - spracing_h7extreme, - uvify_core - ] - steps: - - uses: actions/checkout@v4 - with: - token: ${{secrets.ACCESS_TOKEN}} - - - name: Prepare ccache timestamp - id: ccache_cache_timestamp - shell: cmake -P {0} - run: | - string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC) - message("::set-output name=timestamp::${current_date}") - - name: ccache cache files - uses: actions/cache@v3 - with: - path: ~/.ccache - key: ${{matrix.config}}-ccache-${{steps.ccache_cache_timestamp.outputs.timestamp}} - restore-keys: ${{matrix.config}}-ccache- - - name: setup ccache - run: | - 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 = 120M" >> ~/.ccache/ccache.conf - echo "hash_dir = false" >> ~/.ccache/ccache.conf - ccache -s - ccache -z - - - name: make all_variants_${{matrix.config}} - run: make all_variants_${{matrix.config}} - timeout-minutes: 45 - - name: make ${{matrix.config}} bloaty_compileunits - run: make ${{matrix.config}} bloaty_compileunits || true - - name: make ${{matrix.config}} bloaty_inlines - run: make ${{matrix.config}} bloaty_inlines || true - - name: make ${{matrix.config}} bloaty_segments - run: make ${{matrix.config}} bloaty_segments || true - - name: make ${{matrix.config}} bloaty_symbols - run: make ${{matrix.config}} bloaty_symbols || true - - name: make ${{matrix.config}} bloaty_templates - run: make ${{matrix.config}} bloaty_templates || true - - name: make ${{matrix.config}} bloaty_ram - run: make ${{matrix.config}} bloaty_ram || true - - name: make ${{matrix.config}} bloaty_compare_master - run: make ${{matrix.config}} bloaty_compare_master || true - - name: ccache post-run - run: ccache -s - - - name: Upload px4 package - uses: actions/upload-artifact@v3.1.3 - with: - name: px4_package_${{matrix.config}} - path: | - build/**/*.px4 - build/**/*.bin diff --git a/.github/workflows/deploy_all.yml b/.github/workflows/deploy_all.yml deleted file mode 100644 index 611e0b46b9a5..000000000000 --- a/.github/workflows/deploy_all.yml +++ /dev/null @@ -1,54 +0,0 @@ -name: Deploy metadata for all targets - -on: - push: - branches: - - 'main' - - 'release/*' - - 'pr-metadata-test' - -jobs: - enumerate_targets: - runs-on: ubuntu-latest - container: px4io/px4-dev-base-focal:2021-09-08 - outputs: - matrix: ${{ steps.set-matrix.outputs.matrix }} - steps: - - uses: actions/checkout@v4 - with: - token: ${{secrets.ACCESS_TOKEN}} - - id: set-matrix - run: echo "::set-output name=matrix::$(./Tools/generate_board_targets_json.py)" - build: - runs-on: ubuntu-latest - needs: enumerate_targets - strategy: - matrix: ${{fromJson(needs.enumerate_targets.outputs.matrix)}} - container: px4io/px4-dev-${{ matrix.container }}:2021-09-08 - steps: - - uses: actions/checkout@v4 - with: - token: ${{secrets.ACCESS_TOKEN}} - - - name: make ${{matrix.target}} - run: make ${{matrix.target}} - - - name: parameter & events metadata - run: | - make ${{matrix.target}} ver_gen events_json actuators_json - ./src/lib/version/get_git_tag_or_branch_version.sh build/${{ matrix.target }} >> $GITHUB_ENV - cd build/${{ matrix.target }} - mkdir _metadata || true - cp parameters.* events/*.xz actuators.json* _metadata - - - uses: jakejarvis/s3-sync-action@master - with: - args: --acl public-read - env: - AWS_S3_BUCKET: 'px4-travis' - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - AWS_REGION: 'us-west-1' - SOURCE_DIR: 'build/${{ matrix.target }}/_metadata/' - DEST_DIR: 'Firmware/${{ env.version }}/${{ matrix.target }}/' - diff --git a/.github/workflows/ekf_functional_change_indicator.yml b/.github/workflows/ekf_functional_change_indicator.yml deleted file mode 100644 index b52cb8fe4b7b..000000000000 --- a/.github/workflows/ekf_functional_change_indicator.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: EKF Change Indicator - -on: pull_request - -jobs: - unit_tests: - runs-on: ubuntu-latest - container: px4io/px4-dev-base-focal:2021-09-08 - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: checkout newest version of branch - run: | - git fetch origin pull/${{github.event.pull_request.number}}/head:${{github.head_ref}} - git checkout ${GITHUB_HEAD_REF} - - name: main test - run: make tests TESTFILTER=EKF - - name: Check if there is a functional change - run: git diff --exit-code - working-directory: src/modules/ekf2/test/change_indication diff --git a/.github/workflows/ekf_update_change_indicator.yml b/.github/workflows/ekf_update_change_indicator.yml deleted file mode 100644 index ba095d8bfb7f..000000000000 --- a/.github/workflows/ekf_update_change_indicator.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: EKF Update Change Indicator - -on: push - -jobs: - unit_tests: - runs-on: ubuntu-latest - container: px4io/px4-dev-base-focal:2021-09-08 - env: - GIT_COMMITTER_EMAIL: bot@px4.io - GIT_COMMITTER_NAME: PX4BuildBot - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: main test updates change indication files - run: make tests TESTFILTER=EKF - - name: Check if there exists diff and save result in variable - run: echo "CHANGE_INDICATED=$(git diff --exit-code --output=/dev/null || echo $?)" >> $GITHUB_ENV - working-directory: src/modules/ekf2/test/change_indication - - name: auto-commit any changes to change indication - uses: stefanzweifel/git-auto-commit-action@v5 - with: - commit_message: '[AUTO COMMIT] update change indication' - commit_user_name: ${GIT_COMMITTER_NAME} - commit_user_email: ${GIT_COMMITTER_EMAIL} - - if: ${{env.CHANGE_INDICATED}} - name: if there is a functional change, fail check - run: exit 1 diff --git a/.github/workflows/failsafe_sim.yml b/.github/workflows/failsafe_sim.yml deleted file mode 100644 index 6d5e73d5a521..000000000000 --- a/.github/workflows/failsafe_sim.yml +++ /dev/null @@ -1,44 +0,0 @@ -name: Failsafe Simulator Build - -on: - push: - branches: - - 'main' - pull_request: - branches: - - '*' - -jobs: - build: - runs-on: ubuntu-latest - defaults: - run: - shell: bash - strategy: - fail-fast: false - matrix: - check: [ - "failsafe_web", - ] - container: - image: px4io/px4-dev-nuttx-focal:2021-09-08 - options: --privileged --ulimit core=-1 --security-opt seccomp=unconfined - steps: - - uses: actions/checkout@v1 - with: - token: ${{ secrets.ACCESS_TOKEN }} - - - name: check environment - run: | - export - ulimit -a - - name: install emscripten - run: | - git clone https://github.com/emscripten-core/emsdk.git _emscripten_sdk - cd _emscripten_sdk - ./emsdk install latest - ./emsdk activate latest - - name: ${{matrix.check}} - run: | - . ./_emscripten_sdk/emsdk_env.sh - make ${{matrix.check}} diff --git a/.github/workflows/mavros_mission_tests.yml b/.github/workflows/mavros_mission_tests.yml deleted file mode 100644 index a50fa120e288..000000000000 --- a/.github/workflows/mavros_mission_tests.yml +++ /dev/null @@ -1,139 +0,0 @@ -name: MAVROS Mission Tests - -on: - push: - branches: - - 'main' - pull_request: - branches: - - '*' - -jobs: - build: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - config: - - {vehicle: "iris", mission: "MC_mission_box", build_type: "RelWithDebInfo"} - - {vehicle: "rover", mission: "rover_mission_1", build_type: "RelWithDebInfo"} - #- {vehicle: "plane", mission: "FW_mission_1", build_type: "RelWithDebInfo"} - #- {vehicle: "plane_catapult",mission: "FW_mission_1", build_type: "RelWithDebInfo"} - #- {vehicle: "standard_vtol", mission: "VTOL_mission_1", build_type: "Coverage"} - #- {vehicle: "standard_vtol", mission: "VTOL_mission_1", build_type: "AddressSanitizer"} - #- {vehicle: "tailsitter", mission: "VTOL_mission_1", build_type: "RelWithDebInfo"} - #- {vehicle: "tiltrotor", mission: "VTOL_mission_1", build_type: "RelWithDebInfo"} - - container: - image: px4io/px4-dev-ros-melodic:2021-09-08 - options: --privileged --ulimit core=-1 --security-opt seccomp=unconfined - steps: - - uses: actions/checkout@v4 - with: - token: ${{ secrets.ACCESS_TOKEN }} - - - name: Prepare ccache timestamp - id: ccache_cache_timestamp - shell: cmake -P {0} - run: | - string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC) - message("::set-output name=timestamp::${current_date}") - - name: ccache cache files - uses: actions/cache@v3 - with: - path: ~/.ccache - key: sitl_tests-${{matrix.config.build_type}}-ccache-${{steps.ccache_cache_timestamp.outputs.timestamp}} - restore-keys: sitl_tests-${{matrix.config.build_type}}-ccache- - - name: setup ccache - run: | - 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 = 100M" >> ~/.ccache/ccache.conf - echo "hash_dir = false" >> ~/.ccache/ccache.conf - ccache -s - ccache -z - - - name: check environment - run: | - export - ulimit -a - - name: Build PX4 and sitl_gazebo-classic - env: - PX4_CMAKE_BUILD_TYPE: ${{matrix.config.build_type}} - run: | - ccache -z - make px4_sitl_default - make px4_sitl_default sitl_gazebo-classic - ccache -s - - - name: Core dump settings - run: | - ulimit -c unlimited - echo "`pwd`/%e.core" > /proc/sys/kernel/core_pattern - - - name: Run SITL tests - env: - PX4_CMAKE_BUILD_TYPE: ${{matrix.config.build_type}} - run: | - export - ./test/rostest_px4_run.sh mavros_posix_test_mission.test mission:=${{matrix.config.mission}} vehicle:=${{matrix.config.vehicle}} - timeout-minutes: 45 - - - name: Look at core files - if: failure() - run: gdb build/px4_sitl_default/bin/px4 px4.core -ex "thread apply all bt" -ex "quit" - - name: Upload px4 coredump - if: failure() - uses: actions/upload-artifact@v3.1.3 - with: - name: coredump - path: px4.core - - - name: ecl EKF analysis - if: always() - run: ./Tools/ecl_ekf/process_logdata_ekf.py ~/.ros/log/*/*.ulg || true - - - name: Upload logs to flight review - if: always() - run: ./Tools/upload_log.py -q --description "${GITHUB_WORKFLOW} ${GITHUB_RUN_ID}" --feedback "${GITHUB_WORKFLOW} ${GITHUB_RUN_ID} ${GITHUB_REPOSITORY} ${GITHUB_REF}" --source CI ~/.ros/log/*/*.ulg - - - name: Upload px4 binary - if: failure() - uses: actions/upload-artifact@v3.1.3 - with: - name: binary - path: build/px4_sitl_default/bin/px4 - - - name: Store PX4 log - if: failure() - uses: actions/upload-artifact@v3.1.3 - with: - name: px4_log - path: ~/.ros/log/*/*.ulg - - - name: Store ROS log - if: failure() - uses: actions/upload-artifact@v3.1.3 - with: - name: ros_log - path: ~/.ros/**/rostest-*.log - - # Report test coverage - - name: Upload coverage - if: contains(matrix.config.build_type, 'Coverage') - run: | - git config --global credential.helper "" # disable the keychain credential helper - git config --global --add credential.helper store # enable the local store credential helper - echo "https://x-access-token:${{ secrets.ACCESS_TOKEN }}@github.com" >> ~/.git-credentials # add credential - git config --global url."https://github.com/".insteadof git@github.com: # credentials add credential - mkdir -p coverage - lcov --directory build/px4_sitl_default --base-directory build/px4_sitl_default --gcov-tool gcov --capture -o coverage/lcov.info - - name: Upload coverage information to Codecov - if: contains(matrix.config.build_type, 'Coverage') - uses: codecov/codecov-action@v3 - with: - token: ${{ secrets.CODECOV_TOKEN }} - flags: mavros_mission - file: coverage/lcov.info diff --git a/.github/workflows/mavros_offboard_tests.yml b/.github/workflows/mavros_offboard_tests.yml deleted file mode 100644 index 72f1f87a62d9..000000000000 --- a/.github/workflows/mavros_offboard_tests.yml +++ /dev/null @@ -1,134 +0,0 @@ -name: MAVROS Offboard Tests - -on: - push: - branches: - - 'main' - pull_request: - branches: - - '*' - -jobs: - build: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - config: - - {test_file: "mavros_posix_tests_offboard_posctl.test", vehicle: "iris", build_type: "RelWithDebInfo"} - #- {test_file: "mavros_posix_tests_offboard_attctl.test", vehicle: "iris", build_type: "RelWithDebInfo"} - #- {test_file: "mavros_posix_tests_offboard_rpyrt_ctl.test", vehicle: "iris", build_type: "RelWithDebInfo"} - - container: - image: px4io/px4-dev-ros-melodic:2021-09-08 - options: --privileged --ulimit core=-1 --security-opt seccomp=unconfined - steps: - - uses: actions/checkout@v4 - with: - token: ${{ secrets.ACCESS_TOKEN }} - - - name: Prepare ccache timestamp - id: ccache_cache_timestamp - shell: cmake -P {0} - run: | - string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC) - message("::set-output name=timestamp::${current_date}") - - name: ccache cache files - uses: actions/cache@v3 - with: - path: ~/.ccache - key: sitl_tests-${{matrix.config.build_type}}-ccache-${{steps.ccache_cache_timestamp.outputs.timestamp}} - restore-keys: sitl_tests-${{matrix.config.build_type}}-ccache- - - name: setup ccache - run: | - 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 = 100M" >> ~/.ccache/ccache.conf - echo "hash_dir = false" >> ~/.ccache/ccache.conf - ccache -s - ccache -z - - - name: check environment - run: | - export - ulimit -a - - name: Build PX4 and sitl_gazebo-classic - env: - PX4_CMAKE_BUILD_TYPE: ${{matrix.config.build_type}} - run: | - ccache -z - make px4_sitl_default - make px4_sitl_default sitl_gazebo-classic - ccache -s - - - name: Core dump settings - run: | - ulimit -c unlimited - echo "`pwd`/%e.core" > /proc/sys/kernel/core_pattern - - - name: Run SITL tests - env: - PX4_CMAKE_BUILD_TYPE: ${{matrix.config.build_type}} - run: | - export - ./test/rostest_px4_run.sh ${{matrix.config.test_file}} vehicle:=${{matrix.config.vehicle}} - timeout-minutes: 45 - - - name: Look at core files - if: failure() - run: gdb build/px4_sitl_default/bin/px4 px4.core -ex "thread apply all bt" -ex "quit" - - name: Upload px4 coredump - if: failure() - uses: actions/upload-artifact@v3.1.3 - with: - name: coredump - path: px4.core - - - name: ecl EKF analysis - if: always() - run: ./Tools/ecl_ekf/process_logdata_ekf.py ~/.ros/log/*/*.ulg || true - - - name: Upload logs to flight review - if: always() - run: ./Tools/upload_log.py -q --description "${GITHUB_WORKFLOW} ${GITHUB_RUN_ID}" --feedback "${GITHUB_WORKFLOW} ${GITHUB_RUN_ID} ${GITHUB_REPOSITORY} ${GITHUB_REF}" --source CI ~/.ros/log/*/*.ulg - - - name: Upload px4 binary - if: failure() - uses: actions/upload-artifact@v3.1.3 - with: - name: binary - path: build/px4_sitl_default/bin/px4 - - - name: Store PX4 log - if: failure() - uses: actions/upload-artifact@v3.1.3 - with: - name: px4_log - path: ~/.ros/log/*/*.ulg - - - name: Store ROS log - if: failure() - uses: actions/upload-artifact@v3.1.3 - with: - name: ros_log - path: ~/.ros/**/rostest-*.log - - # Report test coverage - - name: Upload coverage - if: contains(matrix.config.build_type, 'Coverage') - run: | - git config --global credential.helper "" # disable the keychain credential helper - git config --global --add credential.helper store # enable the local store credential helper - echo "https://x-access-token:${{ secrets.ACCESS_TOKEN }}@github.com" >> ~/.git-credentials # add credential - git config --global url."https://github.com/".insteadof git@github.com: # credentials add credential - mkdir -p coverage - lcov --directory build/px4_sitl_default --base-directory build/px4_sitl_default --gcov-tool gcov --capture -o coverage/lcov.info - - name: Upload coverage information to Codecov - if: contains(matrix.config.build_type, 'Coverage') - uses: codecov/codecov-action@v3 - with: - token: ${{ secrets.CODECOV_TOKEN }} - flags: mavros_offboard - file: coverage/lcov.info diff --git a/.github/workflows/metadata.yml b/.github/workflows/metadata.yml deleted file mode 100644 index d9c90eda4772..000000000000 --- a/.github/workflows/metadata.yml +++ /dev/null @@ -1,131 +0,0 @@ -name: Metadata - -on: - push: - branches: - - 'main' - - 'release/*' - - 'pr-metadata-test' - -jobs: - - airframe: - runs-on: ubuntu-latest - container: px4io/px4-dev-base-focal:2021-09-08 - steps: - - uses: actions/checkout@v4 - with: - token: ${{ secrets.ACCESS_TOKEN }} - - - name: airframe metadata - run: | - make airframe_metadata - ./src/lib/version/get_git_tag_or_branch_version.sh build/px4_sitl_default >> $GITHUB_ENV - cd build/px4_sitl_default/docs - # TODO: deploy to userguide gitbook - - - uses: jakejarvis/s3-sync-action@master - with: - args: --acl public-read - env: - AWS_S3_BUCKET: 'px4-travis' - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - AWS_REGION: 'us-west-1' - SOURCE_DIR: 'build/px4_sitl_default/docs/' - DEST_DIR: 'Firmware/${{ env.version }}/_general/' - - module: - runs-on: ubuntu-latest - container: px4io/px4-dev-base-focal:2021-09-08 - steps: - - uses: actions/checkout@v4 - with: - token: ${{ secrets.ACCESS_TOKEN }} - - - name: module documentation - run: | - make module_documentation - cd build/px4_sitl_default/docs - ls -ls * - # TODO: deploy to userguide gitbook and s3 - - parameter: - runs-on: ubuntu-latest - container: px4io/px4-dev-base-focal:2021-09-08 - steps: - - uses: actions/checkout@v4 - with: - token: ${{ secrets.ACCESS_TOKEN }} - - - name: parameter metadata - run: | - make parameters_metadata - ./src/lib/version/get_git_tag_or_branch_version.sh build/px4_sitl_default >> $GITHUB_ENV - - - uses: jakejarvis/s3-sync-action@master - with: - args: --acl public-read - env: - AWS_S3_BUCKET: 'px4-travis' - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - AWS_REGION: 'us-west-1' - SOURCE_DIR: 'build/px4_sitl_default/docs/' - DEST_DIR: 'Firmware/${{ env.version }}/_general/' - - events: - runs-on: ubuntu-latest - container: px4io/px4-dev-base-focal:2021-09-08 - steps: - - uses: actions/checkout@v4 - with: - token: ${{ secrets.ACCESS_TOKEN }} - - - name: events metadata - run: | - make extract_events - ./src/lib/version/get_git_tag_or_branch_version.sh build/px4_sitl_default >> $GITHUB_ENV - cd build/px4_sitl_default - mkdir _events_full || true - cp events/all_events_full.json.xz _events_full/all_events.json.xz - - - uses: jakejarvis/s3-sync-action@master - with: - args: --acl public-read - env: - AWS_S3_BUCKET: 'px4-travis' - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - AWS_REGION: 'us-west-1' - SOURCE_DIR: 'build/px4_sitl_default/_events_full/' - DEST_DIR: 'Firmware/${{ env.version }}/_general/' - - uorb_graph: - runs-on: ubuntu-latest - container: px4io/px4-dev-nuttx-focal:2021-09-08 - steps: - - uses: actions/checkout@v4 - with: - token: ${{ secrets.ACCESS_TOKEN }} - - - name: uORB graph - run: | - make uorb_graphs - cd Tools/uorb_graph - ls -ls * - # TODO: deploy graph_px4_sitl.json to S3 px4-travis:Firmware/master/ - - ROS2_msgs: - runs-on: ubuntu-latest - container: px4io/px4-dev-base-focal:2021-09-08 - steps: - - uses: actions/checkout@v4 - with: - token: ${{ secrets.ACCESS_TOKEN }} - - - name: PX4 ROS2 msgs - run: | - git clone https://github.com/PX4/px4_msgs.git - rm px4_msgs/msg/*.msg - cp msg/*.msg px4_msgs/msg/ diff --git a/.github/workflows/python_checks.yml b/.github/workflows/python_checks.yml deleted file mode 100644 index 0ca89a87c5e7..000000000000 --- a/.github/workflows/python_checks.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: Python CI Checks - -on: - push: - branches: - - 'main' - pull_request: - branches: - - '*' - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - token: ${{ secrets.ACCESS_TOKEN }} - - name: Install Python3 - run: sudo apt-get install python3 python3-setuptools python3-pip -y - - name: Install tools - run: pip3 install --user mypy types-requests flake8 - - name: Check MAVSDK test scripts with mypy - run: $HOME/.local/bin/mypy --strict test/mavsdk_tests/*.py - - name: Check MAVSDK test scripts with flake8 - run: $HOME/.local/bin/flake8 test/mavsdk_tests/*.py diff --git a/.github/workflows/sitl_tests.yml b/.github/workflows/sitl_tests.yml deleted file mode 100644 index 8729ad8b2ba4..000000000000 --- a/.github/workflows/sitl_tests.yml +++ /dev/null @@ -1,135 +0,0 @@ -name: SITL Tests - -on: - push: - branches: - - 'main' - pull_request: - branches: - - '*' - -jobs: - build: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - config: - - {model: "iris", latitude: "59.617693", longitude: "-151.145316", altitude: "48", build_type: "RelWithDebInfo" } # Alaska - # - {model: "standard_vtol", latitude: "-38.071235", longitude: "145.281220", altitude: "31", build_type: "AddressSanitizer" } # Australia - - {model: "tailsitter" , latitude: "29.660316", longitude: "-82.316658", altitude: "30", build_type: "RelWithDebInfo" } # Florida - - {model: "standard_vtol", latitude: "47.397742", longitude: "8.545594", altitude: "488", build_type: "Coverage" } # Zurich - - container: - image: px4io/px4-dev-simulation-focal:2021-09-08 - options: --privileged --ulimit core=-1 --security-opt seccomp=unconfined - steps: - - uses: actions/checkout@v4 - with: - token: ${{ secrets.ACCESS_TOKEN }} - - - name: Download MAVSDK - run: wget "https://github.com/mavlink/MAVSDK/releases/download/v$(cat test/mavsdk_tests/MAVSDK_VERSION)/libmavsdk-dev_$(cat test/mavsdk_tests/MAVSDK_VERSION)_ubuntu20.04_amd64.deb" - - name: Install MAVSDK - run: dpkg -i "libmavsdk-dev_$(cat test/mavsdk_tests/MAVSDK_VERSION)_ubuntu20.04_amd64.deb" - - - name: Prepare ccache timestamp - id: ccache_cache_timestamp - shell: cmake -P {0} - run: | - string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC) - message("::set-output name=timestamp::${current_date}") - - name: ccache cache files - uses: actions/cache@v3 - with: - path: ~/.ccache - key: sitl_tests-${{matrix.config.build_type}}-ccache-${{steps.ccache_cache_timestamp.outputs.timestamp}} - restore-keys: sitl_tests-${{matrix.config.build_type}}-ccache- - - name: setup ccache - run: | - 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 = 100M" >> ~/.ccache/ccache.conf - echo "hash_dir = false" >> ~/.ccache/ccache.conf - ccache -s - ccache -z - - - name: check environment - env: - PX4_HOME_LAT: ${{matrix.config.latitude}} - PX4_HOME_LON: ${{matrix.config.longitude}} - PX4_HOME_ALT: ${{matrix.config.altitude}} - PX4_CMAKE_BUILD_TYPE: ${{matrix.config.build_type}} - run: | - export - ulimit -a - - name: Build PX4 - env: - PX4_CMAKE_BUILD_TYPE: ${{matrix.config.build_type}} - run: make px4_sitl_default - - name: ccache post-run px4/firmware - run: ccache -s - - name: Build SITL Gazebo - env: - PX4_CMAKE_BUILD_TYPE: ${{matrix.config.build_type}} - run: make px4_sitl_default sitl_gazebo-classic - - name: ccache post-run sitl_gazebo-classic - run: ccache -s - - name: Build MAVSDK tests - env: - PX4_CMAKE_BUILD_TYPE: ${{matrix.config.build_type}} - DONT_RUN: 1 - run: make px4_sitl_default sitl_gazebo-classic mavsdk_tests - - name: ccache post-run mavsdk_tests - run: ccache -s - - - name: Core dump settings - run: | - ulimit -c unlimited - echo "`pwd`/%e.core" > /proc/sys/kernel/core_pattern - - - name: Run SITL tests - env: - PX4_HOME_LAT: ${{matrix.config.latitude}} - PX4_HOME_LON: ${{matrix.config.longitude}} - PX4_HOME_ALT: ${{matrix.config.altitude}} - PX4_CMAKE_BUILD_TYPE: ${{matrix.config.build_type}} - run: test/mavsdk_tests/mavsdk_test_runner.py --speed-factor 20 --abort-early --model ${{matrix.config.model}} --upload test/mavsdk_tests/configs/sitl.json --verbose - timeout-minutes: 45 - - - name: Look at core files - if: failure() - run: gdb build/px4_sitl_default/bin/px4 px4.core -ex "thread apply all bt" -ex "quit" - - name: Upload px4 coredump - if: failure() - uses: actions/upload-artifact@v3.1.3 - with: - name: coredump - path: px4.core - - - name: Upload px4 binary - if: failure() - uses: actions/upload-artifact@v3.1.3 - with: - name: binary - path: build/px4_sitl_default/bin/px4 - - # Report test coverage - - name: Upload coverage - if: contains(matrix.config.build_type, 'Coverage') - run: | - git config --global credential.helper "" # disable the keychain credential helper - git config --global --add credential.helper store # enable the local store credential helper - echo "https://x-access-token:${{ secrets.ACCESS_TOKEN }}@github.com" >> ~/.git-credentials # add credential - git config --global url."https://github.com/".insteadof git@github.com: # credentials add credential - mkdir -p coverage - lcov --directory build/px4_sitl_default --base-directory build/px4_sitl_default --gcov-tool gcov --capture -o coverage/lcov.info - - name: Upload coverage information to Codecov - if: contains(matrix.config.build_type, 'Coverage') - uses: codecov/codecov-action@v3 - with: - token: ${{ secrets.CODECOV_TOKEN }} - flags: mavsdk - file: coverage/lcov.info diff --git a/.github/workflows/tiiuae-blackduck-scan.yaml b/.github/workflows/tiiuae-blackduck-scan.yaml deleted file mode 100644 index 47c9d72601c5..000000000000 --- a/.github/workflows/tiiuae-blackduck-scan.yaml +++ /dev/null @@ -1,56 +0,0 @@ -name: tiiuae-blackduck-scan - -on: - push: - tags: - - 'v1.14.0-*' - workflow_dispatch: - -jobs: - scan: - name: run blackduck scan - runs-on: ubuntu-latest - steps: - - name: Checkout px4-firmware - uses: actions/checkout@v4 - with: - token: ${{ secrets.GH_REPO_TOKEN }} - submodules: 'recursive' - path: px4-firmware - fetch-depth: 0 - - name: Run the scan - run: | - set -exu - - # initialise configuration values - bd_project_name=px4-1.14.0 - bd_project_version=${{ github.ref_name }} - bd_project_phase=DEVELOPMENT - workdir=$(pwd) - blackduck_url="https://blackduck.ssrc.fi" - blackduck_token=${{ secrets.BLACKDUCK_ACCESS_TOKEN }} - project_id="7900cb41-3b7e-4985-8935-5d6c6b996db3" - bdscan_output_file=bdscan_output.log - - # run the actual scan - bash <(curl -s -L https://detect.synopsys.com/detect8.sh) \ - --blackduck.api.token=$blackduck_token \ - --blackduck.trust.cert=true \ - --blackduck.url=$blackduck_url \ - --detect.blackduck.signature.scanner.snippet.matching=FULL_SNIPPET_MATCHING \ - --detect.blackduck.signature.scanner.upload.source.mode=true \ - --detect.excluded.detector.types=PEAR \ - --detect.impact.analysis.enabled=true \ - --detect.project.application.id=$bd_project_name \ - --detect.project.name=$bd_project_name \ - --detect.project.version.name=$bd_project_version \ - --detect.project.version.phase=$bd_project_phase \ - --detect.source.path=$workdir \ - --detect.target.type=SOURCE \ - --detect.timeout=6000 \ - --detect.tools=ALL \ - --detect.wait.for.results=true \ - | tee ${bdscan_output_file} - - # find blackduck link from output log: - grep 'Black Duck Project BOM:' ${bdscan_output_file} |sed 's/^.*Black Duck Project BOM: //g' >> $GITHUB_STEP_SUMMARY diff --git a/.github/workflows/tiiuae-builder-images.yaml b/.github/workflows/tiiuae-builder-images.yaml deleted file mode 100644 index 14f699106c87..000000000000 --- a/.github/workflows/tiiuae-builder-images.yaml +++ /dev/null @@ -1,42 +0,0 @@ -name: tiiuae-builder-images - -on: - # Run only manually - workflow_dispatch: - -permissions: - contents: read - packages: write - -jobs: - hw-builder-image: - name: create docker builder base image - runs-on: ubuntu-latest - steps: - - name: Checkout px4-firmware - uses: actions/checkout@v4 - with: - path: px4-firmware - fetch-depth: 0 - - name: Docker meta - id: meta - uses: docker/metadata-action@v5 - with: - images: ghcr.io/tiiuae/px4-firmware-builder-base - tags: | - type=raw,value=latest - type=sha - - name: Login to GitHub Container Registry - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - name: Build builder base image and push - uses: docker/build-push-action@v5 - with: - context: . - file: ./px4-firmware/packaging/Dockerfile.build_env_pre - push: true - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} diff --git a/.github/workflows/tiiuae-check-format.yml b/.github/workflows/tiiuae-check-format.yml deleted file mode 100644 index 717e5b4189ef..000000000000 --- a/.github/workflows/tiiuae-check-format.yml +++ /dev/null @@ -1,18 +0,0 @@ -# Make check_format before PULLREQUEST. - - -name: check_format - -on: [pull_request] - -jobs: - main: - name: Validate testfile - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Lint - run: | - sudo apt update -y && sudo apt install -y --no-install-recommends make astyle - make check_format diff --git a/.github/workflows/tiiuae-codeql.yaml b/.github/workflows/tiiuae-codeql.yaml new file mode 100644 index 000000000000..4547e99c5868 --- /dev/null +++ b/.github/workflows/tiiuae-codeql.yaml @@ -0,0 +1,40 @@ +name: "CodeQL" + +on: + push: + pull_request: + branches: [main] + workflow_dispatch: + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + security-events: write + actions: read + + strategy: + fail-fast: false + matrix: + language: [c++] + + # Specify the container in which actions will run + container: + image: ghcr.io/tiiuae/px4-firmware-builder-base:latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + token: ${{ secrets.GH_REPO_TOKEN }} + submodules: recursive + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: ${{ matrix.language }} + - name: Build + run: | + ./packaging/build_px4fw.sh ssrc_saluki-v2_default + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 diff --git a/.github/workflows/tiiuae-coverity-scan-image.yaml b/.github/workflows/tiiuae-coverity-scan-image.yaml deleted file mode 100644 index 34db9e3a188c..000000000000 --- a/.github/workflows/tiiuae-coverity-scan-image.yaml +++ /dev/null @@ -1,47 +0,0 @@ -name: tiiuae-coverity-scan-image - -on: - # Run only manually - workflow_dispatch: - -permissions: - contents: read - packages: write - -jobs: - coverity-scan-image: - name: create coverity scan image - runs-on: ubuntu-latest - steps: - - name: Checkout px4-firmware - uses: actions/checkout@v4 - with: - path: px4-firmware - fetch-depth: 0 - - name: Docker meta - id: meta - uses: docker/metadata-action@v5 - with: - images: ghcr.io/tiiuae/px4-coverity-scan-image - tags: | - type=raw,value=latest - type=sha - - name: Login to GitHub Container Registry - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - name: Build and push coverity scan image - uses: docker/build-push-action@v5 - with: - context: . - file: ./px4-firmware/packaging/Dockerfile.coverity - push: true - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} - build-args: | - "COVERITY_DOCKER_REGISTRY_USERNAME=${{ secrets.COVERITY_DOCKER_REGISTRY_USERNAME }}" - "COVERITY_DOCKER_REGISTRY_ACCESS_TOKEN=${{ secrets.COVERITY_DOCKER_REGISTRY_ACCESS_TOKEN }}" - "COVERITY_LICENSE_DAT_B64=${{ secrets.COVERITY_LICENSE_DAT_B64 }}" - "COVERITY_ACCESS_TOKEN_B64=${{ secrets.COVERITY_ACCESS_TOKEN_B64 }}" diff --git a/.github/workflows/tiiuae-coverity-scan.yaml b/.github/workflows/tiiuae-coverity-scan.yaml deleted file mode 100644 index 13b6ec68f898..000000000000 --- a/.github/workflows/tiiuae-coverity-scan.yaml +++ /dev/null @@ -1,36 +0,0 @@ -name: tiiuae-px4-coverity-scan - -on: - workflow_dispatch: - pull_request: - branches: [ main ] -jobs: - coverity: - runs-on: px4-self-hosted-coverity - steps: - - name: Checkout px4-firmware - uses: actions/checkout@v4 - with: - token: ${{ secrets.GH_REPO_TOKEN }} - submodules: 'recursive' - fetch-depth: 0 - - name: Fetch submodule tags - run: | - git submodule foreach --recursive git fetch --tags - - name: Login to GitHub Container Registry - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - name: Run coverity scan - run: - docker run --rm -v "$(pwd):/main_ws" ghcr.io/tiiuae/px4-coverity-scan-image:latest - - name: Update summary - run: - cat cov-analyze-result.txt >> $GITHUB_STEP_SUMMARY - - name: Upload coverity scan results - uses: actions/upload-artifact@v3.1.3 - with: - name: coverity-html-report-${{ github.event.repository.name }} - path: coverity-output diff --git a/.github/workflows/tiiuae-sitl-gzsim.yaml b/.github/workflows/tiiuae-sitl-gzsim.yaml deleted file mode 100644 index bc69ce5bf469..000000000000 --- a/.github/workflows/tiiuae-sitl-gzsim.yaml +++ /dev/null @@ -1,63 +0,0 @@ -name: tii-px4-sitl-gzsim - -on: - push: - branches: [ main ] - pull_request: - -permissions: - contents: read - packages: write - -jobs: - tii-px4-sitl-gzsim: - runs-on: ubuntu-latest - steps: - - - name: Checkout px4-firmware - uses: actions/checkout@v4 - with: - path: px4-firmware - fetch-depth: 0 - - - uses: docker/setup-buildx-action@v3 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - with: - driver-opts: network=host - - - name: Prepare px4-firmware - run: | - set -eux - cd px4-firmware - ./clone_public.sh - - - name: Docker meta - id: meta - uses: docker/metadata-action@v5 - with: - images: ghcr.io/tiiuae/tii-px4-sitl-gzsim - tags: | - type=ref,event=branch - type=ref,event=pr - type=semver,pattern={{version}} - type=sha - type=raw,value=latest - - - name: Login to GitHub Container Registry - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Build tii-px4-sitl-gzsim image and push - uses: docker/build-push-action@v5 - with: - context: . - file: ./px4-firmware/packaging/Dockerfile.sitl_gzsim - pull: true - push: true - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} diff --git a/.github/workflows/tiiuae-sitl-tests.yml b/.github/workflows/tiiuae-sitl-tests.yml deleted file mode 100644 index 2b05a5ee7cdf..000000000000 --- a/.github/workflows/tiiuae-sitl-tests.yml +++ /dev/null @@ -1,72 +0,0 @@ -name: SITL Tests - -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -permissions: - contents: read - packages: write - -jobs: - build: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - config: - - {model: "iris", latitude: "59.617693", longitude: "-151.145316", altitude: "48", build_type: "RelWithDebInfo" } # Alaska - container: - image: ghcr.io/tiiuae/px4-firmware-builder-base:latest - credentials: - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - steps: - - uses: actions/checkout@v4 - with: - token: ${{ secrets.GH_REPO_TOKEN }} - fetch-depth: 0 - - name: Install dependencies - run: | - apt update -y && apt install -y --no-install-recommends wget - pip3 install requests - git config --global --add safe.directory '*' - - name: Download MAVSDK - run: wget "https://github.com/mavlink/MAVSDK/releases/download/v$(cat test/mavsdk_tests/MAVSDK_VERSION)/libmavsdk-dev_$(cat test/mavsdk_tests/MAVSDK_VERSION)_ubuntu20.04_amd64.deb" - - name: Install MAVSDK - run: dpkg -i "libmavsdk-dev_$(cat test/mavsdk_tests/MAVSDK_VERSION)_ubuntu20.04_amd64.deb" - - name: check environment - env: - PX4_HOME_LAT: ${{matrix.config.latitude}} - PX4_HOME_LON: ${{matrix.config.longitude}} - PX4_HOME_ALT: ${{matrix.config.altitude}} - PX4_CMAKE_BUILD_TYPE: ${{matrix.config.build_type}} - run: | - export - - name: Build PX4 - env: - PX4_CMAKE_BUILD_TYPE: ${{matrix.config.build_type}} - run: make px4_sitl_default - - name: Build SITL Gazebo - env: - PX4_CMAKE_BUILD_TYPE: ${{matrix.config.build_type}} - run: | - . /opt/ros/humble/setup.sh - make px4_sitl_default sitl_gazebo-classic - - name: Build MAVSDK tests - env: - PX4_CMAKE_BUILD_TYPE: ${{matrix.config.build_type}} - DONT_RUN: 1 - run: make px4_sitl_default sitl_gazebo-classic mavsdk_tests - - name: Run SITL tests - env: - PX4_HOME_LAT: ${{matrix.config.latitude}} - PX4_HOME_LON: ${{matrix.config.longitude}} - PX4_HOME_ALT: ${{matrix.config.altitude}} - PX4_CMAKE_BUILD_TYPE: ${{matrix.config.build_type}} - run: test/mavsdk_tests/mavsdk_test_runner.py --speed-factor 20 --abort-early --model ${{matrix.config.model}} --upload test/mavsdk_tests/configs/sitl.json --verbose - timeout-minutes: 45 diff --git a/.github/workflows/tiiuae-sitl.yaml b/.github/workflows/tiiuae-sitl.yaml deleted file mode 100644 index 30491e4617ce..000000000000 --- a/.github/workflows/tiiuae-sitl.yaml +++ /dev/null @@ -1,102 +0,0 @@ -name: tii-px4-sitl - -on: - push: - branches: [ main ] - pull_request: - -permissions: - contents: read - packages: write - -jobs: - tii-px4-sitl: - runs-on: ubuntu-latest - services: - registry: - image: registry:2 - ports: - - 5000:5000 - steps: - - - name: Checkout px4-firmware - uses: actions/checkout@v4 - with: - path: px4-firmware - fetch-depth: 0 - - - uses: docker/setup-buildx-action@v3 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - with: - driver-opts: network=host - - # Run docker build - - name: Run fog-sw docker build - run: | - set -eux - mkdir bin - cd px4-firmware - ./clone_public.sh - ./build_sitl.sh ../bin/ - ls ../bin/ - - - name: Docker meta - id: meta - uses: docker/metadata-action@v5 - with: - images: ghcr.io/tiiuae/tii-px4-sitl - tags: | - type=ref,event=branch - type=ref,event=pr - type=semver,pattern={{version}} - type=sha - type=raw,value=latest - - - name: Login to GitHub Container Registry - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Build tii-px4-sitl image and push - uses: docker/build-push-action@v5 - with: - context: . - file: ./px4-firmware/packaging/Dockerfile.sitl - pull: true - push: true - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} - - - uses: jfrog/setup-jfrog-cli@v3 - if: github.event_name == 'push' - env: - JF_ENV_1: ${{ secrets.ARTIFACTORY_CLOUD_TOKEN }} - - - name: Upload to Artifactory (px4-sitl) - env: - ARTIFACTORY_GEN_REPO: ssrc-gen-private-local - BUILD_NAME: px4-sitl - CI: true - if: github.event_name == 'push' - run: | - set -exu - jfrog rt ping - pkg=$(find bin -name 'px4_sitl_build*.tar.gz') - pkg_name=$(basename $pkg) - jfrog rt u --target-props COMMIT="$GITHUB_SHA" \ - --build-name "$BUILD_NAME" \ - --build-number "$GITHUB_SHA" \ - "$pkg" \ - "$ARTIFACTORY_GEN_REPO/builds/px4-firmware/sitl/$pkg_name" - jfrog rt build-publish "$BUILD_NAME" "$GITHUB_SHA" - jfrog rt bpr "$BUILD_NAME" "$GITHUB_SHA" "$ARTIFACTORY_GEN_REPO" \ - --status dev \ - --comment "development build" - jfrog rt cp --flat \ - "$ARTIFACTORY_GEN_REPO/builds/px4-firmware/sitl/$pkg_name" \ - "$ARTIFACTORY_GEN_REPO/builds/px4-firmware/sitl/latest/px4_sitl_build.tar.gz" -