2023-06-27 21:31:40 +03:00
|
|
|
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:
|
2023-09-14 17:36:07 +03:00
|
|
|
ref:
|
|
|
|
required: false
|
|
|
|
default: ''
|
|
|
|
type: string
|
2023-06-27 21:31:40 +03:00
|
|
|
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
|
2024-01-12 20:01:35 +03:00
|
|
|
build:
|
2023-06-27 21:31:40 +03:00
|
|
|
required: false
|
2024-01-12 20:01:35 +03:00
|
|
|
default: '' # Empty string means build all
|
2023-06-27 21:31:40 +03:00
|
|
|
type: string
|
|
|
|
|
|
|
|
permissions: read-all
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build-windows-kernel-reuse:
|
|
|
|
name: Build
|
|
|
|
runs-on: ${{ inputs.os }}
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
2024-10-29 15:36:39 +03:00
|
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
2023-09-14 17:36:07 +03:00
|
|
|
with:
|
|
|
|
repository: microsoft/msquic
|
|
|
|
ref: ${{ inputs.ref }}
|
2023-06-27 21:31:40 +03:00
|
|
|
- name: Prepare Machine
|
|
|
|
shell: pwsh
|
|
|
|
run: scripts/prepare-machine.ps1 -ForBuild -ForKernel
|
|
|
|
- name: Add msbuild to PATH
|
2024-02-04 00:45:25 +03:00
|
|
|
uses: microsoft/setup-msbuild@6fb02220983dee41ce7ae257b6f4d8f9bf5ed4ce
|
2023-06-27 21:31:40 +03:00
|
|
|
- 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
|
2024-01-12 20:01:35 +03:00
|
|
|
if: inputs.build == '-Test'
|
2023-06-27 21:31:40 +03:00
|
|
|
shell: pwsh
|
2024-01-16 18:09:22 +03:00
|
|
|
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 }}
|
2023-06-27 21:31:40 +03:00
|
|
|
- name: Build
|
2024-01-12 20:01:35 +03:00
|
|
|
if: inputs.build == ''
|
2023-06-27 21:31:40 +03:00
|
|
|
shell: pwsh
|
2024-01-16 18:09:22 +03:00
|
|
|
run: msbuild msquic.kernel.sln /m /p:Configuration=${{ inputs.config }} /p:Platform=${{ inputs.arch }} /p:QUIC_VER_SUFFIX=-official
|
2023-06-27 21:31:40 +03:00
|
|
|
- name: Sign Kernel
|
|
|
|
shell: pwsh
|
|
|
|
run: scripts/sign.ps1 -Config ${{ inputs.config }} -Arch ${{ inputs.arch }} -Tls ${{ inputs.tls }}
|
2023-09-19 03:12:33 +03:00
|
|
|
- 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
|
2023-06-27 21:31:40 +03:00
|
|
|
- name: Upload build artifacts
|
2024-10-14 21:29:26 +03:00
|
|
|
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882
|
2023-06-27 21:31:40 +03:00
|
|
|
with:
|
2024-01-12 20:01:35 +03:00
|
|
|
name: ${{ inputs.config }}-${{ inputs.plat }}-${{ inputs.os }}-${{ inputs.arch }}-${{ inputs.tls }}${{ inputs.build }}
|
2023-06-27 21:31:40 +03:00
|
|
|
path: artifacts
|