Skip to content

Commit

Permalink
Merge branch 'main' into nibanks/priority-work
Browse files Browse the repository at this point in the history
  • Loading branch information
ami-GS committed Jun 7, 2024
2 parents 1f22fa1 + 6ead531 commit 930b0a6
Show file tree
Hide file tree
Showing 67 changed files with 606 additions and 359 deletions.
29 changes: 24 additions & 5 deletions .azure/OneBranch.Official.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,6 @@ variables:
NUGET_XMLDOC_MODE: none
ONEBRANCH_AME_ACR_LOGIN: onebranch.azurecr.io, cdpxb7b51c2f738e43e48f7605d9a8e5f6d700.azurecr.io

WindowsContainerImage: 'onebranch.azurecr.io/windows/ltsc2022/vse2022:latest'
WindowsContainerImage2: 'cdpxb7b51c2f738e43e48f7605d9a8e5f6d700.azurecr.io/b7b51c2f-738e-43e4-8f76-05d9a8e5f6d7/official/msquicbuild:${{ parameters.WindowsContainerImage2DockerTag }}'
LinuxContainerImage: 'ghcr.io/microsoft/msquic/linux-build-xcomp:22.04'
LinuxContainerImage2: 'ghcr.io/microsoft/msquic/linux-build-xcomp:20.04'

resources:
repositories:
- repository: templates
Expand Down Expand Up @@ -73,6 +68,28 @@ extends:
featureFlags:
linuxEsrpSigningPreview: true
WindowsHostVersion: '1ESWindows2022'
containers:
- container: windows_build_container
image: 'onebranch.azurecr.io/windows/ltsc2022/vse2022:latest'
type: Windows
- container: windows_build_container2
image: 'cdpxb7b51c2f738e43e48f7605d9a8e5f6d700.azurecr.io/b7b51c2f-738e-43e4-8f76-05d9a8e5f6d7/official/msquicbuild:${{ parameters.WindowsContainerImage2DockerTag }}'
type: Windows
- container: linux_build_container # Default container
image: 'ghcr.io/microsoft/msquic/linux-build-xcomp:ubuntu-20.04-x86_64'
type: Linux
- container: ubuntu_2004_x86_64
image: 'ghcr.io/microsoft/msquic/linux-build-xcomp:ubuntu-20.04-x86_64'
type: Linux
- container: ubuntu_2004_arm
image: 'ghcr.io/microsoft/msquic/linux-build-xcomp:ubuntu-20.04-arm'
type: Linux
- container: ubuntu_2204_x86_64
image: 'ghcr.io/microsoft/msquic/linux-build-xcomp:ubuntu-22.04-x86_64'
type: Linux
- container: ubuntu_2204_arm
image: 'ghcr.io/microsoft/msquic/linux-build-xcomp:ubuntu-22.04-arm'
type: Linux

stages:
- stage: build_winkernel
Expand Down Expand Up @@ -169,10 +186,12 @@ extends:
parameters:
config: Release
tls: openssl3
xdp: "-UseXdp"
- template: .azure/obtemplates/build-linux.yml@self
parameters:
config: Debug
tls: openssl3
xdp: "-UseXdp"

- stage: package_linux
displayName: Package Linux
Expand Down
29 changes: 24 additions & 5 deletions .azure/OneBranch.PullRequest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,6 @@ variables:
NUGET_XMLDOC_MODE: none
ONEBRANCH_AME_ACR_LOGIN: onebranch.azurecr.io, cdpxb7b51c2f738e43e48f7605d9a8e5f6d700.azurecr.io

WindowsContainerImage: 'onebranch.azurecr.io/windows/ltsc2022/vse2022:latest'
WindowsContainerImage2: 'cdpxb7b51c2f738e43e48f7605d9a8e5f6d700.azurecr.io/b7b51c2f-738e-43e4-8f76-05d9a8e5f6d7/official/msquicbuild:${{ parameters.WindowsContainerImage2DockerTag }}'
LinuxContainerImage: 'ghcr.io/microsoft/msquic/linux-build-xcomp:22.04'
LinuxContainerImage2: 'ghcr.io/microsoft/msquic/linux-build-xcomp:20.04'

resources:
repositories:
- repository: templates
Expand Down Expand Up @@ -69,6 +64,28 @@ extends:
suppressionFile: $(Build.SourcesDirectory)\.azure\openssl.gdnsuppress
featureFlags:
WindowsHostVersion: '1ESWindows2022'
containers:
- container: windows_build_container
image: 'onebranch.azurecr.io/windows/ltsc2022/vse2022:latest'
type: Windows
- container: windows_build_container2
image: 'cdpxb7b51c2f738e43e48f7605d9a8e5f6d700.azurecr.io/b7b51c2f-738e-43e4-8f76-05d9a8e5f6d7/official/msquicbuild:${{ parameters.WindowsContainerImage2DockerTag }}'
type: Windows
- container: linux_build_container # Default container
image: 'ghcr.io/microsoft/msquic/linux-build-xcomp:ubuntu-20.04-x86_64'
type: Linux
- container: ubuntu_2004_x86_64
image: 'ghcr.io/microsoft/msquic/linux-build-xcomp:ubuntu-20.04-x86_64'
type: Linux
- container: ubuntu_2004_arm
image: 'ghcr.io/microsoft/msquic/linux-build-xcomp:ubuntu-20.04-arm'
type: Linux
- container: ubuntu_2204_x86_64
image: 'ghcr.io/microsoft/msquic/linux-build-xcomp:ubuntu-22.04-x86_64'
type: Linux
- container: ubuntu_2204_arm
image: 'ghcr.io/microsoft/msquic/linux-build-xcomp:ubuntu-22.04-arm'
type: Linux

stages:
- stage: build_winkernel
Expand Down Expand Up @@ -165,10 +182,12 @@ extends:
parameters:
config: Release
tls: openssl3
xdp: "-UseXdp"
- template: .azure/obtemplates/build-linux.yml@self
parameters:
config: Debug
tls: openssl3
xdp: "-UseXdp"

- stage: package_linux
displayName: Package Linux
Expand Down
19 changes: 10 additions & 9 deletions .azure/obtemplates/build-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ parameters:
config: ''
tls: 'openssl'
platform: 'linux'
xdp: ''

jobs:
- job: build_${{ parameters.platform }}_${{ parameters.tls }}_${{ parameters.config }}
Expand All @@ -16,39 +17,39 @@ jobs:
- task: PowerShell@2
displayName: Prepare Build Machine
${{ if eq(parameters.tls, 'openssl') }}:
target: linux_build_container2
target: ubuntu_2004_x86_64
${{ else }}:
target: linux_build_container
target: ubuntu_2204_x86_64
inputs:
pwsh: true
filePath: scripts/prepare-machine.ps1
arguments: -Tls ${{ parameters.tls }} -ForContainerBuild
- task: PowerShell@2
displayName: x64
${{ if eq(parameters.tls, 'openssl') }}:
target: linux_build_container2
target: ubuntu_2004_x86_64
${{ else }}:
target: linux_build_container
target: ubuntu_2204_x86_64
inputs:
pwsh: true
filePath: scripts/build.ps1
arguments: -Tls ${{ parameters.tls }} -Config ${{ parameters.config }} -Platform ${{ parameters.platform }} -Arch x64 -CI -UseSystemOpenSSLCrypto -OneBranch -OfficialRelease
arguments: -Tls ${{ parameters.tls }} -Config ${{ parameters.config }} -Platform ${{ parameters.platform }} ${{ parameters.xdp }} -Arch x64 -CI -UseSystemOpenSSLCrypto -OneBranch -OfficialRelease
- task: PowerShell@2
displayName: arm64
${{ if eq(parameters.tls, 'openssl') }}:
target: linux_build_container2
target: ubuntu_2004_arm
${{ else }}:
target: linux_build_container
target: ubuntu_2204_arm
inputs:
pwsh: true
filePath: scripts/build.ps1
arguments: -Tls ${{ parameters.tls }} -Config ${{ parameters.config }} -Platform ${{ parameters.platform }} -Arch arm64 -CI -UseSystemOpenSSLCrypto -OneBranch -OfficialRelease
- task: PowerShell@2
displayName: arm
${{ if eq(parameters.tls, 'openssl') }}:
target: linux_build_container2
target: ubuntu_2004_arm
${{ else }}:
target: linux_build_container
target: ubuntu_2204_arm
inputs:
pwsh: true
filePath: scripts/build.ps1
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build-reuse-darwin-framework.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
runs-on: macos-12
steps:
- name: Checkout repository
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
with:
repository: microsoft/msquic
ref: ${{ inputs.ref }}
Expand Down Expand Up @@ -90,7 +90,7 @@ jobs:
runs-on: macos-12
steps:
- name: Checkout repository
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
with:
repository: microsoft/msquic
ref: ${{ inputs.ref }}
Expand All @@ -114,7 +114,7 @@ jobs:
runs-on: macos-12
steps:
- name: Checkout repository
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
with:
repository: microsoft/msquic
ref: ${{ inputs.ref }}
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/build-reuse-unix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ jobs:
image: ${{ (inputs.plat == 'linux' && format('ghcr.io/microsoft/msquic/linux-build-xcomp:{0}-{1}', inputs.os, (startsWith(inputs.arch, 'x') && 'x86_64') || 'arm')) || '' }}
steps:
- name: Checkout repository
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
with:
repository: microsoft/msquic
ref: ${{ inputs.ref }}
Expand All @@ -99,21 +99,21 @@ jobs:
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 }} ${{ inputs.xdp }}
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 }} -OneBranch
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 }}
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 }} -OneBranch
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@65462800fd760344b1a7b4382951275a0abb4808
with:
name: ${{ inputs.config }}-${{ inputs.plat }}-${{ inputs.os }}-${{ inputs.arch }}-${{ inputs.tls }}${{ inputs.static }}${{ inputs.clang }}${{ inputs.systemcrypto }}${{ inputs.codecheck }}${{ inputs.sanitize }}${{ inputs.build }}
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
2 changes: 1 addition & 1 deletion .github/workflows/build-reuse-win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
runs-on: ${{ inputs.os }}
steps:
- name: Checkout repository
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
with:
repository: microsoft/msquic
ref: ${{ inputs.ref }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-reuse-winkernel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
runs-on: ${{ inputs.os }}
steps:
- name: Checkout repository
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
with:
repository: microsoft/msquic
ref: ${{ inputs.ref }}
Expand Down
11 changes: 10 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ jobs:
static: ['', '-Static']
clang: ['', '-Clang']
codecheck: ['', '-CodeCheck']
xdp: ['', '-UseXdp']
exclude:
# Android doesn't support x86
- plat: android
Expand All @@ -126,6 +127,13 @@ jobs:
os: 'ubuntu-22.04'
tls: 'openssl'
systemcrypto: '-UseSystemOpenSSLCrypto'
# linux xdp is for ubuntu22.04 only for now
- plat: android
xdp: "-UseXdp"
- os: 'ubuntu-20.04'
xdp: "-UseXdp"
- arch: x86
xdp: "-UseXdp"
# Android doesn't use Clang
- plat: android
clang: '-Clang'
Expand Down Expand Up @@ -158,6 +166,7 @@ jobs:
static: ${{ matrix.static }}
clang: ${{ matrix.clang }}
codecheck: ${{ matrix.codecheck }}
xdp: ${{ matrix.xdp }}

build-darwin:
name: MacOs
Expand Down Expand Up @@ -194,7 +203,7 @@ jobs:
runs-on: windows-2022
steps:
- name: Checkout repository
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
- name: Download Build Artifacts
uses: dawidd6/action-download-artifact@09f2f74827fd3a8607589e5ad7f9398816f540fe
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/cargo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ jobs:
name: Cargo
steps:
- name: Harden Runner
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142
uses: step-security/harden-runner@f086349bfa2bd1361f7909c78558e816508cdc10
with:
egress-policy: audit
- name: Checkout repository
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
- name: Prepare Machine
run: scripts/prepare-machine.ps1 -Tls openssl -ForBuild
shell: pwsh
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-clog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
with:
dotnet-version: 6.0.x
- name: Checkout repository
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
- name: Prepare Machine
run: scripts/prepare-machine.ps1
shell: pwsh
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
with:
dotnet-version: 6.0.x
- name: Checkout repository
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
- name: Prepare Machine
run: scripts/prepare-machine.ps1
shell: pwsh
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/code-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
- "1ES.Pool=1es-msquic-pool"
- "1ES.ImageOverride=WinServerPrerelease"
steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
with:
fetch-depth: 0
- name: Download Build Artifacts
Expand Down Expand Up @@ -103,7 +103,7 @@ jobs:
pr-allocfail: 100
steps:
- name: Checkout repository
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
with:
fetch-depth: 0
- uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e
Expand Down Expand Up @@ -149,7 +149,7 @@ jobs:
pr-timeout: 600000
steps:
- name: Checkout repository
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
with:
fetch-depth: 0
- uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e
Expand Down Expand Up @@ -183,7 +183,7 @@ jobs:
runs-on: windows-2022
steps:
- name: Checkout repository
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
with:
fetch-depth: 0
- name: Prepare Machine
Expand Down Expand Up @@ -227,13 +227,13 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
- uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e
name: Download Merged Coverage Report
with:
name: merged
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@84508663e988701840491b86de86b666e8a86bed
uses: codecov/codecov-action@125fc84a9a348dbcf27191600683ec096ec9021c
with:
fail_ci_if_error: true
files: msquiccoverage.xml
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ jobs:

steps:
- name: Harden Runner
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142
uses: step-security/harden-runner@f086349bfa2bd1361f7909c78558e816508cdc10
with:
egress-policy: audit
- name: Checkout repository
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
with:
fetch-depth: 2
submodules: 'recursive'
Expand All @@ -51,7 +51,7 @@ jobs:
cmake --build . --target OpenSSL_Target
- name: Initialize CodeQL
uses: github/codeql-action/init@cdcdbb579706841c47f7063dda365e292e5cad7a
uses: github/codeql-action/init@f079b8493333aace61c81488f8bd40919487bd9f
with:
languages: cpp
config-file: ./.github/codeql/codeql-config.yml
Expand All @@ -62,4 +62,4 @@ jobs:
cmake --build .
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@cdcdbb579706841c47f7063dda365e292e5cad7a
uses: github/codeql-action/analyze@f079b8493333aace61c81488f8bd40919487bd9f
Loading

0 comments on commit 930b0a6

Please sign in to comment.