Skip to content

Commit 678556d

Browse files
authored
Remove OS-Specific Builds (#4474)
* Make TDS.Endpoint OS-agnostic * WIP * Make performance tests OS agnostic * Remove os-specific kerberos building * Drop windows_nt/unix from folder paths in the nuspec * Some remaining junk. Want to test it now. * Fix name of property in build.proj * Reinstate windows-specific behavior when building/running perf tests.
1 parent 3473f48 commit 678556d

22 files changed

Lines changed: 139 additions & 525 deletions

build.proj

Lines changed: 18 additions & 185 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@
139139

140140
<!--
141141
ReferenceType
142-
Applies to: BuildSqlClient, BuildSqlClientUnix, BuildSqlClientWindows
142+
Applies to: BuildSqlClient, BuildSqlClientImpl
143143
Description: Determines how to build SqlClient. If set to "Project", any cross-project
144144
references (eg, Abstractions from SqlClient) will be made as project
145145
references. If set to "Package", package references will be made instead. When
@@ -426,7 +426,7 @@
426426

427427
<!-- Build SqlClient Targets =============================================== -->
428428
<!-- BuildSqlClient: Builds all binaries for SqlClient -->
429-
<Target Name="BuildSqlClient" DependsOnTargets="BuildSqlClientUnix;BuildSqlClientWindows;BuildSqlClientRef;BuildSqlClientNotSupported" />
429+
<Target Name="BuildSqlClient" DependsOnTargets="BuildSqlClientImpl;BuildSqlClientRef;BuildSqlClientNotSupported" />
430430

431431
<!--
432432
BuildSqlClientNotSupported: Builds a version of the SqlClient assemblies that always throws
@@ -509,16 +509,15 @@
509509
<Exec ConsoleToMsBuild="true" Command="$(DotnetCommand)" />
510510
</Target>
511511

512-
<!-- BuildSqlClientUnix: Builds all unix-specific SqlClient binaries -->
512+
<!-- BuildSqlClientImpl: Builds implementation assemblies of SqlClient -->
513513
<PropertyGroup>
514-
<BuildSqlClientUnixDependsOn Condition="'$(ReferenceType.ToLower())' == 'package' AND '$(SkipDependencyPack)' != 'true'">PackLogging;PackAbstractions;PackSqlServer</BuildSqlClientUnixDependsOn>
514+
<BuildSqlClientImplDependsOn Condition="'$(ReferenceType.ToLower())' == 'package' AND '$(SkipDependencyPack)' != 'true'">PackLogging;PackAbstractions;PackSqlServer</BuildSqlClientImplDependsOn>
515515
</PropertyGroup>
516-
<Target Name="BuildSqlClientUnix" DependsOnTargets="$(BuildSqlClientUnixDependsOn)">
516+
<Target Name="BuildSqlClientImpl" DependsOnTargets="$(BuildSqlClientImplDependsOn)">
517517
<PropertyGroup>
518518
<DotnetCommand>
519519
"$(DotnetPath)dotnet" build $(SqlClientProjectPath)
520520
-p:Configuration=$(Configuration)
521-
-p:TargetOs=Unix
522521
$(SigningKeyPathArgument)
523522

524523
<!-- Versioning arguments -->
@@ -534,36 +533,7 @@
534533
<DotnetCommand>$([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " "))</DotnetCommand>
535534
</PropertyGroup>
536535

537-
<Message Importance="High" Text=">>> Building SqlClient for Unix"/>
538-
<Message Text=" Command: $(DotnetCommand)"/>
539-
<Exec ConsoleToMsBuild="true" Command="$(DotnetCommand)" />
540-
</Target>
541-
542-
<!-- BuildSqlClientWindows: Builds all windows-specific SqlClient binaries -->
543-
<PropertyGroup>
544-
<BuildSqlClientWindowsDependsOn Condition="'$(ReferenceType.ToLower())' == 'package' AND '$(SkipDependencyPack)' != 'true'">PackLogging;PackAbstractions;PackSqlServer</BuildSqlClientWindowsDependsOn>
545-
</PropertyGroup>
546-
<Target Name="BuildSqlClientWindows" DependsOnTargets="$(BuildSqlClientWindowsDependsOn)">
547-
<PropertyGroup>
548-
<DotnetCommand>
549-
"$(DotnetPath)dotnet" build $(SqlClientProjectPath)
550-
-p:Configuration=$(Configuration)
551-
-p:TargetOs=Windows_NT
552-
$(SigningKeyPathArgument)
553-
554-
<!-- Versioning Arguments -->
555-
$(BuildNumberArgument)
556-
$(BuildSuffixArgument)
557-
$(PackageVersionSqlClientArgument)
558-
559-
<!-- Reference Type Arguments -->
560-
$(ReferenceTypeArgument)
561-
$(PackageVersionSqlServerArgument)
562-
</DotnetCommand>
563-
<!-- Convert more than one whitespace character into one space -->
564-
<DotnetCommand>$([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " "))</DotnetCommand>
565-
</PropertyGroup>
566-
<Message Importance="High" Text=">>> Building SqlClient for Windows"/>
536+
<Message Importance="High" Text=">>> Building SqlClient Implementation"/>
567537
<Message Text=" Command: $(DotnetCommand)"/>
568538
<Exec ConsoleToMsBuild="true" Command="$(DotnetCommand)" />
569539
</Target>
@@ -1212,14 +1182,11 @@
12121182
</Target>
12131183

12141184
<!-- BuildSqlClientTestsUnit ================================================= -->
1215-
<Target Name="BuildSqlClientTestsUnit" DependsOnTargets="BuildSqlClientTestsUnitUnix;BuildSqlClientTestsUnitWindows" />
1216-
1217-
<Target Name="BuildSqlClientTestsUnitUnix">
1185+
<Target Name="BuildSqlClientTestsUnit">
12181186
<PropertyGroup>
12191187
<DotnetCommand>
12201188
"$(DotnetPath)dotnet" build "$(SqlClientUnitTestProjectPath)"
12211189
-p:Configuration=$(Configuration)
1222-
-p:TargetOs=Unix
12231190

12241191
<!-- Reference Type Arguments -->
12251192
$(ReferenceTypeArgument)
@@ -1229,60 +1196,17 @@
12291196
</DotnetCommand>
12301197
<DotnetCommand>$([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " "))</DotnetCommand>
12311198
</PropertyGroup>
1232-
<Message Importance="High" Text=">>> Building SqlClient Unit Tests for Unix"/>
1233-
<Message Text=" Command: $(DotnetCommand)"/>
1234-
<Exec ConsoleToMsBuild="true" Command="$(DotnetCommand)" />
1235-
</Target>
1236-
1237-
<Target Name="BuildSqlClientTestsUnitWindows">
1238-
<PropertyGroup>
1239-
<DotnetCommand>
1240-
"$(DotnetPath)dotnet" build "$(SqlClientUnitTestProjectPath)"
1241-
-p:Configuration=$(Configuration)
1242-
-p:TargetOs=Windows_NT
1243-
1244-
<!-- Reference Type Arguments -->
1245-
$(ReferenceTypeArgument)
1246-
$(TestSigningKeyPathArgument)
1247-
$(PackageVersionSqlClientArgument)
1248-
$(PackageVersionSqlServerArgument)
1249-
</DotnetCommand>
1250-
<DotnetCommand>$([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " "))</DotnetCommand>
1251-
</PropertyGroup>
1252-
<Message Importance="High" Text=">>> Building SqlClient Unit Tests for Windows"/>
1199+
<Message Importance="High" Text=">>> Building SqlClient Unit Tests"/>
12531200
<Message Text=" Command: $(DotnetCommand)"/>
12541201
<Exec ConsoleToMsBuild="true" Command="$(DotnetCommand)" />
12551202
</Target>
12561203

12571204
<!-- BuildSqlClientTestsFunctional =========================================== -->
1258-
<Target Name="BuildSqlClientTestsFunctional" DependsOnTargets="BuildSqlClientTestsFunctionalUnix;BuildSqlClientTestsFunctionalWindows" />
1259-
1260-
<Target Name="BuildSqlClientTestsFunctionalUnix">
1261-
<PropertyGroup>
1262-
<DotnetCommand>
1263-
"$(DotnetPath)dotnet" build "$(SqlClientFunctionalTestProjectPath)"
1264-
-p:Configuration=$(Configuration)
1265-
-p:TargetOs=Unix
1266-
1267-
<!-- Reference Type Arguments -->
1268-
$(ReferenceTypeArgument)
1269-
$(PackageVersionAbstractionsArgument)
1270-
$(PackageVersionLoggingArgument)
1271-
$(PackageVersionSqlClientArgument)
1272-
</DotnetCommand>
1273-
<DotnetCommand>$([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " "))</DotnetCommand>
1274-
</PropertyGroup>
1275-
<Message Importance="High" Text=">>> Building SqlClient Functional Tests for Unix"/>
1276-
<Message Text=" Command: $(DotnetCommand)"/>
1277-
<Exec ConsoleToMsBuild="true" Command="$(DotnetCommand)" />
1278-
</Target>
1279-
1280-
<Target Name="BuildSqlClientTestsFunctionalWindows">
1205+
<Target Name="BuildSqlClientTestsFunctional">
12811206
<PropertyGroup>
12821207
<DotnetCommand>
12831208
"$(DotnetPath)dotnet" build "$(SqlClientFunctionalTestProjectPath)"
12841209
-p:Configuration=$(Configuration)
1285-
-p:TargetOs=Windows_NT
12861210

12871211
<!-- Reference Type Arguments -->
12881212
$(ReferenceTypeArgument)
@@ -1292,41 +1216,17 @@
12921216
</DotnetCommand>
12931217
<DotnetCommand>$([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " "))</DotnetCommand>
12941218
</PropertyGroup>
1295-
<Message Importance="High" Text=">>> Building SqlClient Functional Tests for Windows"/>
1219+
<Message Importance="High" Text=">>> Building SqlClient Functional Tests"/>
12961220
<Message Text=" Command: $(DotnetCommand)"/>
12971221
<Exec ConsoleToMsBuild="true" Command="$(DotnetCommand)" />
12981222
</Target>
12991223

13001224
<!-- BuildSqlClientTestsManual =============================================== -->
1301-
<Target Name="BuildSqlClientTestsManual" DependsOnTargets="BuildSqlClientTestsManualUnix;BuildSqlClientTestsManualWindows" />
1302-
1303-
<Target Name="BuildSqlClientTestsManualUnix">
1304-
<PropertyGroup>
1305-
<DotnetCommand>
1306-
"$(DotnetPath)dotnet" build "$(SqlClientManualTestProjectPath)"
1307-
-p:Configuration=$(Configuration)
1308-
-p:TargetOs=Unix
1309-
1310-
<!-- Reference Type Arguments -->
1311-
$(ReferenceTypeArgument)
1312-
$(PackageVersionAbstractionsArgument)
1313-
$(PackageVersionLoggingArgument)
1314-
$(PackageVersionSqlClientArgument)
1315-
$(PackageVersionSqlServerArgument)
1316-
</DotnetCommand>
1317-
<DotnetCommand>$([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " "))</DotnetCommand>
1318-
</PropertyGroup>
1319-
<Message Importance="High" Text=">>> Building SqlClient Manual Tests for Unix"/>
1320-
<Message Text=" Command: $(DotnetCommand)"/>
1321-
<Exec ConsoleToMsBuild="true" Command="$(DotnetCommand)" />
1322-
</Target>
1323-
1324-
<Target Name="BuildSqlClientTestsManualWindows">
1225+
<Target Name="BuildSqlClientTestsManual">
13251226
<PropertyGroup>
13261227
<DotnetCommand>
13271228
"$(DotnetPath)dotnet" build "$(SqlClientManualTestProjectPath)"
13281229
-p:Configuration=$(Configuration)
1329-
-p:TargetOs=Windows_NT
13301230

13311231
<!-- Reference Type Arguments -->
13321232
$(ReferenceTypeArgument)
@@ -1337,20 +1237,17 @@
13371237
</DotnetCommand>
13381238
<DotnetCommand>$([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " "))</DotnetCommand>
13391239
</PropertyGroup>
1340-
<Message Importance="High" Text=">>> Building SqlClient Manual Tests for Windows"/>
1240+
<Message Importance="High" Text=">>> Building SqlClient Manual Tests"/>
13411241
<Message Text=" Command: $(DotnetCommand)"/>
13421242
<Exec ConsoleToMsBuild="true" Command="$(DotnetCommand)" />
13431243
</Target>
13441244

13451245
<!-- BuildSqlClientTestsPerformance ========================================== -->
1346-
<Target Name="BuildSqlClientTestsPerformance" DependsOnTargets="BuildSqlClientTestsPerformanceUnix;BuildSqlClientTestsPerformanceWindows" />
1347-
1348-
<Target Name="BuildSqlClientTestsPerformanceUnix">
1246+
<Target Name="BuildSqlClientTestsPerformance">
13491247
<PropertyGroup>
13501248
<DotnetCommand>
13511249
"$(DotnetPath)dotnet" build "$(SqlClientPerformanceTestProjectPath)"
13521250
-p:Configuration=$(Configuration)
1353-
-p:TargetOs=Unix
13541251

13551252
<!-- Reference Type Arguments -->
13561253
$(ReferenceTypeArgument)
@@ -1360,40 +1257,17 @@
13601257
</DotnetCommand>
13611258
<DotnetCommand>$([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " "))</DotnetCommand>
13621259
</PropertyGroup>
1363-
<Message Importance="High" Text=">>> Building SqlClient Performance Tests for Unix"/>
1364-
<Message Text=" Command: $(DotnetCommand)"/>
1365-
<Exec ConsoleToMsBuild="true" Command="$(DotnetCommand)" />
1366-
</Target>
1367-
1368-
<Target Name="BuildSqlClientTestsPerformanceWindows">
1369-
<PropertyGroup>
1370-
<DotnetCommand>
1371-
"$(DotnetPath)dotnet" build "$(SqlClientPerformanceTestProjectPath)"
1372-
-p:Configuration=$(Configuration)
1373-
-p:TargetOs=Windows_NT
1374-
1375-
<!-- Reference Type Arguments -->
1376-
$(ReferenceTypeArgument)
1377-
$(PackageVersionAbstractionsArgument)
1378-
$(PackageVersionLoggingArgument)
1379-
$(PackageVersionSqlClientArgument)
1380-
</DotnetCommand>
1381-
<DotnetCommand>$([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " "))</DotnetCommand>
1382-
</PropertyGroup>
1383-
<Message Importance="High" Text=">>> Building SqlClient Performance Tests for Windows"/>
1260+
<Message Importance="High" Text=">>> Building SqlClient Performance Tests"/>
13841261
<Message Text=" Command: $(DotnetCommand)"/>
13851262
<Exec ConsoleToMsBuild="true" Command="$(DotnetCommand)" />
13861263
</Target>
13871264

13881265
<!-- BuildSqlClientTestsStress =============================================== -->
1389-
<Target Name="BuildSqlClientTestsStress" DependsOnTargets="BuildSqlClientTestsStressUnix;BuildSqlClientTestsStressWindows" />
1390-
1391-
<Target Name="BuildSqlClientTestsStressUnix">
1266+
<Target Name="BuildSqlClientTestsStress">
13921267
<PropertyGroup>
13931268
<DotnetCommand>
13941269
"$(DotnetPath)dotnet" build "$(SqlClientStressTestProjectPath)"
13951270
-p:Configuration=$(Configuration)
1396-
-p:TargetOs=Unix
13971271

13981272
<!-- Reference Type Arguments -->
13991273
$(ReferenceTypeArgument)
@@ -1403,66 +1277,25 @@
14031277
</DotnetCommand>
14041278
<DotnetCommand>$([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " "))</DotnetCommand>
14051279
</PropertyGroup>
1406-
<Message Importance="High" Text=">>> Building SqlClient Stress Tests for Unix"/>
1407-
<Message Text=" Command: $(DotnetCommand)"/>
1408-
<Exec ConsoleToMsBuild="true" Command="$(DotnetCommand)" />
1409-
</Target>
1410-
1411-
<Target Name="BuildSqlClientTestsStressWindows">
1412-
<PropertyGroup>
1413-
<DotnetCommand>
1414-
"$(DotnetPath)dotnet" build "$(SqlClientStressTestProjectPath)"
1415-
-p:Configuration=$(Configuration)
1416-
-p:TargetOs=Windows_NT
1417-
1418-
<!-- Reference Type Arguments -->
1419-
$(ReferenceTypeArgument)
1420-
$(PackageVersionAbstractionsArgument)
1421-
$(PackageVersionLoggingArgument)
1422-
$(PackageVersionSqlClientArgument)
1423-
</DotnetCommand>
1424-
<DotnetCommand>$([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " "))</DotnetCommand>
1425-
</PropertyGroup>
1426-
<Message Importance="High" Text=">>> Building SqlClient Stress Tests for Windows"/>
1280+
<Message Importance="High" Text=">>> Building SqlClient Stress Tests"/>
14271281
<Message Text=" Command: $(DotnetCommand)"/>
14281282
<Exec ConsoleToMsBuild="true" Command="$(DotnetCommand)" />
14291283
</Target>
14301284

14311285
<!-- BuildAzureTests ========================================================= -->
1432-
<Target Name="BuildAzureTests" DependsOnTargets="BuildAzureTestsUnix;BuildAzureTestsWindows" />
1433-
1434-
<Target Name="BuildAzureTestsUnix">
1435-
<PropertyGroup>
1436-
<DotnetCommand>
1437-
"$(DotnetPath)dotnet" build "$(AzureTestProjectPath)"
1438-
-p:Configuration=$(Configuration)
1439-
-p:TargetOs=Unix
1440-
1441-
<!-- Reference Type Arguments -->
1442-
$(ReferenceTypeArgument)
1443-
$(PackageVersionSqlClientArgument)
1444-
</DotnetCommand>
1445-
<DotnetCommand>$([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " "))</DotnetCommand>
1446-
</PropertyGroup>
1447-
<Message Importance="High" Text=">>> Building Azure Tests for Unix"/>
1448-
<Message Text=" Command: $(DotnetCommand)"/>
1449-
<Exec ConsoleToMsBuild="true" Command="$(DotnetCommand)" />
1450-
</Target>
1451-
1452-
<Target Name="BuildAzureTestsWindows">
1286+
<Target Name="BuildAzureTests">
14531287
<PropertyGroup>
14541288
<DotnetCommand>
14551289
"$(DotnetPath)dotnet" build "$(AzureTestProjectPath)"
14561290
-p:Configuration=$(Configuration)
1457-
-p:TargetOs=Windows_NT
14581291

14591292
<!-- Reference Type Arguments -->
14601293
$(ReferenceTypeArgument)
14611294
$(PackageVersionSqlClientArgument)
14621295
</DotnetCommand>
14631296
<DotnetCommand>$([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " "))</DotnetCommand>
14641297
</PropertyGroup>
1465-
<Message Importance="High" Text=">>> Building Azure Tests for Windows"/>
1298+
<Message Importance="High" Text=">>> Building Azure Tests"/>
14661299
<Message Text=" Command: $(DotnetCommand)"/>
14671300
<Exec ConsoleToMsBuild="true" Command="$(DotnetCommand)" />
14681301
</Target>

eng/pipelines/ci/kerberos/build-and-test-steps.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
# Shared build-and-test steps used by both the Windows and Linux Kerberos jobs.
88
#
99
# Parameters:
10-
# buildTarget — The build.proj target that builds SqlClient for the current
11-
# OS (e.g. BuildSqlClientWindows or BuildSqlClientUnix).
1210
# testFramework — The TFM to test against (e.g. net9.0, net462).
1311
# testRunTitle — Title for the published test results (displayed in the ADO
1412
# Tests tab).
@@ -17,10 +15,6 @@
1715

1816
parameters:
1917

20-
# build.proj target to build SqlClient for the current OS.
21-
- name: buildTarget
22-
type: string
23-
2418
# TFM to pass to the test targets (-p:TestFramework).
2519
- name: testFramework
2620
type: string
@@ -39,7 +33,7 @@ steps:
3933
# Build
4034
# ---------------------------------------------------------------------------
4135

42-
# Build the given target.
36+
# Build SqlClient.
4337
#
4438
# The test stages build as part of their targets, but this separate step isolates build failures
4539
# so we can fail fast before running tests. Retries are enabled intentionally (1 attempt for
@@ -52,7 +46,7 @@ steps:
5246
command: build
5347
projects: build.proj
5448
arguments: >-
55-
-t:${{ parameters.buildTarget }}
49+
-t:BuildSqlClient
5650
-p:Configuration=Release
5751
5852
# ---------------------------------------------------------------------------

eng/pipelines/ci/kerberos/sqlclient-ci-kerberos-pipeline.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,6 @@ stages:
182182
# --- Build and test ---
183183
- template: /eng/pipelines/ci/kerberos/build-and-test-steps.yml@self
184184
parameters:
185-
buildTarget: BuildSqlClientWindows
186185
testFramework: $(testFramework)
187186
testRunTitle: Windows-$(testFramework)-ManagedSNI_$(managedSNI)
188187
artifactName: $(testFramework)-ManagedSNI_$(managedSNI)-$(System.JobId)
@@ -271,7 +270,6 @@ stages:
271270
# --- Build and test ---
272271
- template: /eng/pipelines/ci/kerberos/build-and-test-steps.yml@self
273272
parameters:
274-
buildTarget: BuildSqlClientUnix
275273
testFramework: $(testFramework)
276274
testRunTitle: Linux-$(testFramework)
277275
artifactName: $(testFramework)-linux-$(System.JobId)

0 commit comments

Comments
 (0)