-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
112 additions
and
123 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,134 +17,123 @@ jobs: | |
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: ghcr.io/px4/px4-dev:main-20241125 | ||
options: --privileged --ulimit core=-1 --security-opt seccomp=unconfined | ||
- {vehicle: "iris", mission: "MC_mission_box"} | ||
- {vehicle: "rover", mission: "rover_mission_1"} | ||
|
||
# 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: | ||
fetch-depth: 0 | ||
|
||
- name: Git ownership workaround | ||
run: git config --system --add safe.directory '*' | ||
|
||
- 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@v4 | ||
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 | ||
env: | ||
PX4_CMAKE_BUILD_TYPE: ${{matrix.config.build_type}} | ||
run: | | ||
ccache -z | ||
make px4_sitl_default | ||
make px4_sitl_default gz_x500 | ||
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 | ||
# - name: Git ownership workaround | ||
# run: git config --system --add safe.directory '*' | ||
|
||
# - 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@v4 | ||
# 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: make quick_check | ||
uses: addnab/docker-run-action@v3 | ||
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 | ||
with: | ||
name: binary | ||
path: build/px4_sitl_default/bin/px4 | ||
|
||
- name: Store PX4 log | ||
if: failure() | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: px4_log | ||
path: ~/.ros/log/*/*.ulg | ||
|
||
- name: Store ROS log | ||
if: failure() | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ros_log | ||
path: ~/.ros/**/rostest-*.log | ||
image: px4io/px4-dev-ros-melodic:2021-09-08 | ||
options: -v ${{ github.workspace }}:/workspace | ||
run: | | ||
cd /workspace | ||
git config --global --add safe.directory /workspace | ||
make px4_sitl_default sitl_gazebo-classic | ||
./test/rostest_px4_run.sh mavros_posix_test_mission.test mission:=${{matrix.config.mission}} vehicle:=${{matrix.config.vehicle}} | ||
# - name: Build PX4 and sitl_gazebo | ||
# container: px4io/px4-dev-ros-melodic:2021-09-08 | ||
# run: | | ||
# git config --system --add safe.directory '*' | ||
|
||
|
||
# - 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: ecl EKF analysis | ||
# run: ./Tools/ecl_ekf/process_logdata_ekf.py ~/.ros/log/*/*.ulg || true | ||
|
||
# - name: Upload logs to flight review | ||
# 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 | ||
# with: | ||
# name: binary | ||
# path: build/px4_sitl_default/bin/px4 | ||
|
||
# - name: Store PX4 log | ||
# if: failure() | ||
# uses: actions/upload-artifact@v3 | ||
# with: | ||
# name: px4_log | ||
# path: ~/.ros/log/*/*.ulg | ||
|
||
# - name: Store ROS log | ||
# if: failure() | ||
# uses: actions/upload-artifact@v3 | ||
# 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 [email protected]: # 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@v1 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
flags: mavros_mission | ||
file: coverage/lcov.info | ||
# - 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 [email protected]: # 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@v1 | ||
# with: | ||
# token: ${{ secrets.CODECOV_TOKEN }} | ||
# flags: mavros_mission | ||
# file: coverage/lcov.info |