switch sitl to latest

This commit is contained in:
Ramon Roche
2024-11-18 08:06:35 -08:00
parent b955588b26
commit 3f298e0767
+48 -69
View File
@@ -16,10 +16,10 @@ on:
jobs: jobs:
build: build:
name: Testing PX4 ${{ matrix.config.model }} name: Testing PX4 ${{ matrix.config.model }}
runs-on: [runs-on,runner=16cpu-linux-x64,image=ubuntu22-full-x64,"run-id=${{ github.run_id }}"] runs-on: [runs-on,runner=16cpu-linux-x64,image=ubuntu24-full-x64,"run-id=${{ github.run_id }}"]
container: # container:
image: px4io/px4-dev-simulation-focal:2021-09-08 # image: px4io/px4-dev-simulation-focal:2021-09-08
options: --privileged --ulimit core=-1 --security-opt seccomp=unconfined # options: --privileged --ulimit core=-1 --security-opt seccomp=unconfined
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
@@ -31,10 +31,8 @@ jobs:
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
fetch-depth: 0 fetch-tags: true
submodules: false
- name: Git Ownership Workaround
run: git config --system --add safe.directory '*'
- id: set-timestamp - id: set-timestamp
name: Set timestamp for cache name: Set timestamp for cache
@@ -58,60 +56,41 @@ jobs:
ccache -s ccache -s
ccache -z ccache -z
- name: Build PX4 - name: Build and load container image
env: uses: docker/build-push-action@v6
PX4_CMAKE_BUILD_TYPE: ${{matrix.config.build_type}} with:
run: make px4_sitl_default context: Tools/setup
tags: px4-dev:latest
platforms: |
linux/amd64
load: true
push: false
- name: Cache Post-Run [px4_sitl_default] - name: Run Tests
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: Cache Post-Run [sitl_gazebo-classic]
run: ccache -s
- 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 PX4 Environment Variables
env: env:
PX4_HOME_LAT: ${{matrix.config.latitude}} PX4_HOME_LAT: ${{matrix.config.latitude}}
PX4_HOME_LON: ${{matrix.config.longitude}} PX4_HOME_LON: ${{matrix.config.longitude}}
PX4_HOME_ALT: ${{matrix.config.altitude}} PX4_HOME_ALT: ${{matrix.config.altitude}}
PX4_CMAKE_BUILD_TYPE: ${{matrix.config.build_type}} PX4_CMAKE_BUILD_TYPE: ${{matrix.config.build_type}}
run: |
export
ulimit -a
- name: Build PX4 / MAVSDK tests
env:
PX4_CMAKE_BUILD_TYPE: ${{matrix.config.build_type}}
DONT_RUN: 1 DONT_RUN: 1
run: make px4_sitl_default sitl_gazebo-classic mavsdk_tests uses: addnab/docker-run-action@v3
with:
- name: Cache Post-Run [px4_sitl_default sitl_gazebo-classic mavsdk_tests] image: px4-dev:latest
run: ccache -s options: -v ${{ github.workspace }}:/workspace
run: |
- name: Core Dump Settings make px4_sitl_default
run: | ccache -s
make px4_sitl_default sitl_gazebo-classic
ccache -s
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"
dpkg -i "libmavsdk-dev_$(cat test/mavsdk_tests/MAVSDK_VERSION)_ubuntu20.04_amd64.deb"
export
ulimit -a
make px4_sitl_default sitl_gazebo-classic mavsdk_tests
ccache -s
ulimit -c unlimited ulimit -c unlimited
echo "`pwd`/%e.core" > /proc/sys/kernel/core_pattern echo "`pwd`/%e.core" > /proc/sys/kernel/core_pattern
test/mavsdk_tests/mavsdk_test_runner.py --speed-factor 10 --abort-early --model ${{matrix.config.model}} --upload test/mavsdk_tests/configs/sitl.json --verbose
- name: Run SITL / MAVSDK 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 10 --abort-early --model ${{matrix.config.model}} --upload test/mavsdk_tests/configs/sitl.json --verbose
timeout-minutes: 45
- name: Upload failed logs - name: Upload failed logs
if: failure() if: failure()
@@ -134,20 +113,20 @@ jobs:
name: coredump name: coredump
path: px4.core path: px4.core
- name: Setup & Generate Coverage Report # - name: Setup & Generate Coverage Report
if: contains(matrix.config.build_type, 'Coverage') # if: contains(matrix.config.build_type, 'Coverage')
run: | # run: |
git config --global credential.helper "" # disable the keychain credential helper # git config --global credential.helper "" # disable the keychain credential helper
git config --global --add credential.helper store # enable the local store 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 # 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 # git config --global url."https://github.com/".insteadof git@github.com: # credentials add credential
mkdir -p coverage # mkdir -p coverage
lcov --directory build/px4_sitl_default --base-directory build/px4_sitl_default --gcov-tool gcov --capture -o coverage/lcov.info # 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 # - name: Upload Coverage Information to Codecov
if: contains(matrix.config.build_type, 'Coverage') # if: contains(matrix.config.build_type, 'Coverage')
uses: codecov/codecov-action@v4 # uses: codecov/codecov-action@v4
with: # with:
token: ${{ secrets.CODECOV_TOKEN }} # token: ${{ secrets.CODECOV_TOKEN }}
flags: mavsdk # flags: mavsdk
file: coverage/lcov.info # file: coverage/lcov.info