forked from 1hbb/OpenIntelWireless-Factory
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
148 lines (128 loc) · 4.33 KB
/
azure-pipelines.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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
# Xcode
# Build, test, and archive an Xcode workspace on macOS.
# Add steps that install certificates, test, sign, and distribute an app, save build artifacts, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/xcode
trigger: none
pr: none
schedules:
- cron: "0 */8 * * *"
displayName: Schedule Try Demo
branches:
include:
- master
always: true
pool:
vmImage: 'macos-latest'
steps:
- task: Bash@3
displayName: Clone Heliport & Install pods
inputs:
targetType: 'inline'
script: |
#!/bin/bash
DIR=$PWD
mkdir "HeliPort-itlwm-itlwmx"
git clone https://github.com/OpenIntelWireless/HeliPort.git
cd HeliPort
pod install
brew install swiftlint
- task: Bash@3
displayName: Build HeliPort
inputs:
targetType: 'inline'
script: |
#!/bin/bash
DIR=$PWD
cd HeliPort
xcodebuild -workspace HeliPort.xcworkspace -scheme HeliPort -sdk macosx -configuration Release archive -archivePath $PWD/build/HeliPort.xcarchive
cd $PWD/build/HeliPort.xcarchive/Products/Applications/
pwd
mv HeliPort.app $DIR/HeliPort-itlwm-itlwmx
- task: Bash@3
displayName: Get Latest Changes From HeliPort
inputs:
targetType: 'inline'
script: |
#!/bin/bash
DIR=$PWD
cd HeliPort
[ -e $DIR/changelog.md ] && rm $DIR/changelog.md
echo "### Release Notes" >> $DIR/changelog.md
echo "#### Latest HeliPort Changes " >> $DIR/changelog.md
echo "*" "$(git log -n 1 --skip 0 --pretty=%B)" >> $DIR/changelog.md
echo "*" "$(git log -n 1 --skip 1 --pretty=%B)" >> $DIR/changelog.md
echo "*" "$(git log -n 1 --skip 2 --pretty=%B)" >> $DIR/changelog.md
- task: Bash@3
displayName: Clone itlwm
inputs:
targetType: 'inline'
script: |
#!/bin/bash
DIR=$PWD
ls
git clone https://github.com/OpenIntelWireless/itlwm.git
- task: Bash@3
displayName: Install macOS 10.12 SDK
inputs:
targetType: 'inline'
script: |
#!/bin/bash
curl -L https://github.com/alexey-lysiuk/macos-sdk/releases/download/10.12/MacOSX10.12.tar.bz2 -o /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.tar.bz2 && tar -xjf /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.tar.bz2 -C /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/
- task: Bash@3
displayName: Build itlwm
inputs:
targetType: 'inline'
script: |
#!/bin/bash
DIR=$PWD
cd itlwm
xcodebuild -project itlwm.xcodeproj -target fw_gen -configuration Release -sdk macosx10.12
xcodebuild -project itlwm.xcodeproj -target fw_genx -configuration Release -sdk macosx10.12
xcodebuild -project itlwm.xcodeproj -target itlwm -configuration Release -sdk macosx10.12
xcodebuild -project itlwm.xcodeproj -target itlwmx -configuration Release -sdk macosx10.12
cd build/Release
ls
mv itlwm.kext $DIR/HeliPort-itlwm-itlwmx
mv itlwmx.kext $DIR/HeliPort-itlwm-itlwmx
- task: Bash@3
displayName: Get Latest Changes From itlwm
inputs:
targetType: 'inline'
script: |
#!/bin/bash
DIR=$PWD
cd itlwm
echo "#### Latest itlwm Changes" >> $DIR/changelog.md
echo "*" "$(git log -n 1 --skip 0 --pretty=%B)" >> $DIR/changelog.md
echo "*" "$(git log -n 1 --skip 1 --pretty=%B)" >> $DIR/changelog.md
echo "*" "$(git log -n 1 --skip 2 --pretty=%B)" >> $DIR/changelog.md
- task: Bash@3
displayName: Set BuildDate variable for release tag
inputs:
targetType: 'inline'
script: |
#!/bin/bash
BD="$(date +"%Y-%m-%d")" # Build Date
echo "##vso[task.setvariable variable=BuildDate]$BD"
- task: Bash@3
displayName: Prepare Release Zip File
inputs:
targetType: 'inline'
script: |
#!/bin/bash
zip -r HeliPort-itlwm-itlwmx.zip HeliPort-itlwm-itlwmx
- task: GitHubRelease@1
displayName: Github Release Assets
inputs:
gitHubConnection: 'github.com_1hbb'
repositoryName: '$(Build.Repository.Name)'
action: 'edit'
target: '$(Build.SourceVersion)'
tag: '$(BuildDate)'
title: '$(BuildDate)'
releaseNotesFilePath: 'changelog.md'
assets: '*.zip'
assetUploadMode: 'replace'
isPreRelease: true
changeLogCompareToRelease: 'lastNonDraftRelease'
addChangeLog: false