2 Star 2 Fork 2

科技ing/pymavlink

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
.travis.yml 4.05 KB
一键复制 编辑 原始数据 按行查看 历史
language: python
python:
- "2.7"
- "3.6"
- "3.7"
before_install:
- nvm install 12.18.1 # need recent version of nodejs
- pip install --upgrade pip
install:
- pip install -r requirements.txt
- pip install flake8 pytest pytest-mock
addons:
apt:
packages:
- libgtest-dev
before_script:
# fail the build if there are Python syntax errors or undefined names
- flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub web ui editor is 127 chars wide
- SELECT=C,E10,E11,E401,E502,E703,E8,E9,F,W191,W291,W292,W293,W391
- flake8 . --count --exit-zero --select=${SELECT} --max-complexity=10 --max-line-length=127 --statistics
script:
# NOTE: we must do all testing on the installed python package, not
# on the build tree. Otherwise the testing is invalid and may not
# indicate the code actually works
#
# Set pythonpath
# install
- git clone git://github.com/ArduPilot/mavlink.git
- ln -s $PWD/mavlink/message_definitions ../
- python setup.py build install
# Generate messages
- mavgen.py --lang='C' --output=/tmp/mavgen_test mavlink/message_definitions/v1.0/common.xml --wire-protocol=1.0 --strict-units
- mavgen.py --lang='CS' --output=/tmp/mavgen_test mavlink/message_definitions/v1.0/common.xml --wire-protocol=1.0 --strict-units
- mavgen.py --lang='JavaScript' --output=/tmp/mavgen_test mavlink/message_definitions/v1.0/common.xml --wire-protocol=1.0 --strict-units
- mavgen.py --lang='Python' --output=/tmp/mavgen_test mavlink/message_definitions/v1.0/common.xml --wire-protocol=1.0 --strict-units
- mavgen.py --lang='WLua' --output=/tmp/mavgen_test mavlink/message_definitions/v1.0/common.xml --wire-protocol=1.0 --strict-units
- mavgen.py --lang='ObjC' --output=/tmp/mavgen_test mavlink/message_definitions/v1.0/common.xml --wire-protocol=1.0 --strict-units
- mavgen.py --lang='Swift' --output=/tmp/mavgen_test mavlink/message_definitions/v1.0/common.xml --wire-protocol=1.0 --strict-units
- mavgen.py --lang='Java' --output=/tmp/mavgen_test mavlink/message_definitions/v1.0/common.xml --wire-protocol=1.0 --strict-units
- mavgen.py --lang='C' --output=/tmp/mavgen_test mavlink/message_definitions/v1.0/common.xml --wire-protocol=2.0 --strict-units
- mavgen.py --lang='CS' --output=/tmp/mavgen_test mavlink/message_definitions/v1.0/common.xml --wire-protocol=2.0 --strict-units
- mavgen.py --lang='JavaScript' --output=/tmp/mavgen_test mavlink/message_definitions/v1.0/common.xml --wire-protocol=2.0 --strict-units
- mavgen.py --lang='TypeScript' --output=/tmp/mavgen_test mavlink/message_definitions/v1.0/common.xml --wire-protocol=2.0 --strict-units
- mavgen.py --lang='Python' --output=/tmp/mavgen_test mavlink/message_definitions/v1.0/common.xml --wire-protocol=2.0 --strict-units
- mavgen.py --lang='WLua' --output=/tmp/mavgen_test mavlink/message_definitions/v1.0/common.xml --wire-protocol=2.0 --strict-units
- mavgen.py --lang='ObjC' --output=/tmp/mavgen_test mavlink/message_definitions/v1.0/common.xml --wire-protocol=2.0 --strict-units
- mavgen.py --lang='Swift' --output=/tmp/mavgen_test mavlink/message_definitions/v1.0/common.xml --wire-protocol=2.0 --strict-units
- mavgen.py --lang='Java' --output=/tmp/mavgen_test mavlink/message_definitions/v1.0/common.xml --wire-protocol=2.0 --strict-units
- mavgen.py --lang='C++11' --output=/tmp/mavgen_test mavlink/message_definitions/v1.0/common.xml --wire-protocol=2.0 --strict-units # C++11 generator only supports 2.0
- ./test_generator.sh
# Avoid `spurious errors` caused by ~/.npm permission issues
# ref: https://github.com/travis-ci/travis-ci/issues/2244
# ref: https://github.com/npm/npm/issues/4815
# Does it already exist? Who owns? What permissions?
- ls -lah ~/.npm || mkdir ~/.npm
# Make sure we own it
# $USER references the current user in Travis env
- sudo chown -R $USER ~/.npm
- "cd generator/javascript && npm test"
# Run tests
- cd $TRAVIS_BUILD_DIR
- python -m pytest
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/kejiing/pymavlink.git
git@gitee.com:kejiing/pymavlink.git
kejiing
pymavlink
pymavlink
master

搜索帮助