2019-06-10 16:50:22 +02:00
|
|
|
jobs:
|
2019-06-19 19:04:54 +02:00
|
|
|
|
|
|
|
######################
|
|
|
|
###### Linux #########
|
|
|
|
######################
|
|
|
|
|
2019-06-10 16:50:22 +02:00
|
|
|
- job: Linux
|
2019-06-19 19:04:54 +02:00
|
|
|
timeoutInMinutes: 120
|
2019-06-10 16:50:22 +02:00
|
|
|
pool:
|
|
|
|
vmImage: 'ubuntu-16.04'
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
AMD64 (x64):
|
|
|
|
dockerTag: 'amd64'
|
|
|
|
dockerName: 'Debian Stretch (AMD64)'
|
2019-06-19 19:04:54 +02:00
|
|
|
platform: 'x11'
|
2019-06-10 16:50:22 +02:00
|
|
|
i386 (x86):
|
|
|
|
dockerTag: 'i386'
|
|
|
|
dockerName: 'Debian Stretch (i386)'
|
2019-06-19 19:04:54 +02:00
|
|
|
platform: 'x11'
|
2019-06-10 16:50:22 +02:00
|
|
|
ARMv6hf (Raspberry Pi v1 & ZERO):
|
|
|
|
dockerTag: 'armv6hf'
|
|
|
|
dockerName: 'Debian Stretch (Raspberry Pi v1 & ZERO)'
|
|
|
|
platform: 'rpi'
|
|
|
|
ARMv7hf (Raspberry Pi 2 & 3):
|
|
|
|
dockerTag: 'armv7hf'
|
|
|
|
dockerName: 'Debian Stretch (Raspberry Pi 2 & 3)'
|
|
|
|
platform: 'rpi'
|
|
|
|
ARMv8 (Generic AARCH64):
|
|
|
|
dockerTag: 'aarch64'
|
|
|
|
dockerName: 'ARMv8 (Generic AARCH64)'
|
|
|
|
platform: 'amlogic'
|
2019-06-19 19:04:54 +02:00
|
|
|
|
2019-06-10 16:50:22 +02:00
|
|
|
steps:
|
2019-06-19 19:04:54 +02:00
|
|
|
- checkout: self # represents the repo where the initial Pipelines YAML file was found
|
|
|
|
submodules: recursive # set to 'recursive' to get submodules of submodules
|
|
|
|
|
2020-02-16 16:24:33 +01:00
|
|
|
# read version file
|
2020-02-16 21:38:36 +01:00
|
|
|
- bash: |
|
|
|
|
echo "##vso[task.setvariable variable=semVer]$(cat version)"
|
|
|
|
echo "##vso[task.setvariable variable=preRel]$(grep -oE 'alpha|beta' version)"
|
2020-02-16 16:24:33 +01:00
|
|
|
workingDirectory: '$(Build.SourcesDirectory)'
|
2019-06-22 16:12:09 +02:00
|
|
|
displayName: 'Read and generate pipeline variables'
|
|
|
|
|
2019-06-19 19:04:54 +02:00
|
|
|
# build process
|
2019-06-10 16:50:22 +02:00
|
|
|
- bash: ./.ci/ci_build.sh
|
2019-07-09 23:07:31 +02:00
|
|
|
displayName: 'Build $(dockerName) packages'
|
2019-06-10 16:50:22 +02:00
|
|
|
env:
|
|
|
|
DOCKER_TAG: $(dockerTag)
|
|
|
|
DOCKER_NAME: $(dockerName)
|
|
|
|
PLATFORM: $(platform)
|
2019-06-19 19:04:54 +02:00
|
|
|
|
|
|
|
# copy files
|
2020-02-16 16:24:33 +01:00
|
|
|
- bash: 'cp -v deploy/Hyperion-* $(Build.ArtifactStagingDirectory) 2>/dev/null || :'
|
2019-06-19 19:04:54 +02:00
|
|
|
workingDirectory: '$(Build.SourcesDirectory)'
|
|
|
|
condition: and(succeeded(), ne(variables['system.pullrequest.isfork'], true), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))
|
|
|
|
displayName: 'Collecting deployable artifacts'
|
|
|
|
|
|
|
|
# publish artifacts
|
2019-06-15 15:46:56 +02:00
|
|
|
- task: PublishBuildArtifacts@1
|
|
|
|
inputs:
|
|
|
|
pathtoPublish: '$(Build.ArtifactStagingDirectory)'
|
2019-06-19 19:04:54 +02:00
|
|
|
ArtifactName: $(dockerTag)
|
|
|
|
condition: and(succeeded(), ne(variables['system.pullrequest.isfork'], true), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))
|
|
|
|
displayName: 'Publish deployables artifacts'
|
|
|
|
|
2019-06-22 16:12:09 +02:00
|
|
|
# set release to pre-release
|
|
|
|
- bash: echo '##vso[task.setvariable variable=preRelease;]true'
|
2020-02-16 21:38:36 +01:00
|
|
|
condition: and(succeeded(), or(contains(variables['preRel'], 'alpha'), contains(variables['preRel'], 'beta')), ne(variables['system.pullrequest.isfork'], true), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))
|
2020-02-16 16:24:33 +01:00
|
|
|
displayName: 'Mark alpha or beta as pre-release'
|
2019-06-19 19:04:54 +02:00
|
|
|
|
|
|
|
# create or update github release
|
|
|
|
- task: GithubRelease@0
|
|
|
|
inputs:
|
2020-03-01 20:19:16 +01:00
|
|
|
gitHubConnection: 'Hyperion-Bot'
|
2019-06-19 19:04:54 +02:00
|
|
|
repositoryName: $(Build.Repository.Name)
|
|
|
|
action: edit
|
|
|
|
target: $(Build.SourceVersion)
|
|
|
|
tagSource: manual
|
2019-06-22 16:12:09 +02:00
|
|
|
tag: $(Build.SourceBranchName)
|
2020-02-16 21:38:36 +01:00
|
|
|
title: 'Hyperion $(semVer)'
|
2019-06-19 19:04:54 +02:00
|
|
|
assets: '$(Build.ArtifactStagingDirectory)/*'
|
|
|
|
assetUploadMode: 'replace'
|
|
|
|
addChangeLog: false
|
2019-06-22 16:12:09 +02:00
|
|
|
isPreRelease: $(preRelease)
|
2019-06-19 19:04:54 +02:00
|
|
|
condition: and(succeeded(), ne(variables['system.pullrequest.isfork'], true), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))
|
|
|
|
displayName: Create/Update GitHub release
|
|
|
|
|
|
|
|
######################
|
|
|
|
###### macOS #########
|
|
|
|
######################
|
2019-06-10 16:50:22 +02:00
|
|
|
|
|
|
|
- job: macOS
|
2019-06-19 19:04:54 +02:00
|
|
|
timeoutInMinutes: 120
|
2019-06-10 16:50:22 +02:00
|
|
|
pool:
|
2020-03-12 21:50:54 +01:00
|
|
|
vmImage: 'macOS-10.14'
|
2019-06-19 19:04:54 +02:00
|
|
|
|
2019-06-10 16:50:22 +02:00
|
|
|
steps:
|
2019-06-19 19:04:54 +02:00
|
|
|
- checkout: self # represents the repo where the initial Pipelines YAML file was found
|
|
|
|
submodules: recursive # set to 'recursive' to get submodules of submodules
|
|
|
|
|
2020-02-16 16:24:33 +01:00
|
|
|
# read version file
|
2020-02-16 21:38:36 +01:00
|
|
|
- bash: |
|
|
|
|
echo "##vso[task.setvariable variable=semVer]$(cat version)"
|
|
|
|
echo "##vso[task.setvariable variable=preRel]$(grep -oE 'alpha|beta' version)"
|
2020-02-16 16:24:33 +01:00
|
|
|
workingDirectory: '$(Build.SourcesDirectory)'
|
2019-06-22 16:12:09 +02:00
|
|
|
displayName: 'Read and generate pipeline variables'
|
|
|
|
|
2019-06-19 19:04:54 +02:00
|
|
|
# install dependencies
|
2019-06-10 16:50:22 +02:00
|
|
|
- bash: ./.ci/ci_install.sh
|
|
|
|
displayName: 'Install dependencies'
|
2019-06-19 19:04:54 +02:00
|
|
|
|
|
|
|
# build process
|
2019-06-10 16:50:22 +02:00
|
|
|
- bash: ./.ci/ci_build.sh
|
2019-07-09 23:07:31 +02:00
|
|
|
displayName: 'Build macOS 10.13 packages'
|
|
|
|
env:
|
|
|
|
PLATFORM: 'osx'
|
2019-06-19 19:04:54 +02:00
|
|
|
|
|
|
|
# copy files
|
2020-02-16 16:24:33 +01:00
|
|
|
- bash: 'cp -v build/Hyperion-* $(Build.ArtifactStagingDirectory) 2>/dev/null || :'
|
2019-06-19 19:04:54 +02:00
|
|
|
workingDirectory: '$(Build.SourcesDirectory)'
|
|
|
|
condition: and(succeeded(), ne(variables['system.pullrequest.isfork'], true), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))
|
|
|
|
displayName: 'Collecting deployable artifacts'
|
|
|
|
|
|
|
|
# publish artifacts
|
2019-06-15 15:46:56 +02:00
|
|
|
- task: PublishBuildArtifacts@1
|
|
|
|
inputs:
|
|
|
|
pathtoPublish: '$(Build.ArtifactStagingDirectory)'
|
2019-06-19 19:04:54 +02:00
|
|
|
ArtifactName: 'macos'
|
|
|
|
condition: and(succeeded(), ne(variables['system.pullrequest.isfork'], true), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))
|
|
|
|
displayName: 'Publish deployables artifacts'
|
|
|
|
|
2019-06-22 16:12:09 +02:00
|
|
|
# set release to pre-release
|
|
|
|
- bash: echo '##vso[task.setvariable variable=preRelease;]true'
|
2020-02-16 21:38:36 +01:00
|
|
|
condition: and(succeeded(), or(contains(variables['preRel'], 'alpha'), contains(variables['preRel'], 'beta')), ne(variables['system.pullrequest.isfork'], true), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))
|
2020-02-16 16:24:33 +01:00
|
|
|
displayName: 'Mark alpha or beta as pre-release'
|
2019-06-19 19:04:54 +02:00
|
|
|
|
|
|
|
# create or update github release
|
|
|
|
- task: GithubRelease@0
|
|
|
|
inputs:
|
2020-03-01 20:19:16 +01:00
|
|
|
gitHubConnection: 'Hyperion-Bot'
|
2019-06-19 19:04:54 +02:00
|
|
|
repositoryName: $(Build.Repository.Name)
|
|
|
|
action: edit
|
|
|
|
target: $(Build.SourceVersion)
|
|
|
|
tagSource: manual
|
2019-06-22 16:12:09 +02:00
|
|
|
tag: '$(Build.SourceBranchName)'
|
2020-02-16 21:38:36 +01:00
|
|
|
title: 'Hyperion $(semVer)'
|
2019-06-19 19:04:54 +02:00
|
|
|
assets: '$(Build.ArtifactStagingDirectory)/*'
|
|
|
|
assetUploadMode: 'replace'
|
|
|
|
addChangeLog: false
|
2019-06-22 16:12:09 +02:00
|
|
|
isPreRelease: $(preRelease)
|
2019-06-19 19:04:54 +02:00
|
|
|
condition: and(succeeded(), ne(variables['system.pullrequest.isfork'], true), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))
|
|
|
|
displayName: Create/Update GitHub release
|