mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-25 10:08:28 -04:00
.github: add SITL CAN periph to coverage test
This commit is contained in:
parent
0bdeda215f
commit
c441cb4f61
36
.github/workflows/test_coverage.yml
vendored
36
.github/workflows/test_coverage.yml
vendored
@ -16,7 +16,7 @@ jobs:
|
|||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
container:
|
container:
|
||||||
image: ardupilot/ardupilot-dev-coverage:latest
|
image: ardupilot/ardupilot-dev-coverage:latest
|
||||||
options: --user 1001
|
options: --privileged
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false # don't cancel if a job from the matrix fails
|
fail-fast: false # don't cancel if a job from the matrix fails
|
||||||
matrix:
|
matrix:
|
||||||
@ -25,6 +25,7 @@ jobs:
|
|||||||
]
|
]
|
||||||
config: [
|
config: [
|
||||||
coverage,
|
coverage,
|
||||||
|
sitltest-can,
|
||||||
]
|
]
|
||||||
steps:
|
steps:
|
||||||
# git checkout the PR
|
# git checkout the PR
|
||||||
@ -52,6 +53,16 @@ jobs:
|
|||||||
echo "max_size = 400M" >> ~/.ccache/ccache.conf
|
echo "max_size = 400M" >> ~/.ccache/ccache.conf
|
||||||
ccache -s
|
ccache -s
|
||||||
ccache -z
|
ccache -z
|
||||||
|
- name: Configure CAN
|
||||||
|
if: ${{ matrix.config == 'sitltest-can'}}
|
||||||
|
run: |
|
||||||
|
sudo dpkg --add-architecture i386
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install -y gcc-multilib g++-multilib
|
||||||
|
sudo apt -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 }}
|
- name: test ${{matrix.config}} ${{ matrix.toolchain }}
|
||||||
env:
|
env:
|
||||||
CI_BUILD_TARGET: ${{matrix.config}}
|
CI_BUILD_TARGET: ${{matrix.config}}
|
||||||
@ -62,10 +73,33 @@ jobs:
|
|||||||
python -m pip uninstall -y pymavlink
|
python -m pip uninstall -y pymavlink
|
||||||
git submodule update --init --recursive
|
git submodule update --init --recursive
|
||||||
(cd modules/mavlink/pymavlink && DISABLE_MAVNATIVE=True MDEF="$PWD/../message_definitions" python -m pip install --user .)
|
(cd modules/mavlink/pymavlink && DISABLE_MAVNATIVE=True MDEF="$PWD/../message_definitions" python -m pip install --user .)
|
||||||
|
if [[ ${{ matrix.config }} = "coverage" ]]; then
|
||||||
Tools/scripts/run_coverage.py -f
|
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
|
- name: Coveralls
|
||||||
uses: coverallsapp/github-action@master
|
uses: coverallsapp/github-action@master
|
||||||
with:
|
with:
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
path-to-lcov: ./reports/lcov-report/lcov.info
|
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
|
||||||
|
Loading…
Reference in New Issue
Block a user