Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
julianoes committed May 7, 2020
2 parents a517ee1 + bef25ff commit 0ad7baf
Show file tree
Hide file tree
Showing 363 changed files with 141,797 additions and 35,297 deletions.
8 changes: 4 additions & 4 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
# AlwaysBreakTemplateDeclarations: MultiLine # with Clang 7
AlwaysBreakTemplateDeclarations: MultiLine
BinPackArguments: false
BinPackParameters: false
BreakBeforeBinaryOperators: None
Expand Down Expand Up @@ -60,10 +60,10 @@ SortUsingDeclarations: false
SpaceAfterCStyleCast: false
SpaceAfterTemplateKeyword: false
SpaceBeforeAssignmentOperators: true
# SpaceBeforeCtorInitializerColon: true # with Clang 7
# SpaceBeforeInheritanceColon: true # with Clang 7
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
# SpaceBeforeRangeBasedForLoopColon: true # with Clang 7
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
Expand Down
196 changes: 185 additions & 11 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on:
branches:
- 'master'
- 'develop'
tags:
- 'v*'
pull_request:
branches:
- '*'
Expand All @@ -18,10 +20,21 @@ jobs:
- uses: actions/checkout@v1
with:
submodules: recursive
- name: Install lcov
run: sudo apt-get install -y lcov
- name: configure
run: cmake -DCMAKE_BUILD_TYPE=Coverage -j 2 -Bbuild -H.
run: cmake -DCMAKE_BUILD_TYPE=Coverage -DASAN=ON -DUBSAN=ON -DLSAN=ON -j 2 -Bbuild -H.
- name: build
run: cmake --build build -j 2
- name: test
run: ./build/src/unit_tests_runner
- name: run lcov
run: lcov --capture --directory . --output-file lcov.info
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: "./lcov.info"

ubuntu18-non-superbuild:
name: ubuntu-18.04 (non-backend, non-superbuild)
Expand All @@ -47,14 +60,45 @@ jobs:
with:
submodules: recursive
- name: configure
run: cmake -DCMAKE_BUILD_TYPE=Release -DSUPERBUILD=ON -DBUILD_BACKEND=ON -j 2 -Bbuild/release -H.
run: cmake -DCMAKE_BUILD_TYPE=Release -DSUPERBUILD=ON -DENABLE_MAVLINK_PASSTHROUGH=1 -DBUILD_BACKEND=ON -j 2 -Bbuild/release -H.
- name: build
run: cmake --build build/release -j 2
- name: install
run: sudo cmake --build build/release --target install
- name: configure examples
run: (cd examples && cmake -DCMAKE_BUILD_TYPE=Release -j 2 -Bbuild -H.)
- name: build examples
run: (cd examples && cmake --build build -j 2)
- name: test
run: ./build/release/src/unit_tests_runner
- name: test (mavsdk_server)
run: ./build/release/src/backend/test/unit_tests_backend

ubuntu18-proto-check:
name: ubuntu-18.04 (proto check)
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v1
with:
submodules: recursive
- name: install clang-format
run: sudo apt-get install -y clang-format-9
- name: install dcsdkgen
run: |
cd proto/pb_plugins
pip3 install --user -r requirements.txt
pip3 install --user -e .
- name: build necessary protoc tooling
run: cmake -DBUILD_BACKEND=ON -Bbuild/default -S.
- name: generate code from protos
run: PATH="$PATH:$HOME/.local/bin" tools/generate_from_protos.sh
- name: fix style
run: tools/fix_style.sh . || true
- name: check for diff
run: git diff --exit-code

ubuntu18-check-style:
name: ubuntu-18.04 (check style)
name: ubuntu-18.04 (check style and docs)
runs-on: ubuntu-18.04
container: mavsdk/mavsdk-ubuntu-18.04
steps:
Expand All @@ -63,25 +107,58 @@ jobs:
submodules: recursive
- name: check style
run: ./tools/fix_style.sh .
- name: check docs
run: tools/generate_docs.sh

px4-sitl:
name: PX4 SITL (ubuntu-18.04)
name: PX4 SITL ${{ matrix.px4_version }} (ubuntu-18.04)
runs-on: ubuntu-18.04
container: mavsdk/mavsdk-ubuntu-18.04-px4-sitl
container: mavsdk/mavsdk-ubuntu-18.04-px4-sitl-${{ matrix.px4_version }}
strategy:
matrix:
px4_version: [v1.9, v1.10]
steps:
- uses: actions/checkout@v1
with:
submodules: recursive
- name: test
run: tools/run-sitl-tests.sh /home/user/Firmware

deb-rpm-package:
deb-package:
name: ${{ matrix.container_name }} (package, non-backend)
runs-on: ubuntu-18.04
container: mavsdk/mavsdk-${{ matrix.container_name }}
strategy:
matrix:
container_name: [ubuntu-16.04, ubuntu-18.04]
steps:
- uses: actions/checkout@v1
with:
submodules: recursive
- name: configure
run: cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_BACKEND=OFF -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=install -Bbuild/release -H.
- name: build
run: cmake --build build/release --target install -- -j2
- name: Package
if: startsWith(github.ref, 'refs/tags/v')
run: tools/create_packages.sh ./install .
- name: Publish artefacts
if: startsWith(github.ref, 'refs/tags/v')
uses: svenstaro/upload-release-action@v1-release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file_glob: true
file: '*.deb'
tag: ${{ github.ref }}
overwrite: true

rpm-package:
name: ${{ matrix.container_name }} (package, non-backend)
runs-on: ubuntu-18.04
container: mavsdk/mavsdk-${{ matrix.container_name }}
strategy:
matrix:
container_name: [ubuntu-16.04, ubuntu-18.04, fedora-29, fedora-30]
container_name: [fedora-30, fedora-31]
steps:
- uses: actions/checkout@v1
with:
Expand All @@ -90,15 +167,25 @@ jobs:
run: cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_BACKEND=OFF -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=install -Bbuild/release -H.
- name: build
run: cmake --build build/release --target install -- -j2
- name: package
- name: Package
if: startsWith(github.ref, 'refs/tags/v')
run: tools/create_packages.sh ./install .
- name: Publish artefacts
if: startsWith(github.ref, 'refs/tags/v')
uses: svenstaro/upload-release-action@v1-release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file_glob: true
file: '*.rpm'
tag: ${{ github.ref }}
overwrite: true

dockcross:
dockcross-linux:
name: ${{ matrix.arch_name }}
runs-on: ubuntu-18.04
strategy:
matrix:
arch_name: [android-arm64, android-arm, linux-armv6, linux-armv7, linux-arm64, manylinux2010-x64]
arch_name: [linux-armv6, linux-armv7, linux-arm64, manylinux2010-x64]
steps:
- uses: actions/checkout@v1
with:
Expand All @@ -109,6 +196,65 @@ jobs:
run: ./dockcross-${{ matrix.arch_name }} cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=build/${{ matrix.arch_name }}/install -DBUILD_BACKEND=ON -DBUILD_SHARED_LIBS=OFF -j 2 -Bbuild/${{ matrix.arch_name }} -H.
- name: build
run: ./dockcross-${{ matrix.arch_name }} cmake --build build/${{ matrix.arch_name }} -j 2 --target install
- name: Publish artefacts
if: startsWith(github.ref, 'refs/tags/v')
uses: svenstaro/upload-release-action@v1-release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: 'build/${{ matrix.arch_name }}/install/bin/mavsdk_server'
asset_name: 'mavsdk_server_${{ matrix.arch_name }}'
tag: ${{ github.ref }}
overwrite: true

dockcross-android-arm:
name: android-arm
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v1
with:
submodules: recursive
- name: setup dockcross
run: docker run --rm dockcross/android-arm > ./dockcross-android-arm; chmod +x ./dockcross-android-arm
- name: configure
run: ./dockcross-android-arm cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=build/android-arm/install -DBUILD_BACKEND=ON -DBUILD_SHARED_LIBS=OFF -j 2 -Bbuild/android-arm -H.
- name: build
run: ./dockcross-android-arm cmake --build build/android-arm -j 2 --target install
- name: create tar with header and library
run: mkdir -p build/android-arm/export/include; cp build/android-arm/install/include/mavsdk/backend/backend_api.h build/android-arm/export/include; mkdir -p build/android-arm/export/armeabi-v7a; cp build/android-arm/install/lib/libmavsdk_server.so build/android-arm/export/armeabi-v7a; tar -C build/android-arm/export -cf build/android-arm/export/mavsdk_server_android-arm.tar armeabi-v7a include;
- name: Publish artefacts
if: startsWith(github.ref, 'refs/tags/v')
uses: svenstaro/upload-release-action@v1-release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: 'build/android-arm/export/mavsdk_server_android-arm.tar'
asset_name: 'mavsdk_server_android-arm.tar'
tag: ${{ github.ref }}
overwrite: true

dockcross-android-arm64:
name: android-arm64
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v1
with:
submodules: recursive
- name: setup dockcross
run: docker run --rm dockcross/android-arm64 > ./dockcross-android-arm64; chmod +x ./dockcross-android-arm64
- name: configure
run: ./dockcross-android-arm64 cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=build/android-arm64/install -DBUILD_BACKEND=ON -DBUILD_SHARED_LIBS=OFF -j 2 -Bbuild/android-arm64 -H.
- name: build
run: ./dockcross-android-arm64 cmake --build build/android-arm64 -j 2 --target install
- name: create tar with header and library
run: mkdir -p build/android-arm64/export/include; cp build/android-arm64/install/include/mavsdk/backend/backend_api.h build/android-arm64/export/include; mkdir -p build/android-arm64/export/arm64-v8a; cp build/android-arm64/install/lib/libmavsdk_server.so build/android-arm64/export/arm64-v8a; tar -C build/android-arm64/export -cf build/android-arm64/export/mavsdk_server_android-arm64.tar arm64-v8a include;
- name: Publish artefacts
if: startsWith(github.ref, 'refs/tags/v')
uses: svenstaro/upload-release-action@v1-release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: 'build/android-arm64/export/mavsdk_server_android-arm64.tar'
asset_name: 'mavsdk_server_android-arm64.tar'
tag: ${{ github.ref }}
overwrite: true

macOS:
name: macOS
Expand All @@ -125,6 +271,15 @@ jobs:
run: ./build/release/src/unit_tests_runner
- name: test (mavsdk_server)
run: ./build/release/src/backend/test/unit_tests_backend
- name: Publish artefacts
if: startsWith(github.ref, 'refs/tags/v')
uses: svenstaro/upload-release-action@v1-release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: 'build/release/install/bin/mavsdk_server'
asset_name: 'mavsdk_server_macos'
tag: ${{ github.ref }}
overwrite: true

iOS:
name: iOS
Expand All @@ -141,8 +296,18 @@ jobs:
run: cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=$(pwd)/tools/ios.toolchain.cmake -DPLATFORM=SIMULATOR64 -DBUILD_BACKEND=ON -DBUILD_SHARED_LIBS=OFF -j 2 -Bbuild/ios_simulator -H.
- name: build (ios_simulator)
run: cmake --build build/ios_simulator -j 2
- name: package
- name: Package
if: startsWith(github.ref, 'refs/tags/v')
run: bash ./src/backend/tools/package_backend_framework.bash
- name: Publish artefacts
if: startsWith(github.ref, 'refs/tags/v')
uses: svenstaro/upload-release-action@v1-release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: 'build/fat_bin/mavsdk_server.framework'
asset_name: 'mavsdk_server.framework'
tag: ${{ github.ref }}
overwrite: true

Windows:
name: Windows
Expand All @@ -155,3 +320,12 @@ jobs:
run: cmake -G "Visual Studio 16 2019" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=build/release/install -DBUILD_BACKEND=ON -DBUILD_SHARED_LIBS=OFF -j 2 -Bbuild/release -S.
- name: build
run: cmake --build build/release -j 2 --config Release --target install
- name: Publish artefacts
if: startsWith(github.ref, 'refs/tags/v')
uses: svenstaro/upload-release-action@v1-release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: 'build/release/install/bin/mavsdk_server_bin.exe'
asset_name: 'mavsdk_server_macos'
tag: ${{ github.ref }}
overwrite: true
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ CMakeLists.txt.user*

# windows swap files
*~

tools/docs
Loading

0 comments on commit 0ad7baf

Please sign in to comment.