-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathazure-pipelines.yml
336 lines (321 loc) · 14.9 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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
# Hackintosh Kext Release
trigger: none
pr: none
schedules:
- cron: "0 0 * * *"
displayName: Schedule Build
branches:
include:
- master
always: true
pool:
vmImage: 'macOS-latest'
steps:
- task: Bash@3
displayName: 'Lilu Basic Dependency'
inputs:
targetType: 'inline'
script: |
#!/bin/bash
BD="$(date +"%Y-%m-%d")"
echo "##vso[task.setvariable variable=BuildDate]$BD"
mkdir -p release/Lilu
mkdir -p release/VoodooInput
git clone -q https://github.com/acidanthera/MacKernelSDK.git
echo "==========================================================================="
echo "========================> Building Lilu Dependency <======================="
echo "==========================================================================="
git clone -q https://github.com/acidanthera/Lilu.git && cd Lilu
cp -r ../MacKernelSDK .
xcodebuild -configuration Debug > /dev/null 2>&1
xcodebuild -configuration Release > /dev/null 2>&1
cd ..
cp Lilu/build/*/*.zip release/Lilu/
- task: Bash@3
displayName: 'VoodooInput Basic Dependency'
inputs:
targetType: 'inline'
script: |
#!/bin/bash
echo "==========================================================================="
echo "=======================> Building Input Dependency <======================="
echo "==========================================================================="
git clone -q https://github.com/acidanthera/VoodooInput.git && cd VoodooInput
cp -r ../MacKernelSDK .
xcodebuild -configuration Debug > /dev/null 2>&1
xcodebuild -configuration Release > /dev/null 2>&1
cd ..
cp VoodooInput/build/*/*.zip release/VoodooInput/
- task: Bash@3
displayName: 'Lilu Plugins'
inputs:
targetType: 'inline'
script: |
#!/bin/bash
echo "==========================================================================="
echo "===================> Building Acidanthera Lilu Plugins <==================="
echo "==========================================================================="
liluPlugins=(
'AirportBrcmFixup,https://github.com/acidanthera/AirportBrcmFixup.git'
'AppleALC,https://github.com/acidanthera/AppleALC.git'
'BrightnessKeys,https://github.com/acidanthera/BrightnessKeys'
'CPUFriend,https://github.com/acidanthera/CPUFriend.git'
'CpuTscSync,https://github.com/lvs1974/CpuTscSync.git'
'DebugEnhancer,https://github.com/acidanthera/DebugEnhancer.git'
'HibernationFixup,https://github.com/acidanthera/HibernationFixup.git'
'NVMeFix,https://github.com/acidanthera/NVMeFix.git'
'RestrictEvents,https://github.com/acidanthera/RestrictEvents.git'
'RTCMemoryFixup,https://github.com/acidanthera/RTCMemoryFixup.git'
'VirtualSMC,https://github.com/acidanthera/VirtualSMC.git'
'WhateverGreen,https://github.com/acidanthera/WhateverGreen.git'
)
for plugin in ${liluPlugins[*]}; do
echo "===================> Building ${plugin%,*} "
mkdir -p release/${plugin%,*}
git clone -q ${plugin##*,} ${plugin%,*} -b master --depth=1
cd ${plugin%,*}
cp -Rf ../Lilu/build/Debug/Lilu.kext .
cp -r ../MacKernelSDK .
xcodebuild -configuration Debug > /dev/null 2>&1
xcodebuild -configuration Release > /dev/null 2>&1
if [ -e build/Release/*.zip ]; then
cp -f build/*/*.zip ../release/${plugin%,*}
else
mkdir -p ../release/${plugin%,*}/Debug
mkdir -p ../release/${plugin%,*}/Release
cp -Rf build/Debug/*.kext ../release/${plugin%,*}/Debug
cp -Rf build/Release/*.kext ../release/${plugin%,*}/Release
fi
cd ../
done
- task: Bash@3
displayName: 'Other Maintain Lilu Plugins'
inputs:
targetType: 'inline'
script: |
#!/bin/bash
echo "==========================================================================="
echo "==================> Building OtherMaintain Lilu Plugins <=================="
echo "==========================================================================="
otherMaintainLiluPlugins=(
'AMFIExemption,https://github.com/osy86/AMFIExemption.git'
'ATH9KFixup,https://github.com/chunnann/ATH9KFixup.git'
'DiskArbitrationFixup,https://github.com/Goldfish64/DiskArbitrationFixup.git'
'Innie,https://github.com/cdf/Innie.git'
'MacProMemoryNotificationDisabler,https://github.com/IOIIIO/MacProMemoryNotificationDisabler.git'
'NightShiftEnabler,https://github.com/cdf/NightShiftEnabler.git'
'NoTouchID,https://github.com/al3xtjames/NoTouchID.git'
'SystemProfilerMemoryFixup,https://github.com/Goldfish64/SystemProfilerMemoryFixup.git'
'ThunderboltReset,https://github.com/osy86/ThunderboltReset.git'
)
for plugin in ${otherMaintainLiluPlugins[*]}; do
echo "===================> Building ${plugin%,*} "
which wget || brew install wget
addr=$(echo ${plugin##*,} | awk -F '/' '{print $4"/"$5}' | sed 's/.git//g')
mkdir -p release/${plugin%,*}
git clone -q ${plugin##*,} ${plugin%,*} -b master --depth=1
cd ${plugin%,*}
if [[ "${plugin%,*}" != "ATH9KFixup" ]] ; then
wget -q https://github.com/acidanthera/Lilu/releases/download/1.3.7/Lilu-1.3.7-DEBUG.zip
unzip -q Lilu-1.3.7-DEBUG.zip && rm -rf Lilu-1.3.7-DEBUG.zip
fi
xcodebuild -configuration Debug > /dev/null 2>&1
xcodebuild -configuration Release > /dev/null 2>&1
if [ -e build/Release/*.zip ]; then
cp -f build/*/*.zip ../release/${plugin%,*}
else
mkdir -p ../release/${plugin%,*}/Debug
mkdir -p ../release/${plugin%,*}/Release
cp -Rf build/Debug/*.kext ../release/${plugin%,*}/Debug
cp -Rf build/Release/*.kext ../release/${plugin%,*}/Release
fi
cd release/${plugin%,*}
for i in $(curl https://api.github.com/repos/${addr}/releases/latest | grep browser_download_url | awk -F '"' '{print $4}')
do
wget $i
done
cd ../..
done
- task: Bash@3
displayName: 'Ethernet Plugins'
inputs:
targetType: 'inline'
script: |
#!/bin/bash
echo "==========================================================================="
echo "=======================> Building Ethernet Plugins <======================="
echo "==========================================================================="
ethernetPlugins=(
'IntelMausi,https://github.com/acidanthera/IntelMausi.git'
'AtherosE2200Ethernet,https://github.com/Mieze/AtherosE2200Ethernet.git'
'RTL8111_driver_for_OS_X,https://github.com/Mieze/RTL8111_driver_for_OS_X.git'
'LucyRTL8125Ethernet,https://github.com/Mieze/LucyRTL8125Ethernet'
'RealtekRTL8100,https://github.com/Mieze/RealtekRTL8100'
)
for plugin in ${ethernetPlugins[*]}; do
echo "===================> Building ${plugin%,*} "
mkdir -p release/${plugin%,*}
git clone -q ${plugin##*,} ${plugin%,*} -b master --depth=1
cd ${plugin%,*}
if [[ "${plugin%,*}" == "IntelMausi" ]] ; then
cp -r ../MacKernelSDK .
xcodebuild -configuration Debug
xcodebuild -configuration Release
cp -Rf build/*/*.zip ../release/${plugin%,*}
else
xcodebuild -configuration Debug CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO
xcodebuild -configuration Release CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO
mkdir -p ../release/${plugin%,*}/Debug
mkdir -p ../release/${plugin%,*}/Release
cp -Rf build/Debug/*.kext ../release/${plugin%,*}/Debug
cp -Rf build/Release/*.kext ../release/${plugin%,*}/Release
fi
cd ../
done
- task: Bash@3
displayName: 'Acidanthera Plugins'
inputs:
targetType: 'inline'
script: |
#!/bin/bash
echo "==========================================================================="
echo "======================> Building Acidanthera Plugins <====================="
echo "==========================================================================="
acidantheraPlugins=(
'BrcmPatchRAM,https://github.com/acidanthera/BrcmPatchRAM'
)
for plugin in ${acidantheraPlugins[*]}; do
echo "===================> Building ${plugin%,*} "
mkdir -p release/${plugin%,*}
git clone -q ${plugin##*,} ${plugin%,*} -b master --depth=1
cd ${plugin%,*}
cp -r ../MacKernelSDK .
xcodebuild -configuration Debug -target Package
xcodebuild -configuration Release -target Package
if [ -e build/Products/Release/*.zip ] ; then
cp -Rf build/Products/Debug/*.zip ../release/${plugin%,*}
cp -Rf build/Products/Release/*.zip ../release/${plugin%,*}
else
mkdir -p ../release/${plugin%,*}/Debug
mkdir -p ../release/${plugin%,*}/Release
cp -Rf build/Products/Debug/*.kext ../release/${plugin%,*}/Debug
cp -Rf build/Products/Release/*.kext ../release/${plugin%,*}/Release
fi
cd ../
done
- task: Bash@3
displayName: 'Input Plugins'
inputs:
targetType: 'inline'
script: |
#!/bin/bash
echo "==========================================================================="
echo "=========================> Building Input Plugins <========================"
echo "==========================================================================="
inputPlugins=(
'VoodooPS2,https://github.com/acidanthera/VoodooPS2'
#'VoodooI2C,https://github.com/VoodooI2C/VoodooI2C'
)
for plugin in ${inputPlugins[*]}; do
echo "===================> Building ${plugin%,*} "
mkdir -p release/${plugin%,*}
git clone -q ${plugin##*,} ${plugin%,*} --recursive
cd ${plugin%,*}
if [[ "${plugin%,*}" == "VoodooPS2" ]] ; then
cp -r ../MacKernelSDK .
src=$(/usr/bin/curl -Lfs https://raw.githubusercontent.com/acidanthera/VoodooInput/master/VoodooInput/Scripts/bootstrap.sh) && eval "$src"
xcodebuild -configuration Debug > /dev/null 2>&1
xcodebuild -configuration Release > /dev/null 2>&1
if [ -e build/Products/Release/*.zip ] ; then
cp -f build/Products/Debug/*.zip ../release/${plugin%,*}
cp -f build/Products/Release/*.zip ../release/${plugin%,*}
else
mkdir -p ../release/${plugin%,*}/Debug
mkdir -p ../release/${plugin%,*}/Release
cp -Rf build/Products/Debug/*.kext ../release/${plugin%,*}/Debug
cp -Rf build/Products/Release/*.kext ../release/${plugin%,*}/Release
fi
else
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/
src=$(/usr/bin/curl -Lfs https://raw.githubusercontent.com/acidanthera/VoodooInput/master/VoodooInput/Scripts/bootstrap.sh) && eval "$src" && mv VoodooInput Dependencies
pip install cpplint
pip install git+https://github.com/alexandred/cldoc.git
echo 'export PATH=~/Library/Python/2.7/bin:$PATH' >> ~/.bashrc
export PATH=~/Library/Python/2.7/bin:$PATH
git submodule init && git submodule update
xcodebuild -workspace "VoodooI2C.xcworkspace" -scheme "VoodooI2C" -sdk macosx10.12 -derivedDataPath build clean build CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO
cd build/Build/Products/Release
zip -r VoodooI2C-$(/usr/libexec/PlistBuddy -c "Print CFBundleShortVersionString" "VoodooI2C.kext/Contents/info.plist").zip *.kext
zip -r VoodooI2C-Debug-Symbols-$(/usr/libexec/PlistBuddy -c "Print CFBundleShortVersionString" "VoodooI2C.kext/Contents/info.plist").zip *.dSYM
cd -
cp build/Build/Products/Release/*.zip ../release/${plugin%,*}/
fi
cd ../
done
- task: Bash@3
displayName: 'VoodooI2C'
inputs:
targetType: 'inline'
script: |
#!/bin/bash
which wget || brew install wget
mkdir -p release/VoodooI2C && cd release/VoodooI2C
for i in $(curl -s https://api.github.com/repos/voodooi2c/voodooi2c/releases/latest | grep browser_download_url | awk -F '"' '{print $4}')
do
wget $i
done
cd ../..
- task: Bash@3
displayName: 'Itlwm'
inputs:
targetType: 'inline'
script: |
#!/bin/bash
mkdir -p release/itlwm
git clone -q https://github.com/OpenIntelWireless/itlwm --depth=5
cd itlwm && git clone -q https://github.com/acidanthera/MacKernelSDK.git --depth=1
xcodebuild -scheme itlwm -configuration Debug -derivedDataPath build | xcpretty
xcodebuild -scheme "AirportItlwm (all)" -configuration Debug -derivedDataPath build | xcpretty
ITLWM_VER=$(grep -m 1 "MODULE_VERSION =" itlwm.xcodeproj/project.pbxproj | tr -d ';' | tr -d '\t' | tr -d " " | awk -F '=' '{print $2}')
cd build/Build/Products/Debug
zip -r itlwm-v${ITLWM_VER}-DEBUG-alpha.zip itlwm.kext
while read -r tgt ; do
zip -r AirportItlwm-${tgt// /_}-v${ITLWM_VER}-DEBUG-alpha.zip "$tgt"
done < <(find . -mindepth 1 -maxdepth 1 -type d -not -path "*.kext" | cut -c 3-)
cd -
cp -Rf build/Build/Products/Debug/*.zip ../release/itlwm/
cd ../
- task: Bash@3
displayName: 'IntelBluetoothFirmware'
inputs:
targetType: 'inline'
script: |
#!/bin/bash
mkdir -p release/IntelBluetoothFirmware/Debug
mkdir -p release/IntelBluetoothFirmware/Release
git clone -q https://github.com/OpenIntelWireless/IntelBluetoothFirmware.git
cd IntelBluetoothFirmware && git clone -q https://github.com/acidanthera/MacKernelSDK.git --depth=1
xcodebuild -alltargets -configuration Debug | xcpretty
xcodebuild -alltargets -configuration Release | xcpretty
cp -Rf build/Debug/*.kext ../release/IntelBluetoothFirmware/Debug/
cp -Rf build/Release/* ../release/IntelBluetoothFirmware/Release/
cd ..
- task: Bash@3
displayName: 'Package'
inputs:
targetType: 'inline'
script: |
#!/bin/bash
zip -qry -FS $(USER)-Hackintosh-Kext-$(date +%Y-%m-%d).zip release
cp *.zip $(Build.ArtifactStagingDirectory)
- task: GitHubRelease@0
displayName: 'Publish GitHub Release'
inputs:
gitHubConnection: github.com_ClayMoreBoy
repositoryName: ClayMoreBoy/Hackintosh-Kext-Factory
action: edit
target: '$(Build.SourceVersion)'
tag: '$(BuildDate)'
title: Hackintosh-Kext🚀 | 自动编译 / $(BuildDate)
releaseNotesFile: releaseNotesFile.md
assets: '$(Build.ArtifactStagingDirectory)/*.zip'