2019-09-03 16:15:14 -07:00
|
|
|
# Starter pipeline
|
|
|
|
# Start with a minimal pipeline that you can customize to build and deploy your code.
|
|
|
|
# Add steps that build, run tests, deploy, and more:
|
|
|
|
# https://aka.ms/yaml
|
|
|
|
|
|
|
|
trigger:
|
|
|
|
- master
|
|
|
|
|
|
|
|
pool:
|
|
|
|
vmImage: 'ubuntu-latest'
|
|
|
|
|
|
|
|
steps:
|
2019-09-03 16:28:14 -07:00
|
|
|
- bash: |
|
2019-09-03 16:40:04 -07:00
|
|
|
sudo sed -i -- 's/#deb-src/deb-src/g' /etc/apt/sources.list && sudo sed -i -- 's/# deb-src/deb-src/g' /etc/apt/sources.list
|
2019-09-03 16:31:45 -07:00
|
|
|
sudo apt-get update
|
2019-09-03 16:28:14 -07:00
|
|
|
sudo apt-get build-dep -qq cppcheck
|
|
|
|
displayName: 'Installing deps'
|
|
|
|
- bash: |
|
2019-09-03 16:50:08 -07:00
|
|
|
git clone --depth=10 https://github.com/noisymime/speeduino noisymime/speeduino
|
2019-09-03 16:28:14 -07:00
|
|
|
git clone --depth=10 https://github.com/noisymime/cppcheck.git noisymime/cppcheck_github
|
2019-09-03 16:50:08 -07:00
|
|
|
displayName: 'Cloning repos'
|
|
|
|
- bash: |
|
2019-09-03 16:28:14 -07:00
|
|
|
cd noisymime/cppcheck_github
|
|
|
|
make
|
2019-09-03 16:50:08 -07:00
|
|
|
displayName: 'Making cppcheck'
|
|
|
|
- bash: |
|
2019-09-03 16:56:53 -07:00
|
|
|
cd noisymime
|
2019-09-03 16:28:14 -07:00
|
|
|
chmod +x speeduino/misra/check_misra_github.sh
|
|
|
|
speeduino/misra/check_misra_github.sh
|
2019-09-03 17:04:49 -07:00
|
|
|
#This task is always an error if there are MISRA violations
|
|
|
|
continueOnError: true
|
2019-09-03 16:15:14 -07:00
|
|
|
displayName: 'Running Scan'
|
|
|
|
|
|
|
|
# Publish test results to Azure Pipelines
|
|
|
|
- task: PublishTestResults@2
|
|
|
|
inputs:
|
|
|
|
testResultsFormat: 'JUnit'
|
2019-09-03 16:56:53 -07:00
|
|
|
testResultsFiles: '**/misra.xml'
|
2019-09-03 16:15:14 -07:00
|
|
|
#searchFolder: '$(System.DefaultWorkingDirectory)' # Optional
|
|
|
|
#mergeTestResults: false # Optional
|
|
|
|
#failTaskOnFailedTests: false # Optional
|
|
|
|
#testRunTitle: # Optional
|
|
|
|
#buildPlatform: # Optional
|
|
|
|
#buildConfiguration: # Optional
|
2019-09-03 16:50:08 -07:00
|
|
|
publishRunAttachments: true # Optional
|