Configured Sonar (#233)

* Configured Sonar
* typo
* just to trigger build
* updated projectKey
* updated config
* added I6X commit-tests,
* separated sonar job
* disable companion
* add compiler
* changed image
* try to reload path, added pillow
This commit is contained in:
Janek
2022-04-15 08:01:05 +02:00
committed by GitHub
parent 95a8c5b3e5
commit 1873e2d74a
3 changed files with 54 additions and 19 deletions
+39 -11
View File
@@ -10,6 +10,25 @@ parameters:
# Define a job to be invoked later in a workflow.
# See: https://circleci.com/docs/2.0/configuration-reference/#jobs
jobs:
sonar-scan:
docker:
- image: cimg/python:3.10.4
steps:
- checkout
- run:
name: Build
command: |
wget https://launchpad.net/gcc-arm-embedded/4.7/4.7-2013-q3-update/+download/gcc-arm-none-eabi-4_7-2013q3-20130916-linux.tar.bz2 -P /tmp
tar -C /tmp -xjf /tmp/gcc-arm-none-eabi-4_7-2013q3-20130916-linux.tar.bz2
export PATH=$PATH:/tmp/gcc-arm-none-eabi-4_7-2013q3/bin
pip3 install pillow libclang-py3 pyqt5
sudo apt-get update -y
sudo apt-get install -y libclang-6.0-dev
curl -L -O https://sonarcloud.io/static/cpp/build-wrapper-linux-x86.zip
unzip -o build-wrapper-linux-x86.zip
build-wrapper-linux-x86/build-wrapper-linux-x86-64 --out-dir bw_output ./tools/commit-tests.sh -Wno-error
- sonarcloud/scan
build-elrsv2:
machine:
image: ubuntu-2004:202111-02
@@ -21,6 +40,7 @@ jobs:
- store_artifacts:
path: opentx-i6x-<< pipeline.parameters.build-version >>.bin
destination: openi6x-<< pipeline.parameters.build-version >>-elrsv2.bin
build-standard:
machine:
image: ubuntu-2004:202111-02
@@ -32,6 +52,7 @@ jobs:
- store_artifacts:
path: opentx-i6x-<< pipeline.parameters.build-version >>.bin
destination: openi6x-<< pipeline.parameters.build-version >>.bin
build-heli:
machine:
image: ubuntu-2004:202111-02
@@ -43,22 +64,29 @@ jobs:
- store_artifacts:
path: opentx-i6x-<< pipeline.parameters.build-version >>.bin
destination: openi6x-<< pipeline.parameters.build-version >>-heli.bin
publish-github-release:
docker:
- image: cibuilds/github:0.13
steps:
- attach_workspace:
at: /tmp
- run:
name: "Publish Release on GitHub"
command: |
ls -la
ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -delete nightly-latest $CIRCLE_ARTIFACTS/
# publish-github-release:
# docker:
# - image: cibuilds/github:0.13
# steps:
# - attach_workspace:
# at: /tmp
# - run:
# name: "Publish Release on GitHub"
# command: |
# ls -la
# ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -delete nightly-latest $CIRCLE_ARTIFACTS/
orbs:
sonarcloud: sonarsource/sonarcloud@1.0.3
# Invoke jobs via workflows
# See: https://circleci.com/docs/2.0/configuration-reference/#workflows
workflows:
openi6x-release-workflow:
jobs:
- sonar-scan:
context: SonarCloud
- build-elrsv2 #:
# filters:
# branches:
+5 -7
View File
@@ -1,9 +1,7 @@
sonar.host.url = https://sonarcloud.io
sonar.projectKey = OpenTX
sonar.organization = opentx-github
sonar.projectName = OpenTX
sonar.projectVersion = 2.2
sonar.sources = .
sonar.projectKey=OpenI6X_opentx
sonar.organization=openi6x
sonar.projectName=OpenTX
sonar.sources=.
sonar.exclusions = sound/**, build/**, radio/src/thirdparty/**
sonar.cfamily.build-wrapper-output = bw_output
sonar.cfamily.threads=2
+10 -1
View File
@@ -10,7 +10,7 @@ num_cpus=`grep 'physical id' /proc/cpuinfo | sort -u | wc -l`
# Default build treats warnings as errors, set -Wno-error to override, e.g.: commit-tests.sh -Wno-error
: ${WERROR:=1}
# A board name to build for, or ALL
: ${FLAVOR:=ALL}
: ${FLAVOR:=I6X}
for i in "$@"
do
@@ -159,6 +159,15 @@ if [[ " X12S HORUS ALL " =~ " ${FLAVOR} " ]] ; then
make -j${CORES} gtests ; ./gtests ${TEST_OPTIONS}
fi
if [[ " I6X ALL " =~ " ${FLAVOR} " ]] ; then
# OpenTX on FlySky FS-i6X
rm -rf *
cmake ${COMMON_OPTIONS} -DPCB=I6X -DHELI=NO -DLUA=NO -DGVARS=YES -DLUA_COMPILER=NO -DMULTIMODULE=NO -DPCBI6X_ELRSV2=YES -DDISABLE_COMPANION=YES ${SRCDIR}
make -j${CORES} ${FIRMARE_TARGET}
# make -j${CORES} libsimulator
# make -j${CORES} gtests ; ./gtests ${TEST_OPTIONS}
fi
if [[ " DEFAULT ALL " =~ " ${FLAVOR} " ]] ; then
# Companion
rm -rf *