зеркало из https://github.com/microsoft/msquic.git
144 строки
4.7 KiB
YAML
144 строки
4.7 KiB
YAML
name: Build Darwin Universal
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
ref:
|
|
required: false
|
|
default: ''
|
|
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 }}
|
|
|
|
build-darwin-universal:
|
|
name: Build Universal Binaries
|
|
needs: [build-darwin]
|
|
runs-on: macos-13
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
|
with:
|
|
repository: microsoft/msquic
|
|
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: microsoft/msquic
|
|
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: microsoft/msquic
|
|
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
|