-
Notifications
You must be signed in to change notification settings - Fork 532
94 lines (90 loc) · 2.92 KB
/
build-reuse-winkernel.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
name: Build WinKernel
# The caller is responsible for making sure all options passed to this workflow are valid and compatible with each other.
on:
workflow_call:
inputs:
ref:
required: false
default: ''
type: string
config:
required: false
default: 'Release'
type: string
# options:
# - Debug
# - Release
plat:
required: false
type: string
default: 'winkernel'
# options:
# - winkernel
os:
required: false
type: string
default: 'windows-2019'
# options:
# - windows-2019
# - windows-2022
arch:
required: false
default: 'x64'
type: string
# options:
# - x86
# - x64
# - arm64
tls:
required: false
default: 'schannel'
type: string
# options:
# - openssl
# - openssl3
# - schannel
build:
required: false
default: '' # Empty string means build all
type: string
permissions: read-all
jobs:
build-windows-kernel-reuse:
name: Build
runs-on: ${{ inputs.os }}
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
repository: microsoft/msquic
ref: ${{ inputs.ref }}
- name: Prepare Machine
shell: pwsh
run: scripts/prepare-machine.ps1 -ForBuild -ForKernel
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@6fb02220983dee41ce7ae257b6f4d8f9bf5ed4ce
- name: Nuget Restore
shell: pwsh
run: msbuild msquic.kernel.sln -t:restore /p:RestorePackagesConfig=true /p:Configuration=${{ inputs.config }} /p:Platform=${{ inputs.arch }}
- name: Build
if: inputs.build == '-Test'
shell: pwsh
run: msbuild msquic.kernel.sln /m /p:Configuration=${{ inputs.config }} /p:Platform=${{ inputs.arch }} /p:QUIC_VER_SUFFIX=-official /p:QUIC_VER_GIT_HASH=${{ github.sha }}
- name: Build
if: inputs.build == ''
shell: pwsh
run: msbuild msquic.kernel.sln /m /p:Configuration=${{ inputs.config }} /p:Platform=${{ inputs.arch }} /p:QUIC_VER_SUFFIX=-official
- name: Sign Kernel
shell: pwsh
run: scripts/sign.ps1 -Config ${{ inputs.config }} -Arch ${{ inputs.arch }} -Tls ${{ inputs.tls }}
- name: Filter Build Artifacts
shell: pwsh
run: |
Remove-Item artifacts/bin/xdp -Recurse -Force -ErrorAction Ignore
Remove-Item artifacts/corenet-ci-main -Recurse -Force -ErrorAction Ignore
Remove-Item artifacts/xdp -Recurse -Force -ErrorAction Ignore
- name: Upload build artifacts
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882
with:
name: ${{ inputs.config }}-${{ inputs.plat }}-${{ inputs.os }}-${{ inputs.arch }}-${{ inputs.tls }}${{ inputs.build }}
path: artifacts