forked from analogdevicesinc/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines-rpi.yml
117 lines (113 loc) · 3.62 KB
/
azure-pipelines-rpi.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
trigger:
- rpi-4.19.y
- rpi-5.4.y
- rpi-5.10.y
- staging-rpi/*
pr:
- rpi-4.19.y
- rpi-5.4.y
- rpi-5.10.y
stages:
- stage: Builds
jobs:
- job: checkpatch
condition: eq(variables['Build.Reason'], 'PullRequest')
variables:
BUILD_TYPE: checkpatch
TARGET_BRANCH: $[ variables['System.PullRequest.TargetBranch'] ]
pool:
vmImage: 'ubuntu-latest'
steps:
- checkout: self
fetchDepth: 50
clean: true
- script: ./ci/travis/run-build.sh
displayName: 'Checkpatch Script'
- job: BuildDockerized
strategy:
matrix:
bcm2709_arm_adi:
DEFCONFIG: adi_bcm2709_defconfig
ARCH: arm
artifactName: 'adi_bcm2709_defconfig'
bcm2711_arm_adi:
DEFCONFIG: adi_bcm2711_defconfig
ARCH: arm
artifactName: 'adi_bcm2711_defconfig'
bcmrpi_arm_adi:
DEFCONFIG: adi_bcmrpi_defconfig
ARCH: arm
artifactName: 'adi_bcmrpi_defconfig'
pool:
vmImage: 'ubuntu-latest'
steps:
- checkout: self
fetchDepth: 1
clean: true
- script: ./ci/travis/run-build-docker.sh
displayName: "Build test for '$(DEFCONFIG)'"
- script: |
cd $(Build.ArtifactStagingDirectory)
tar -C /home/vsts/work/1/s/modules/lib/modules/./ -cvf /home/vsts/work/1/a/rpi_modules.tar.gz .
displayName: 'Copy modules'
- task: CopyFiles@2
inputs:
sourceFolder: '$(Agent.BuildDirectory)/s/arch/arm/boot/dts/overlays'
contents: '$(Agent.BuildDirectory)/s/arch/arm/boot/dts/overlays/?(*.dtbo)'
targetFolder: '$(Build.ArtifactStagingDirectory)'
- task: CopyFiles@2
inputs:
sourceFolder: '$(Agent.BuildDirectory)/s/arch/arm/boot'
contents: '$(Agent.BuildDirectory)/s/arch/arm/boot/zImage'
targetFolder: '$(Build.ArtifactStagingDirectory)'
- task: CopyFiles@2
inputs:
sourceFolder: '$(Agent.BuildDirectory)/s/arch/arm/boot/dts'
contents: '$(Agent.BuildDirectory)/s/arch/arm/boot/dts/?(*.dtb)'
targetFolder: '$(Build.ArtifactStagingDirectory)'
- task: PublishPipelineArtifact@1
inputs:
targetPath: '$(Build.ArtifactStagingDirectory)'
artifactName: '$(artifactName)'
- stage: PushArtifacts
dependsOn: Builds
variables:
SOURCE_DIRECTORY: $(Build.SourcesDirectory)/bin
KEY_FILE: $(key.secureFilePath)
jobs:
- job: Push_to_SWDownloads
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/rpi-5.10.y'))
pool:
vmImage: 'ubuntu-latest'
steps:
- task: DownloadPipelineArtifact@2
inputs:
path: $(Build.SourcesDirectory)/bin
- bash: ./ci/travis/prepare_artifacts.sh structure
displayName: 'Prepare the folder structure'
- task: DownloadSecureFile@1
name: key
displayName: 'Download rsa key'
inputs:
secureFile: 'id_rsa'
- bash: ./ci/travis/prepare_artifacts.sh swdownloads
env:
DEST_SERVER: $(SERVER_ADDRESS)
displayName: "Push to SWDownloads"
- job: Push_to_Artifactory
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/rpi-5.10.y'))
pool:
name: Default
demands:
- agent.name -equals lab2_b5
steps:
- task: DownloadPipelineArtifact@2
inputs:
path: $(Build.SourcesDirectory)/bin
- bash: ./ci/travis/prepare_artifacts.sh structure
displayName: 'Prepare the folder structure'
- bash: ./ci/travis/prepare_artifacts.sh artifactory
env:
ARTIFACTORY_PATH: $(PATH)
ARTIFACTORY_TOKEN: $(TOKEN)
displayName: "Push to Artifactory"