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.**
19 vmImage: 'ubuntu-20.04'
21 name: $(Build.RequestedFor)_$(Build.SourceBranchName)_$(BuildID)
23 # For some reason the trigger does not pick up on "*-maintenance" - manually adding the current maintenance branch for now
47 - script: make arm_sdk_install
48 displayName: 'Install the build toolchain'
49 - script: sudo apt-get install -y libblocksruntime-dev
50 displayName: 'Install extra packages'
51 - script: make EXTRA_FLAGS=-Werror checks
52 displayName: 'Run sanity checks'
53 - script: make EXTRA_FLAGS=-Werror test-all
54 displayName: 'Run all unit tests'
55 - script: make EXTRA_FLAGS=-Werror all
56 displayName: 'Build all official targets'
57 - script: mkdir release; cp obj/*.hex release/
58 displayName: 'Copy artifacts'
59 - task: PublishPipelineArtifact@1
60 displayName: 'Publish Linux release'
62 artifactName: betaflight
63 targetPath: '$(System.DefaultWorkingDirectory)/release/'
71 - task: DownloadPipelineArtifact@2
74 targetPath: '$(Pipeline.Workspace)'
75 - powershell: Write-Output ("##vso[task.setvariable variable=today;]$(Get-Date -Format yyyyMMdd)")
76 - task: GitHubReleasePublish@1
78 githubEndpoint: '$(endpoint)'
79 manuallySetRepository: true
80 githubOwner: '$(owner)'
81 githubRepositoryName: '$(repoName)'
82 githubTag: $(today).$(Build.Repository.Name).$(Build.SourceBranchName)
83 githubReleaseTitle: '$(Build.Repository.Name): $(Build.SourceBranchName) ($(today))'
84 githubReleaseNotes: |+
88 $(Build.Repository.Name) ([link]($(Build.Repository.Uri)))
90 ### Pull request branch:
91 $(Build.SourceBranchName) ([link]($(Build.Repository.Uri)/tree/$(Build.SourceBranchName)))
97 $(Build.SourceVersion) ([link]($(Build.Repository.Uri)/commit/$(Build.SourceVersion)))
100 $(Build.SourceVersionMessage)
103 Build.SourceBranchName
104 $(Build.SourceBranchName)
105 Build.Repository.Name
106 $(Build.Repository.Name)
108 $(Build.Repository.ID)
110 $(Build.Repository.Uri)
112 $(Build.RequestedFor)
115 githubReleaseDraft: false
116 githubReleasePrerelease: false
117 githubIgnoreAssets: false
118 githubReleaseAsset: |
119 $(Pipeline.Workspace)/betaflight/**
120 githubReuseRelease: true
121 githubReuseDraftOnly: false
122 githubSkipDuplicatedAssets: false
123 githubEditRelease: true
124 githubDeleteEmptyTag: false