-
Notifications
You must be signed in to change notification settings - Fork 546
148 lines (142 loc) · 4.82 KB
/
build-reuse-darwin-framework.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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
name: Build Darwin Universal
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
tls:
required: false
default: 'openssl'
type: string
# options:
# - openssl
# - openssl3
static:
required: false
default: ''
type: string
permissions: read-all
jobs:
build-darwin:
name: Build Darwin Binaries
needs: []
strategy:
fail-fast: false
matrix:
plat: [macos, ios]
arch: [x64, arm64]
uses: ./.github/workflows/build-reuse-unix.yml
with:
ref: ${{ inputs.ref }}
config: ${{ inputs.config }}
plat: ${{ matrix.plat }}
os: macos-13
arch: ${{ matrix.arch }}
tls: ${{ inputs.tls }}
static: ${{ inputs.static }}
repo: ${{ inputs.repo }}
build-darwin-universal:
name: Build Universal Binaries
needs: [build-darwin]
runs-on: macos-13
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
repository: ${{ inputs.repo}}
ref: ${{ inputs.ref }}
- name: Download Build Artifacts (x64)
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16
with:
name: ${{ inputs.config }}-macos-macos-13-x64-${{ inputs.tls }}${{ inputs.static }}
path: artifacts
- name: Download Build Artifacts (arm64)
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16
with:
name: ${{ inputs.config }}-macos-macos-13-arm64-${{ inputs.tls }}${{ inputs.static }}
path: artifacts
- name: Build Package
shell: pwsh
run: scripts/merge-darwin.ps1 -DeleteSource -Config ${{ inputs.config }}
- name: Upload build artifacts
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882
with:
name: ${{ inputs.config }}-macos-macos-13-universal-${{ inputs.tls }}${{ inputs.static }}
path: artifacts
build-darwin-framework:
name: Build Darwin Framework
needs: [build-darwin-universal]
strategy:
fail-fast: false
matrix:
vec: [
{ plat: "ios", arch: "x64" }, # iOS Simulator
{ plat: "ios", arch: "arm64" },
{ plat: "macos", arch: "universal" },
]
runs-on: macos-13
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
repository: ${{ inputs.repo}}
ref: ${{ inputs.ref }}
- name: Download Build Artifacts (x64)
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16
with:
name: ${{ inputs.config }}-${{ matrix.vec.plat }}-macos-13-${{ matrix.vec.arch }}-${{ inputs.tls }}${{ inputs.static }}
path: artifacts
- name: Build Framework
shell: pwsh
run: scripts/package-darwin-framework.ps1 -Config ${{ inputs.config }} -Platform ${{ matrix.vec.plat }} -Arch ${{ matrix.vec.arch }}
- name: Upload build artifacts
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882
with:
name: Framework-${{ inputs.config }}-${{ matrix.vec.plat }}-macos-13-${{ matrix.vec.arch }}-${{ inputs.tls }}${{ inputs.static }}
path: artifacts
build-darwin-xcframework:
name: Build Darwin XCFramework
needs: [build-darwin-framework]
runs-on: macos-13
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
repository: ${{ inputs.repo}}
ref: ${{ inputs.ref }}
- name: Download Build Artifacts (iOS x64)
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16
with:
name: Framework-${{ inputs.config }}-ios-macos-13-x64-openssl
path: artifacts
- name: Download Build Artifacts (iOS arm64)
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16
with:
name: Framework-${{ inputs.config }}-ios-macos-13-arm64-openssl
path: artifacts
- name: Download Build Artifacts (MacOS Universal)
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16
with:
name: Framework-${{ inputs.config }}-macos-macos-13-universal-openssl
path: artifacts
- name: Build XCFramework
shell: pwsh
run: scripts/package-darwin-xcframework.ps1 -Config ${{ inputs.config }}
- name: Upload build artifacts
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882
with:
name: XCFramework-${{ inputs.config }}
path: artifacts/frameworks