This adds Travis and Docker configurations for automated scans, both for master branch and internal PRs. External PRs won't be checked due to security concerns (and Travis limitation related to that) - GH and SonarCloud tokens are not propagated to those. An organization and project must be created in SonarCloud for reporting, as well as a technical GH user with mraa repo commit permission, to set PR statuses in the "checks" section. Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com>
66 lines
1.5 KiB
YAML
66 lines
1.5 KiB
YAML
sudo: required
|
|
|
|
language: cpp
|
|
|
|
compiler:
|
|
- clang
|
|
- gcc
|
|
|
|
env:
|
|
- TARGET=doc
|
|
- TARGET=python2
|
|
- TARGET=python3
|
|
- TARGET=java
|
|
- TARGET=node4
|
|
- TARGET=node5
|
|
- TARGET=python2 JSONPLAT=ON
|
|
- TARGET=python3 JSONPLAT=ON
|
|
- TARGET=java JSONPLAT=ON
|
|
- TARGET=node4 JSONPLAT=ON
|
|
- TARGET=node5 JSONPLAT=ON
|
|
- TARGET=python2 BUILDARCH=MOCK
|
|
- TARGET=python3 BUILDARCH=MOCK
|
|
- TARGET=java BUILDARCH=MOCK
|
|
- TARGET=node4 BUILDARCH=MOCK
|
|
- TARGET=node5 BUILDARCH=MOCK
|
|
- TARGET=sonar-scan
|
|
|
|
matrix:
|
|
exclude:
|
|
- compiler: clang
|
|
env: TARGET=java
|
|
- compiler: clang
|
|
env: TARGET=java JSONPLAT=ON
|
|
- compiler: clang
|
|
env: TARGET=java BUILDARCH=MOCK
|
|
- compiler: clang
|
|
env: TARGET=sonar-scan
|
|
allow_failures:
|
|
- compiler: gcc
|
|
env: TARGET=node4 JSONPLAT=ON
|
|
- compiler: clang
|
|
env: TARGET=node4 JSONPLAT=ON
|
|
- compiler: gcc
|
|
env: TARGET=node5 JSONPLAT=ON
|
|
- compiler: clang
|
|
env: TARGET=node5 JSONPLAT=ON
|
|
|
|
services:
|
|
- docker
|
|
|
|
before_install:
|
|
- sudo rm /usr/local/bin/docker-compose
|
|
- curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > docker-compose
|
|
- chmod +x docker-compose
|
|
- sudo mv docker-compose /usr/local/bin
|
|
|
|
before_script:
|
|
- if [ "$CC" == "gcc" ]; then export CC=gcc-4.8; fi
|
|
- if [ "$CXX" == "g++" ]; then export CXX=g++-4.8; fi
|
|
- if [ "$CC" == "clang" ]; then export CC=clang-3.8; fi
|
|
- if [ "$CXX" == "clang++" ]; then export CXX=clang++-3.8; fi
|
|
- docker-compose build ${TARGET}
|
|
|
|
script:
|
|
- docker-compose run ${TARGET}
|