1 # Builds the Betaflight firmware
3 # After building, artifacts are released to a seperate repository.
5 # Azure Pipelines requires the following extensions to be installed:
6 # - GitHub Tool: https://marketplace.visualstudio.com/items?itemName=marcelo-formentao.github-tools
8 # You'll also need to setup the follwing pipeline variables:
9 # "releaseNotes" - This is used to add the release notes in the windows job in the build stage so they can be published as part of the github release in the release stage
10 # "endpoint" - The name of the github endpoint link setup in AzDo - setup when linking AzDo and GitHub
11 # "owner" - The owner of the repository to release to e.g. betaflight
12 # "repoName" - The name of the repository to release to e.g. betaflight-configurator-nightly
17 repoName: betaflight-pull-requests
18 releaseNotes: This is a build of a community provided pull request. It may be unstable and result in corrupted configurations or data loss. **Use only for testing.**
20 name: $(Build.RequestedFor)_$(Build.SourceBranchName)_$(BuildID)
22 # For some reason the trigger does not pick up on "*-maintenance" - manually adding the current maintenance branch for now
44 vmImage: 'ubuntu-16.04'
46 - script: make arm_sdk_install
47 displayName: 'Install the build toolchain'
48 - script: sudo apt-get install -y libblocksruntime-dev
49 displayName: 'Install extra packages'
50 - script: make EXTRA_FLAGS=-Werror checks
51 displayName: 'Run sanity checks'
52 - script: make EXTRA_FLAGS=-Werror test-all
53 displayName: 'Run all unit tests'
54 - script: make EXTRA_FLAGS=-Werror all
55 displayName: 'Build all official targets'
56 - script: mkdir release; cp obj/*.hex release/
57 displayName: 'Copy artifacts'
58 - task: PublishPipelineArtifact@1
59 displayName: 'Publish Linux release'
61 artifactName: betaflight
62 targetPath: '$(System.DefaultWorkingDirectory)/release/'
69 - task: DownloadPipelineArtifact@2
72 targetPath: '$(Pipeline.Workspace)'
73 - powershell: Write-Output ("##vso[task.setvariable variable=today;]$(Get-Date -Format yyyyMMdd)")
74 - task: GitHubReleasePublish@1
76 githubEndpoint: '$(endpoint)'
77 manuallySetRepository: true
78 githubOwner: '$(owner)'
79 githubRepositoryName: '$(repoName)'
80 githubTag: $(today).$(Build.Repository.Name).$(Build.SourceBranchName)
81 githubReleaseTitle: '$(Build.Repository.Name): $(Build.SourceBranchName) ($(today))'
82 githubReleaseNotes: |+
86 $(Build.Repository.Name) ([link]($(Build.Repository.Uri)))
88 ### Pull request branch:
89 $(Build.SourceBranchName) ([link]($(Build.Repository.Uri)/tree/$(Build.SourceBranchName)))
95 $(Build.SourceVersion) ([link]($(Build.Repository.Uri)/commit/$(Build.SourceVersion)))
98 $(Build.SourceVersionMessage)
101 Build.SourceBranchName
102 $(Build.SourceBranchName)
103 Build.Repository.Name
104 $(Build.Repository.Name)
106 $(Build.Repository.ID)
108 $(Build.Repository.Uri)
110 $(Build.RequestedFor)
113 githubReleaseDraft: false
114 githubReleasePrerelease: false
115 githubIgnoreAssets: false
116 githubReleaseAsset: |
117 $(Pipeline.Workspace)/betaflight/**
118 githubReuseRelease: true
119 githubReuseDraftOnly: false
120 githubSkipDuplicatedAssets: false
121 githubEditRelease: true
122 githubDeleteEmptyTag: false