-
Notifications
You must be signed in to change notification settings - Fork 544
118 lines (114 loc) · 3.87 KB
/
build-reuse-win.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
name: Build WinUser
# 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
repo:
required: false
default: microsoft/msquic
type: string
config:
required: false
default: 'Release'
type: string
# options:
# - Debug
# - Release
plat:
required: false
type: string
default: 'windows'
# options:
# - windows
# - uwp
# - 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
static:
required: false
default: ''
type: string
sanitize:
required: false
default: ''
type: string
build:
required: false
default: '' # Empty string means build all
type: string
permissions: read-all
jobs:
build-windows-reuse:
if: inputs.plat == 'windows' || inputs.plat == 'uwp'
name: Build
runs-on: ${{ inputs.os }}
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
repository: ${{ inputs.repo}}
ref: ${{ inputs.ref }}
- name: Install Perl
uses: shogo82148/actions-setup-perl@98dfedee230bcf1ee68d5b021931fc8d63f2016e
with:
perl-version: '5.34'
- name: Install NASM
uses: ilammy/setup-nasm@13cbeb366c45c4379d3478cdcbadd8295feb5028
- name: Prepare Machine
shell: pwsh
run: scripts/prepare-machine.ps1 -ForBuild -Tls ${{ inputs.tls }}
- name: Build For Test
if: inputs.build == '-Test'
shell: pwsh
run: scripts/build.ps1 -Config ${{ inputs.config }} -Platform ${{ inputs.plat }} -Arch ${{ inputs.arch }} -Tls ${{ inputs.tls }} -DisablePerf -DynamicCRT ${{ inputs.sanitize }}
- name: Build External Platform Test
if: inputs.build == '-Test'
shell: pwsh
run: |
cmake --install build\${{ inputs.plat }}\${{ inputs.arch }}_${{ inputs.tls }} --config ${{ inputs.config }}
cmake src/platform/unittest/external -G "Visual Studio 17 2022" -A ${{ inputs.arch }} -B build_external "-DCMAKE_INSTALL_PREFIX:PATH=C:/Program Files/msquic"
cmake --build build_external --config ${{ inputs.config }}
- name: Build For Perf
if: inputs.build == '-Perf'
shell: pwsh
run: scripts/build.ps1 -Config ${{ inputs.config }} -Platform ${{ inputs.plat }} -Arch ${{ inputs.arch }} -Tls ${{ inputs.tls }} -DisableTools -DisableTest ${{ inputs.sanitize }}
- name: Build
if: inputs.build == ''
shell: pwsh
run: scripts/build.ps1 -Config ${{ inputs.config }} -Platform ${{ inputs.plat }} -Arch ${{ inputs.arch }} -Tls ${{ inputs.tls }} ${{ inputs.sanitize }} ${{ inputs.static }}
- 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.sanitize }}${{ inputs.static }}${{ inputs.build }}
path: artifacts