-
Notifications
You must be signed in to change notification settings - Fork 7
/
azure-pipelines.yml
77 lines (63 loc) · 2.09 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
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
trigger:
- master
schedules:
- cron: "0 0 * * 0"
displayName: Weekly Sunday build
branches:
include:
- master
always: true
# Windows Build Job
jobs:
- job: WindowsBuild
pool:
vmImage: 'windows-2019'
steps:
- checkout: self # self represents the repo where the initial Pipelines YAML file was found
path: UefiToolkitPkg
- powershell: |
$PYTHON3_PATH = ((Get-Item C:\hostedtoolcache\windows\Python\3*\x64) | Sort-Object -Descending)[0].FullName
echo "##vso[task.setvariable variable=PYTHON3]$PYTHON3_PATH"
displayName: 'Detect Python3 installation path'
- script: |
cd..
git clone https://github.com/tianocore/edk2
cd edk2
git submodule update --init
cd..
xcopy /e /y UefiToolkitPkg edk2\UefiToolkitPkg\
cd edk2
set PYTHON_HOME=$(PYTHON3)
set NASM_PREFIX=%cd%\UefiToolkitPkg\Tools\Nasm\
call edksetup.bat rebuild
call build -a IA32 -a X64 -b RELEASE -t VS2019 -p UefiToolkitPkg\UefiPkg.dsc
displayName: 'Run a Windows build script'
- script:
xcopy /y ..\edk2\Build\UefiToolkitPkg\RELEASE_VS2019\X64\*.efi $(Build.ArtifactStagingDirectory)\
displayName: 'Copy build files to Artifact'
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: $(Build.ArtifactStagingDirectory)
artifactName: UefiPkgBinary_Win
# Linux Build Job
- job: LinuxBuild
pool:
vmImage: 'ubuntu-latest'
steps:
- checkout: self # self represents the repo where the initial Pipelines YAML file was found
path: UefiToolkitPkg
- script: |
chmod +x build.sh
./build.sh
displayName: 'Run a Linux build script'
- script: |
cp edk2/Build/UefiToolkitPkg/RELEASE_GCC5/X64/*.efi $(Build.ArtifactStagingDirectory)/
displayName: 'Copy build files to Artifact'
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: $(Build.ArtifactStagingDirectory)
artifactName: UefiPkgBinary_Linux