-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy path.azure-pipelines.yml
110 lines (99 loc) · 4.04 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
trigger:
- master
- dev
strategy:
matrix:
ubuntu-clang-7:
VM_IMAGE: 'ubuntu-18.04'
OPERATING_SYSTEM: 'linux'
CLANG_VERSION: 7
ARTIFACT_NAME: 'ubuntu-clang-7'
ubuntu-clang-8:
VM_IMAGE: 'ubuntu-18.04'
OPERATING_SYSTEM: 'linux'
COMPILER: 'clang-8'
CLANG_VERSION: 8
ARTIFACT_NAME: 'ubuntu-clang-8'
vs2017-win2016-clang-11:
VM_IMAGE: 'vs2017-win2016'
OPERATING_SYSTEM: 'windows'
COMPILER: 'clang-11'
CLANG_INSTALLER_URL: 'https://github.com/llvm/llvm-project/releases/download/llvmorg-11.0.0/LLVM-11.0.0-win64.exe'
ANDROID_NDK_VERSION: r19c
ARTIFACT_NAME: 'vs2017-win2016-clang-11'
vs2017-win2016-clang-8:
VM_IMAGE: 'vs2017-win2016'
OPERATING_SYSTEM: 'windows'
COMPILER: 'clang-8'
CLANG_INSTALLER_URL: 'https://github.com/llvm/llvm-project/releases/download/llvmorg-8.0.1/LLVM-8.0.1-win64.exe'
ANDROID_NDK_VERSION: r19c
ARTIFACT_NAME: 'vs2017-win2016-clang-8'
pool:
vmImage: $(VM_IMAGE)
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.x'
addToPath: true
architecture: 'x64'
- script: |
sudo add-apt-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-$CLANG_VERSION main"
sudo apt update --allow-insecure-repositories
sudo apt install --allow-unauthenticated -y \
git \
make \
clang-$CLANG_VERSION \
lld-$CLANG_VERSION \
libc++-$CLANG_VERSION-dev \
build-essential \
libelf-dev \
linux-headers-$(uname -r)
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-$CLANG_VERSION 10000
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-$CLANG_VERSION 10000
condition: eq(variables['OPERATING_SYSTEM'], 'linux')
displayName: 'linux-install'
- script: |
echo "SUPPORTED_ARCHITECTURES := x86_64" > environment.config
echo "SELECTED_ARCHITECTURE := x86_64" >> environment.config
echo "BUILD_DRIVERS := linux" >> environment.config
echo "HYPERVISOR_WAIT_FOR_DEBUGGER := 0" >> environment.config
echo "LINUX_KERNEL := $(uname -r)" >> environment.config
displayName: 'linux-setup-environment'
condition: eq(variables['OPERATING_SYSTEM'], 'linux')
- script: |
make -j
make -j mode=release
displayName: 'linux-build'
condition: eq(variables['OPERATING_SYSTEM'], 'linux')
- script: |
@echo on
mkdir .llvm
bitsadmin /transfer download /download /dynamic /priority foreground $(CLANG_INSTALLER_URL) %cd%\.llvm\llvm.exe
.llvm\llvm.exe /S
mkdir .android-ndk
powershell -NoProfile -Command "Start-BitsTransfer -Source https://dl.google.com/android/repository/android-ndk-$(ANDROID_NDK_VERSION)-windows-x86_64.zip -Destination .android-ndk/android-ndk.zip"
powershell -NoProfile -Command "Expand-Archive -Path .android-ndk/android-ndk.zip -Destination .android-ndk"
git clone --branch UDK2018 https://github.com/tianocore/edk2 .edk2 2>&1
displayName: 'windows-install'
condition: eq(variables['OPERATING_SYSTEM'], 'windows')
- script: |
@echo on
set PATH=C:/Program Files/Git/usr/bin;%PATH%
(echo SUPPORTED_ARCHITECTURES := x86_64)> environment.config
(echo SELECTED_ARCHITECTURE := x86_64)>> environment.config
(echo BUILD_DRIVERS := windows uefi)>> environment.config
(echo HYPERVISOR_WAIT_FOR_DEBUGGER := 0)>> environment.config
(echo EDK2_ROOT := ../.edk2)>> environment.config
(echo ANDROID_NDK_ROOT := ../.android-ndk/android-ndk-$(ANDROID_NDK_VERSION))>> environment.config
(echo LLVM_ROOT := C:/Program\ Files/LLVM)>> environment.config
displayName: 'windows-setup-environment'
condition: eq(variables['OPERATING_SYSTEM'], 'windows')
- script: |
@echo on
set PATH=C:/Program Files/Git/usr/bin;%PATH%
.android-ndk\android-ndk-$(ANDROID_NDK_VERSION)\prebuilt\windows-x86_64\bin\make -j
.android-ndk\android-ndk-$(ANDROID_NDK_VERSION)\prebuilt\windows-x86_64\bin\make -j mode=release
displayName: 'windows-build'
condition: eq(variables['OPERATING_SYSTEM'], 'windows')
- upload: out
artifact: $(ARTIFACT_NAME)