diff --git a/azure-pipelines.yml b/azure-pipelines.yml index ac078ef..1fb5a37 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,19 +1,38 @@ -# 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: - main +- master +- staging/* +- dev/* + +pr: +- main +- master -pool: - vmImage: 'ubuntu-latest' +variables: + runCondition: true + targetBranch: $[ variables['Build.SourceBranchName'] ] -steps: -- script: echo Hello, world! - displayName: 'Run a one-line script' +jobs: +- job: LinuxBuilds + strategy: + matrix: + astyle: + imageName: 'ubuntu-latest' + BUILD_TYPE: astyle + TARGET_BRANCH: '$(targetBranch)' + cppcheck: + imageName: 'ubuntu-latest' + BUILD_TYPE: cppcheck + TARGET_BRANCH: '$(targetBranch)' -- script: | - echo Add other tasks to build, test, and deploy your project. - echo See https://aka.ms/yaml - displayName: 'Run a multi-line script' + pool: + vmImage: $(imageName) + steps: + - checkout: self + condition: eq(variables.runCondition, true) + fetchDepth: 50 + clean: true + persistCredentials: false + - script: ./ci/travis/run_build.sh + condition: eq(variables.runCondition, true) + displayName: 'Run $(BUILD_TYPE)'