forked from PX4/PX4-Autopilot
-
Notifications
You must be signed in to change notification settings - Fork 1
69 lines (66 loc) · 2.66 KB
/
sitl_tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: SITL Tests
on:
push:
branches:
- 'master'
pull_request:
branches:
- '*'
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
ubuntu_release: [
bionic,
focal
]
container: px4io/px4-dev-simulation-${{ matrix.ubuntu_release }}:2020-04-01
steps:
- uses: actions/checkout@v1
with:
token: ${{ secrets.ACCESS_TOKEN }}
- name: Download MAVSDK
run: wget https://github.com/mavlink/MAVSDK/releases/download/v0.24.0/mavsdk_0.24.0_ubuntu18.04_amd64.deb
- name: Install MAVSDK
run: dpkg -i mavsdk_0.24.0_ubuntu18.04_amd64.deb
- uses: actions/[email protected]
id: ccache-persistence
with:
path: ~/.ccache
key: ccache-sitl-tests
restore-keys: |
ccache-sitl-tests
- name: setup ccache
run: mkdir -p ~/.ccache && echo "max_size = 1G" > ~/.ccache/ccache.conf && ccache -z && ccache -s
- name: Build PX4 in SITL integration test mode
run: DONT_RUN=1 make px4_sitl PX4_CMAKE_BUILD_TYPE=Coverage gazebo mavsdk_tests
- name: ccache post-run
run: ccache -s && ccache -z
- name: Run SITL tests
run: test/mavsdk_tests/mavsdk_test_runner.py --speed-factor 20 --abort-early test/mavsdk_tests/configs/sitl.json
- name: Run SITL tests in Southern hemisphere
run: PX4_HOME_LAT=-37.8134048 PX4_HOME_LON=175.304109 PX4_HOME_ALT=32 |
test/mavsdk_tests/mavsdk_test_runner.py --speed-factor 20 --abort-early test/mavsdk_tests/configs/sitl.json
- name: Run SITL tests far in the West
run: PX4_HOME_LAT=59.6176928 PX4_HOME_LON=-151.1453163 PX4_HOME_ALT=48 |
test/mavsdk_tests/mavsdk_test_runner.py --speed-factor 20 --abort-early test/mavsdk_tests/configs/sitl.json
# Report test coverage
- name: disable the keychain credential helper
run: git config --global credential.helper ""
- name: enable the local store credential helper
run: git config --global --add credential.helper store
- name: add credential
run: echo "https://x-access-token:${{ secrets.ACCESS_TOKEN }}@github.com" >> ~/.git-credentials
- name: tell git to use https instead of ssh whenever it encounters it
run: 'git config --global url."https://github.com/".insteadof [email protected]:'
- name: Check code coverage
run: |
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
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: mavsdk
file: coverage/lcov.info