#6750 Created Workflow
This commit is contained in:
parent
8b4026adcf
commit
cd1cfdc26c
1 changed files with 44 additions and 0 deletions
44
.github/workflows/c-cpp.yml
vendored
Normal file
44
.github/workflows/c-cpp.yml
vendored
Normal file
|
|
@ -0,0 +1,44 @@
|
||||||
|
name: C/C++ CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ master ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ master ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container: symless/synergy-core:debian10
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Run Sonar
|
||||||
|
run: |
|
||||||
|
export SONAR_SCANNER_VERSION=4.4.0.2170
|
||||||
|
export SONAR_SCANNER_HOME=$HOME/.sonar/sonar-scanner-$SONAR_SCANNER_VERSION-linux
|
||||||
|
curl --create-dirs -sSLo $HOME/.sonar/sonar-scanner.zip https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-$SONAR_SCANNER_VERSION-linux.zip
|
||||||
|
unzip -o $HOME/.sonar/sonar-scanner.zip -d $HOME/.sonar/
|
||||||
|
export PATH=$SONAR_SCANNER_HOME/bin:$PATH
|
||||||
|
export SONAR_SCANNER_OPTS="-server"
|
||||||
|
|
||||||
|
curl --create-dirs -sSLo $HOME/.sonar/build-wrapper-linux-x86.zip https://sonarcloud.io/static/cpp/build-wrapper-linux-x86.zip
|
||||||
|
unzip -o $HOME/.sonar/build-wrapper-linux-x86.zip -d $HOME/.sonar/
|
||||||
|
export PATH=$HOME/.sonar/build-wrapper-linux-x86:$PATH
|
||||||
|
|
||||||
|
mkdir build-release
|
||||||
|
cd build-release
|
||||||
|
if [ -z $(which cmake) ]; then cmake3 -DCMAKE_BUILD_TYPE=Release ..; else cmake -DCMAKE_BUILD_TYPE=Release ..; fi
|
||||||
|
. ./version
|
||||||
|
build-wrapper-linux-x86-64 --out-dir bw-output make -j
|
||||||
|
|
||||||
|
sonar-scanner \
|
||||||
|
-Dsonar.organization=symless \
|
||||||
|
-Dsonar.projectKey=symless_synergy-core \
|
||||||
|
-Dsonar.sources=. \
|
||||||
|
-Dsonar.cfamily.build-wrapper-output=bw-output \
|
||||||
|
-Dsonar.host.url=https://sonarcloud.io
|
||||||
|
env:
|
||||||
|
NODE_AUTH_TOKEN: ${{secrets.SONAR_TOKEN}}
|
||||||
Loading…
Reference in a new issue