Skip to content

Commit

Permalink
Merge branch 'main' into add_active_migration
Browse files Browse the repository at this point in the history
  • Loading branch information
masa-koz committed Jan 2, 2025
2 parents b85b832 + 453fb17 commit e5e4c7b
Show file tree
Hide file tree
Showing 23 changed files with 548 additions and 281 deletions.
5 changes: 3 additions & 2 deletions .CodeQL.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@
# https://eng.ms/docs/cloud-ai-platform/devdiv/one-engineering-system-1es/1es-docs/codeql/troubleshooting/bugs/generated-library-code
# (Access restricted to Microsoft employees only.)

# The following paths are explicitly classified which indicates they should no
# The following paths are explicitly classified which indicates they should not
# be analyzed by CodeQL and generate alerts.
path_classifiers:
docs:
- docs
generated:
- build
- src/cs
- src/generated
submodules:
- subodules
- submodules
1 change: 1 addition & 0 deletions .github/workflows/build-darwin-framework.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@ jobs:
uses: ./.github/workflows/build-reuse-darwin-framework.yml
with:
config: 'Release'
repo: ${{ github.repository }}
11 changes: 8 additions & 3 deletions .github/workflows/build-reuse-darwin-framework.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ on:
required: false
default: ''
type: string
repo:
required: false
default: microsoft/msquic
type: string
config:
required: false
default: 'Release'
Expand Down Expand Up @@ -46,6 +50,7 @@ jobs:
arch: ${{ matrix.arch }}
tls: ${{ inputs.tls }}
static: ${{ inputs.static }}
repo: ${{ inputs.repo }}

build-darwin-universal:
name: Build Universal Binaries
Expand All @@ -55,7 +60,7 @@ jobs:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
repository: microsoft/msquic
repository: ${{ inputs.repo}}
ref: ${{ inputs.ref }}
- name: Download Build Artifacts (x64)
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16
Expand Down Expand Up @@ -92,7 +97,7 @@ jobs:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
repository: microsoft/msquic
repository: ${{ inputs.repo}}
ref: ${{ inputs.ref }}
- name: Download Build Artifacts (x64)
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16
Expand All @@ -116,7 +121,7 @@ jobs:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
repository: microsoft/msquic
repository: ${{ inputs.repo}}
ref: ${{ inputs.ref }}
- name: Download Build Artifacts (iOS x64)
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/build-reuse-unix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ on:
required: false
default: ''
type: string
repo:
required: false
default: microsoft/msquic
type: string
config:
required: false
default: 'Release'
Expand Down Expand Up @@ -91,7 +95,7 @@ jobs:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
repository: microsoft/msquic
repository: ${{ inputs.repo}}
ref: ${{ inputs.ref }}
- name: Set ownership
if: inputs.plat == 'linux'
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/build-reuse-win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ on:
required: false
default: ''
type: string
repo:
required: false
default: microsoft/msquic
type: string
config:
required: false
default: 'Release'
Expand Down Expand Up @@ -71,7 +75,7 @@ jobs:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
repository: microsoft/msquic
repository: ${{ inputs.repo}}
ref: ${{ inputs.ref }}
- name: Install Perl
uses: shogo82148/actions-setup-perl@98dfedee230bcf1ee68d5b021931fc8d63f2016e
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/build-reuse-winkernel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ on:
required: false
default: ''
type: string
repo:
required: false
default: microsoft/msquic
type: string
config:
required: false
default: 'Release'
Expand Down Expand Up @@ -60,7 +64,7 @@ jobs:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
repository: microsoft/msquic
repository: ${{ inputs.repo}}
ref: ${{ inputs.ref }}
- name: Prepare Machine
shell: pwsh
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ jobs:
arch: ${{ matrix.arch }}
tls: ${{ matrix.tls }}
static: ${{ matrix.static }}
repo: ${{ github.repository }}

build-windows-kernel:
name: WinKernel
Expand All @@ -72,6 +73,7 @@ jobs:
os: ${{ matrix.os }}
arch: ${{ matrix.arch }}
tls: ${{ matrix.tls }}
repo: ${{ github.repository }}

build-ubuntu-cross-compile:
name: UbuntuArm
Expand All @@ -93,6 +95,7 @@ jobs:
arch: ${{ matrix.arch }}
tls: ${{ matrix.tls }}
static: ${{ matrix.static }}
repo: ${{ github.repository }}

build-ubuntu:
name: Ubuntu
Expand Down Expand Up @@ -177,6 +180,7 @@ jobs:
clang: ${{ matrix.clang }}
codecheck: ${{ matrix.codecheck }}
xdp: ${{ matrix.xdp }}
repo: ${{ github.repository }}

build-darwin:
name: MacOs
Expand All @@ -198,6 +202,7 @@ jobs:
arch: ${{ matrix.arch }}
tls: ${{ matrix.tls }}
static: ${{ matrix.static }}
repo: ${{ github.repository }}

build-nuget:
name: Build Nuget Package
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/cargo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ jobs:
- name: Install Cargo
if: runner.os == 'Linux'
run: curl https://sh.rustup.rs -sSf | sh -s -- -y
- name: Cargo fmt
run: cargo fmt --all -- --check
- name: Cargo clippy
run: cargo clippy --all-targets -- -D warnings
- name: Cargo build
run: cargo build --all ${{ matrix.features }}
- name: Cargo test
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/code-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ jobs:
tls: ${{ matrix.vec.tls }}
sanitize: ${{ matrix.vec.sanitize }}
build: ${{ matrix.vec.build }}
repo: ${{ github.repository }}

bvt-winlatest:
name: BVT WinPrerelease
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/dotnet-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
uses: ./.github/workflows/build-reuse-darwin-framework.yml
with:
config: 'Debug'
repo: ${{ github.repository }}

build-linux:
name: Ubuntu
Expand All @@ -45,6 +46,7 @@ jobs:
arch: ${{ matrix.vec.arch }}
tls: ${{ matrix.vec.tls }}
xdp: ${{ matrix.vec.xdp }}
repo: ${{ github.repository }}

build-windows:
name: Windows
Expand All @@ -63,6 +65,7 @@ jobs:
os: ${{ matrix.vec.os }}
arch: ${{ matrix.vec.arch }}
tls: ${{ matrix.vec.tls }}
repo: ${{ github.repository }}

dotnet-test:
name: DotNet Test
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/package-reuse-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ jobs:
clang: ${{ inputs.clang }}
build: ${{ inputs.build }}
xdp: ${{ inputs.xdp }}
repo: ${{ github.repository }}

package:
name: Package
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/stress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ jobs:
tls: ${{ matrix.vec.tls }}
sanitize: ${{ matrix.vec.sanitize }}
build: ${{ matrix.vec.build }}
repo: ${{ github.repository }}

build-unix:
name: Build Unix
Expand All @@ -66,6 +67,7 @@ jobs:
sanitize: ${{ matrix.vec.sanitize }}
build: ${{ matrix.vec.build }}
xdp: ${{ matrix.vec.xdp }}
repo: ${{ github.repository }}

stress:
name: Stress
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ jobs:
tls: ${{ matrix.vec.tls }}
build: ${{ matrix.vec.build }}
ref: ${{ inputs.ref || '' }}
repo: ${{ github.repository }}

build-windows:
name: Build WinUser
Expand All @@ -66,6 +67,7 @@ jobs:
sanitize: ${{ matrix.vec.sanitize }}
build: ${{ matrix.vec.build }}
ref: ${{ inputs.ref || '' }}
repo: ${{ github.repository }}

build-unix:
name: Build Unix
Expand Down Expand Up @@ -94,6 +96,7 @@ jobs:
build: ${{ matrix.vec.build }}
xdp: ${{ matrix.vec.xdp }}
ref: ${{ inputs.ref || '' }}
repo: ${{ github.repository }}

bvt:
name: BVT
Expand Down
40 changes: 20 additions & 20 deletions .github/workflows/wan-perf.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
name: WAN Perf

on:
push:
branches:
- main
paths:
- .github/workflows/wan-perf.yml
- src/core/*
- src/platform/*
- src/perf/*
pull_request:
branches:
- main
paths:
- .github/workflows/wan-perf.yml
- src/core/*
- src/platform/*
- src/perf/*
- submodules/openssl/*

workflow_dispatch:
# push:
# branches:
# - main
# paths:
# - .github/workflows/wan-perf.yml
# - src/core/*
# - src/platform/*
# - src/perf/*
# pull_request:
# branches:
# - main
# paths:
# - .github/workflows/wan-perf.yml
# - src/core/*
# - src/platform/*
# - src/perf/*
# - submodules/openssl/*
concurrency:
# Cancel any workflow currently in progress for the same PR.
# Allow running concurrently with any other commits.
Expand Down Expand Up @@ -92,11 +92,11 @@ jobs:
name: bin
path: artifacts/bin
- name: Run WAN Perf (QUIC only)
if: ${{ github.event_name == 'pull_request' }}
if: ${{ github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' }}
shell: pwsh
run: scripts/emulated-performance.ps1 -Debug -Protocol QUIC -LogProfile Performance.Light -NoDateLogDir -NumIterations ${{ env.iterations }} -DurationMs ${{ env.duration }} -Pacing ${{ env.pacing }} -BottleneckMbps ${{ matrix.rate }} -RttMs ${{ matrix.rtt }} -BottleneckQueueRatio ${{ matrix.queueRatio }} -RandomLossDenominator ${{ env.loss }} -RandomReorderDenominator ${{ env.reorder }} -ReorderDelayDeltaMs ${{ env.delay }} -BaseRandomSeed ${{ env.seed }} -CongestionControl ${{ env.congestionControl }}
- name: Run WAN Perf (QUIC + TCP)
if: ${{ github.event_name != 'pull_request' }}
if: ${{ github.event_name != 'pull_request' && github.event_name != 'workflow_dispatch' }}
shell: pwsh
run: scripts/emulated-performance.ps1 -Debug -Protocol ('QUIC','TCPTLS') -LogProfile Performance.Light -NoDateLogDir -NumIterations ${{ env.iterations }} -DurationMs ${{ env.duration }} -Pacing ${{ env.pacing }} -BottleneckMbps ${{ matrix.rate }} -RttMs ${{ matrix.rtt }} -BottleneckQueueRatio ${{ matrix.queueRatio }} -RandomLossDenominator ${{ env.loss }} -RandomReorderDenominator ${{ env.reorder }} -ReorderDelayDeltaMs ${{ env.delay }} -BaseRandomSeed ${{ env.seed }} -CongestionControl ${{ env.congestionControl }}
- name: Upload Results
Expand Down
3 changes: 0 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,6 @@ elseif (UNIX)
endif()
message(STATUS "QUIC Platform: ${CX_PLATFORM}")

set(FILENAME_DEP_REPLACE "get_filename_component(SELF_DIR \"$\{CMAKE_CURRENT_LIST_FILE\}\" PATH)")
set(SELF_DIR "$\{SELF_DIR\}")

enable_testing()

# Set the default TLS method for each platform.
Expand Down
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ include = [
[features]
default = []
static = []
preview-api = []

[build-dependencies]
cmake = "0.1"
Expand All @@ -56,3 +57,5 @@ bitfield = "0.17.0"
libc = "0.2.0"
c-types = "4.0.0"
serde = { version = "1.0.117", features = ["derive"] }
ctor = "0.2.9"
socket2 = "0.5.8"
4 changes: 2 additions & 2 deletions scripts/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// Licensed under the MIT License.

use cmake::Config;
use std::path::Path;
use std::env;
use std::path::Path;

fn main() {
let path_extra = "lib";
Expand Down Expand Up @@ -38,7 +38,7 @@ fn main() {
"aarch64-apple-darwin" => config
.define("CMAKE_OSX_ARCHITECTURES", "arm64")
.define("CMAKE_OSX_DEPLOYMENT_TARGET", "14.5"),
_ => &mut config
_ => &mut config,
};

let dst = config.build();
Expand Down
3 changes: 2 additions & 1 deletion src/bin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ endif()

if(BUILD_SHARED_LIBS)
add_library(msquic SHARED ${SOURCES})
target_include_directories(msquic PUBLIC $<INSTALL_INTERFACE:include>)
target_link_libraries(msquic PRIVATE core msquic_platform inc warnings logging base_link main_binary_link_args)
set_target_properties(msquic PROPERTIES OUTPUT_NAME ${QUIC_LIBRARY_NAME})
if (NOT WIN32)
Expand Down Expand Up @@ -269,7 +270,7 @@ else()
endif()
install(FILES ${PUBLIC_HEADERS} DESTINATION include)

configure_file(msquic-config.cmake.in ${CMAKE_BINARY_DIR}/msquic-config.cmake)
configure_file(msquic-config.cmake.in ${CMAKE_BINARY_DIR}/msquic-config.cmake @ONLY)

install(FILES ${CMAKE_BINARY_DIR}/msquic-config.cmake DESTINATION share/msquic)

Expand Down
5 changes: 0 additions & 5 deletions src/bin/msquic-config-unix.cmake.in

This file was deleted.

3 changes: 1 addition & 2 deletions src/bin/msquic-config.cmake.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
include(CMakeFindDependencyMacro)
@FILENAME_DEP_REPLACE@

include(${SELF_DIR}/msquic.cmake)
include("${CMAKE_CURRENT_LIST_DIR}/msquic.cmake")

foreach(_t IN ITEMS msquic msquic_platform)
if(TARGET msquic::${_t} AND NOT TARGET ${_t})
Expand Down
Loading

0 comments on commit e5e4c7b

Please sign in to comment.