-
Notifications
You must be signed in to change notification settings - Fork 534
120 lines (116 loc) · 3.88 KB
/
build-reuse-unix.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
name: Build Unix
# 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: 'linux'
# options:
# - linux
# - android
# - ios
# - macos
os:
required: false
type: string
default: 'ubuntu-20.04'
# options:
# - ubuntu-20.04
# - ubuntu-22.04
# - ubuntu-24.04
# - macos-13
arch:
required: false
default: 'x64'
type: string
# options:
# - x86
# - x64
# - arm
# - arm64
tls:
required: false
default: 'openssl'
type: string
# options:
# - openssl
# - openssl3
static:
required: false
default: ''
type: string
systemcrypto:
required: false
default: ''
type: string
clang:
required: false
default: ''
type: string
codecheck:
required: false
default: ''
type: string
xdp:
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-unix-reuse:
name: Build
runs-on: ${{ inputs.os }}
container:
image: ${{ (inputs.plat == 'linux' && format('ghcr.io/microsoft/msquic/linux-build-xcomp:{0}-cross', inputs.os)) || '' }}
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
repository: microsoft/msquic
ref: ${{ inputs.ref }}
- name: Set ownership
if: inputs.plat == 'linux'
run: |
# this is to fix GIT not liking owner of the checkout dir
chown -R $(id -u):$(id -g) $PWD
- name: Prepare Machine
shell: pwsh
run: scripts/prepare-machine.ps1 ${{ inputs.plat == 'linux' && '-ForContainerBuild' || '-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 ${{ inputs.static }} ${{ inputs.clang }} ${{ inputs.systemcrypto }} ${{ inputs.codecheck }} ${{ inputs.sanitize }} ${{ inputs.xdp }} -OneBranch
- 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.static }} ${{ inputs.clang }} ${{ inputs.systemcrypto }} ${{ inputs.codecheck }} ${{ inputs.sanitize }} ${{ inputs.xdp }}
- name: Build
if: inputs.build == ''
shell: pwsh
run: scripts/build.ps1 -Config ${{ inputs.config }} -Platform ${{ inputs.plat }} -Arch ${{ inputs.arch }} -Tls ${{ inputs.tls }} ${{ inputs.static }} ${{ inputs.clang }} ${{ inputs.systemcrypto }} ${{ inputs.codecheck }} ${{ inputs.sanitize }} ${{ inputs.xdp }} -OneBranch
- name: Upload build artifacts
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882
with:
name: ${{ inputs.config }}-${{ inputs.plat }}-${{ inputs.os }}-${{ inputs.arch }}-${{ inputs.tls }}${{ inputs.static }}${{ inputs.clang }}${{ inputs.systemcrypto }}${{ inputs.codecheck }}${{ inputs.sanitize }}${{ inputs.xdp }}${{ inputs.build }}
path: artifacts