Skip to content

Commit 12ebc64

Browse files
committed
Backport dotnet#119273 for msquic and more test excludes
1 parent 5af23a6 commit 12ebc64

File tree

4 files changed

+24
-42
lines changed

4 files changed

+24
-42
lines changed

eng/Versions.props

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,6 @@
225225
<MicrosoftNETCoreRuntimeICUTransportVersion>9.0.0-rtm.24466.4</MicrosoftNETCoreRuntimeICUTransportVersion>
226226
<!-- MsQuic -->
227227
<MicrosoftNativeQuicMsQuicSchannelVersion>2.4.8</MicrosoftNativeQuicMsQuicSchannelVersion>
228-
<SystemNetMsQuicTransportVersion>9.0.0-alpha.1.24167.3</SystemNetMsQuicTransportVersion>
229228
<!-- Mono LLVM -->
230229
<runtimelinuxarm64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>19.1.0-alpha.1.25414.3</runtimelinuxarm64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>
231230
<runtimelinuxarm64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>19.1.0-alpha.1.25414.3</runtimelinuxarm64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>

src/libraries/System.Net.Quic/readme.md

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -77,15 +77,19 @@ Testing on Linux is done with the help of docker images whose definition can be
7777

7878
To consume a release version of the package, the docker image definition will contain:
7979
```docker
80-
RUN curl -LO https://packages.microsoft.com/keys/microsoft.asc && \
81-
echo 2cfd20a306b2fa5e25522d78f2ef50a1f429d35fd30bd983e2ebffc2b80944fa microsoft.asc | sha256sum --check - && \
82-
apt-key add microsoft.asc && \
83-
rm microsoft.asc && \
84-
apt-add-repository https://packages.microsoft.com/debian/11/prod && \
85-
apt-get update && \
86-
apt-get install -y libmsquic
80+
RUN apt-get update \
81+
&& apt-get upgrade -y \
82+
&& apt-get install -y \
83+
apt-transport-https \
84+
curl \
85+
software-properties-common \
86+
&& curl -sL https://packages.microsoft.com/config/debian/12/packages-microsoft-prod.deb -o packages-microsoft-prod.deb \
87+
&& dpkg -i packages-microsoft-prod.deb \
88+
&& rm packages-microsoft-prod.deb \
89+
&& apt-get update \
90+
&& apt-get install -y libmsquic
8791
```
88-
Source: https://github.com/dotnet/dotnet-buildtools-prereqs-docker/blob/efbcd1079edef4698ada1676a5e33c4c9672f85a/src/debian/11/helix/amd64/Dockerfile#L44-L52
92+
Source: https://github.com/dotnet/dotnet-buildtools-prereqs-docker/blob/7f86167248bcbda898a6b7f17ed01dce3adff2dd/src/debian/12/helix/amd64/Dockerfile#L22-L31
8993

9094
To consume the current main branch of msquic, we pull code from [dotnet/msquic](https://github.com/dotnet/msquic) and build it locally in our docker image:
9195
```docker
@@ -94,13 +98,13 @@ RUN apt-get update -y && \
9498
apt-get upgrade -y && \
9599
apt-get install -y cmake clang ruby-dev gem lttng-tools libssl-dev && \
96100
gem install fpm
97-
RUN git clone --recursive https://github.com/dotnet/msquic
98-
RUN cd msquic/src/msquic && \
101+
RUN git clone --depth 1 --single-branch --branch main --recursive https://github.com/microsoft/msquic
102+
RUN cd msquic/ && \
99103
mkdir build && \
100-
cmake -B build -DCMAKE_BUILD_TYPE=Release -DQUIC_ENABLE_LOGGING=false -DQUIC_USE_SYSTEM_LIBCRYPTO=true -DQUIC_BUILD_TOOLS=off -DQUIC_BUILD_TEST=off -DQUIC_BUILD_PERF=off && \
104+
cmake -B build -DCMAKE_BUILD_TYPE=Debug -DQUIC_ENABLE_LOGGING=false -DQUIC_USE_SYSTEM_LIBCRYPTO=true -DQUIC_BUILD_TOOLS=off -DQUIC_BUILD_TEST=off -DQUIC_BUILD_PERF=off -DQUIC_TLS_LIB=quictls -DQUIC_ENABLE_SANITIZERS=on && \
101105
cd build && \
102-
cmake --build . --config Release
103-
RUN cd msquic/src/msquic/build/bin/Release && \
106+
cmake --build . --config Debug
107+
RUN cd msquic/build/bin/Debug && \
104108
rm libmsquic.so && \
105109
fpm -f -s dir -t deb -n libmsquic -v $( find -type f | cut -d "." -f 4- ) \
106110
--license MIT --url https://github.com/microsoft/msquic --log error \
@@ -109,15 +113,10 @@ RUN cd msquic/src/msquic/build/bin/Release && \
109113
```
110114

111115
Source:
112-
https://github.com/dotnet/runtime/blob/bd540938a4830ee91dec5ee2d39545b2f69a19d5/src/libraries/System.Net.Http/tests/StressTests/HttpStress/Dockerfile#L4-L21
116+
https://github.com/dotnet/runtime/blob/c6566fb0bcc539c523be9796ba5af681bf65a904/src/libraries/System.Net.Http/tests/StressTests/HttpStress/Dockerfile#L4-L21
113117

114118
Note that to propagate newest sources / package to the docker image used for the test runs, it must be rebuilt by [dotnet-buildtools-prereqs-docker-all](https://dev.azure.com/dnceng/internal/_build?definitionId=1183&_a=summary) pipeline with `noCache = true` variable. And since [#76630](https://github.com/dotnet/runtime/pull/76630), the newest image will get automatically picked up by the dotnet/runtime infra.
115119

116120
### Windows
117121

118-
Officially released `msquic.dll` is published to NuGet.org, see [Microsoft.Native.Quic.MsQuic.Schannel](https://www.nuget.org/packages/Microsoft.Native.Quic.MsQuic.Schannel).
119-
120-
To consume MsQuic from the current main branch, we use [dotnet/msquic](https://github.com/dotnet/msquic) repository which will build and publish `msquic.dll` to the transport feed, e.g. [dotnet8-transport](https://dev.azure.com/dnceng/public/_artifacts/feed/dotnet8-transport). And from there, it'll get flown into this repository via [Darc subscription](https://github.com/dotnet/arcade/blob/main/Documentation/Darc.md). See https://github.com/dotnet/runtime/blob/bd540938a4830ee91dec5ee2d39545b2f69a19d5/eng/Version.Details.xml#L7-L10 and maestro-bot PR: https://github.com/dotnet/runtime/pull/71900.
121-
122-
123-
System.Net.Quic [project file](https://github.com/dotnet/runtime/blob/0304f1f5157a8280fa093bdfc7cfb8d9f62e016f/src/libraries/System.Net.Quic/src/System.Net.Quic.csproj) allows switching between those two options with [`UseQuicTransportPackage` property](https://github.com/dotnet/runtime/blob/0304f1f5157a8280fa093bdfc7cfb8d9f62e016f/src/libraries/System.Net.Quic/src/System.Net.Quic.csproj#L15).
122+
Officially released `msquic.dll` is published to NuGet.org, see [Microsoft.Native.Quic.MsQuic.Schannel](https://www.nuget.org/packages/Microsoft.Native.Quic.MsQuic.Schannel).

src/libraries/System.Net.Quic/src/System.Net.Quic.csproj

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@
1515
<DefineConstants Condition="'$(TargetPlatformIdentifier)' == 'windows'">$(DefineConstants);TARGET_WINDOWS</DefineConstants>
1616
<GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetPlatformIdentifier)' == ''">SR.SystemNetQuic_PlatformNotSupported</GeneratePlatformNotSupportedAssemblyMessage>
1717
<ApiExclusionListPath Condition="'$(TargetPlatformIdentifier)' == ''">ExcludeApiList.PNSE.txt</ApiExclusionListPath>
18-
<!-- This controls if we consume official binaries from MsQuic or if we use binaries published from dotnet/msquic repo.
19-
Release branches should generally consume MsQuic release code, transport allows us to consume and test pre-released versions -->
20-
<UseQuicTransportPackage Condition="'$(UseQuicTransportPackage)' == ''">false</UseQuicTransportPackage>
2118
</PropertyGroup>
2219

2320
<!-- Source files -->
@@ -159,26 +156,13 @@
159156
'$(DotNetBuildSourceOnly)' != 'true'">
160157

161158
<!-- Project references -->
162-
<PackageReference Include="runtime.win-$(TargetArchitecture).runtime.native.System.Net.MsQuic.Transport"
163-
Version="$(SystemNetMsQuicTransportVersion)"
164-
PrivateAssets="all"
165-
Condition="'$(UseQuicTransportPackage)' == 'true'"
166-
GeneratePathProperty="true" />
167-
168159
<PackageReference Include="Microsoft.Native.Quic.MsQuic.Schannel"
169160
Version="$(MicrosoftNativeQuicMsQuicSchannelVersion)"
170161
PrivateAssets="all"
171162
Condition="'$(UseQuicTransportPackage)' != 'true'"
172163
GeneratePathProperty="true" />
173164

174-
<NativeBinPlaceItem Include="$(PkgMicrosoft_Native_Quic_MsQuic_Schannel)\build\native\bin\$(TargetArchitecture)\*"
175-
Condition="'$(UseQuicTransportPackage)' != 'true'" />
176-
<NativeBinPlaceItem Include="$(PkgRuntime_win-x64_runtime_native_System_Net_MsQuic_Transport)\runtimes\win-$(TargetArchitecture)\native\*"
177-
Condition="'$(UseQuicTransportPackage)' == 'true'" />
178-
<NativeBinPlaceItem Include="$(PkgRuntime_win-x86_runtime_native_System_Net_MsQuic_Transport)\runtimes\win-$(TargetArchitecture)\native\*"
179-
Condition="'$(UseQuicTransportPackage)' == 'true'" />
180-
<NativeBinPlaceItem Include="$(PkgRuntime_win-arm64_runtime_native_System_Net_MsQuic_Transport)\runtimes\win-$(TargetArchitecture)\native\*"
181-
Condition="'$(UseQuicTransportPackage)' == 'true'" />
165+
<NativeBinPlaceItem Include="$(PkgMicrosoft_Native_Quic_MsQuic_Schannel)\build\native\bin\$(TargetArchitecture)\*" />
182166
</ItemGroup>
183167

184168
<!-- Include msquic in debug version for macOS so we can test it without packages. -->
@@ -188,11 +172,11 @@
188172
'$(Configuration)' == 'Debug' and
189173
'$(DotNetBuildSourceOnly)' != 'true'">
190174
<!-- MsQuic packages do not have macOS binaries. Our transport package is only one source. -->
191-
<PackageReference Include="runtime.osx-$(TargetArchitecture).runtime.native.System.Net.MsQuic.Transport"
192-
Version="$(SystemNetMsQuicTransportVersion)"
175+
<PackageReference Include="MsQuic.Native"
176+
Version="2.5.6"
193177
PrivateAssets="all"
194178
GeneratePathProperty="true" />
195-
<NativeBinPlaceItem Include="$(PkgRuntime_osx-x64_runtime_native_System_Net_MsQuic_Transport)\runtimes\osx-$(TargetArchitecture)\native\*" />
179+
<NativeBinPlaceItem Include="$(PkgMsQuic_Native)\runtimes\osx-$(TargetArchitecture)\native\*" />
196180
</ItemGroup>
197181
<ItemGroup Condition="'@(NativeBinplaceItem)' != ''">
198182
<BinPlaceDir Include="$(MicrosoftNetCoreAppRuntimePackNativeDir)" ItemName="NativeBinPlaceItem" />

src/libraries/tests.proj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
<HighAOTResourceRequiringProject Include="$(MSBuildThisFileDirectory)System.Text.Json\tests\System.Text.Json.Tests\System.Text.Json.Tests.csproj" />
4141
</ItemGroup>
4242

43-
<ItemGroup Condition="'$(TargetOS)' == 'osx' and '$(TargetArchitecture)' == 'arm64'">
43+
<ItemGroup Condition="'$(TargetOS)' == 'osx' and ('$(TargetArchitecture)' == 'arm64' or '$(TargetArchitecture)' == 'x64')">
4444
<!-- https://github.com/dotnet/dnceng/issues/3008 - osx Helix queue doesn't have OpenSSL -->
4545
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Security.Cryptography.OpenSsl\tests\System.Security.Cryptography.OpenSsl.Tests.csproj" />
4646
</ItemGroup>

0 commit comments

Comments
 (0)