Skip to content

Commit

Permalink
Remove x86 test before GHA supports x86 SDK installation.
Browse files Browse the repository at this point in the history
dotnet run --project on GHA has to specify .csproj path.
  • Loading branch information
fryderykhuang committed Jan 19, 2024
1 parent d40e261 commit 63b3cd7
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 19 deletions.
6 changes: 4 additions & 2 deletions scripts/Build.ps1
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
. $PSScriptRoot\Variables.ps1
pushd $SolutionDir
Push-Location $SolutionDir

$Env:Platform = ''
foreach ($project in $Projects)
{
dotnet build --no-restore -c Release .\$project\$project.csproj
if (!$?) { throw }
}

$Env:Platform = 'x64'
foreach ($project in $Projects)
{
dotnet build --no-restore -c Release .\$project\$project.csproj
if (!$?) { throw }
}

popd
Pop-Location
4 changes: 2 additions & 2 deletions scripts/Clean.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
. $PSScriptRoot\Variables.ps1
pushd $SolutionDir
Push-Location $SolutionDir

$Env:Platform = ''
foreach ($project in $Projects)
Expand All @@ -15,4 +15,4 @@ foreach ($project in $Projects)
dotnet clean -c Debug .\$project\$project.csproj
}

popd
Pop-Location
5 changes: 2 additions & 3 deletions scripts/CleanAll.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
. $PSScriptRoot\Variables.ps1
pushd $SolutionDir
Push-Location $SolutionDir

$Env:Platform = ''
dotnet clean -c Release
Expand All @@ -9,5 +9,4 @@ $Env:Platform = 'x64'
dotnet clean -c Release
dotnet clean -c Debug


popd
Pop-Location
3 changes: 2 additions & 1 deletion scripts/GenBenchmarkPage.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
Push-Location $SolutionDir
if (!(Test-Path -PathType Container $BenchmarkResultPageDir)) { New-Item -ItemType Directory -Path $BenchmarkResultPageDir }
Copy-Item $BenchmarkArtifactsDir\results\*.html $BenchmarkResultPageDir
dotnet run --project .\BenchmarkResultPageGenerator $BenchmarkArtifactsDir\results '' $BenchmarkResultPageDir\index.html
dotnet run --project .\BenchmarkResultPageGenerator\BenchmarkResultPageGenerator.csproj $BenchmarkArtifactsDir\results '' $BenchmarkResultPageDir\index.html
if (!$?) { throw }
Pop-Location
1 change: 1 addition & 0 deletions scripts/Pack.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ if (!(Test-Path -PathType Container $ArtifactsDir)) { New-Item -ItemType Directo
$Env:Platform = ''
foreach ($project in $Projects) {
dotnet pack --no-build -c Release -o $ArtifactsDir "-p:Version=$Env:GitVersion_NuGetVersionV2" .\$project\$project.csproj
if (!$?) { throw }
}

Pop-Location
5 changes: 3 additions & 2 deletions scripts/Restore.ps1
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
. $PSScriptRoot\Variables.ps1
pushd $SolutionDir
Push-Location $SolutionDir
foreach ($project in $Projects)
{
dotnet restore .\$project\$project.csproj
if (!$?) { throw }
}

popd
Pop-Location
3 changes: 2 additions & 1 deletion scripts/RunBenchmarks.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
Push-Location $SolutionDir
if (!(Test-Path -PathType Container $BenchmarkArtifactsDir)) { New-Item -ItemType Directory -Path $BenchmarkArtifactsDir }
$Env:BenchmarkDotNet_ArtifactsPath = $BenchmarkArtifactsDir;
$Env:Platform = 'x64'; dotnet run -c Release --project .\NullGC.DragRace SmallStruct_WhereSelectOrderByTakeMinBenchmarks
$Env:Platform = 'x64'; dotnet run -c Release --project .\NullGC.DragRace\NullGC.DragRace.csproj
if (!$?) { throw }
Pop-Location
20 changes: 12 additions & 8 deletions scripts/Test.ps1
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
. $PSScriptRoot\Variables.ps1
pushd $SolutionDir
$Env:Platform = ''
foreach ($project in $Tests)
{
dotnet test -c Debug -a x86 .\$project\$project.csproj
dotnet test -c Release -a x86 .\$project\$project.csproj
}
Push-Location $SolutionDir

# the GHA setup-dotnet action currently not support specify architecture, and x86 SDK is not installed.
# $Env:Platform = ''
# foreach ($project in $Tests)
# {
# dotnet test -c Debug -a x86 .\$project\$project.csproj
# dotnet test -c Release -a x86 .\$project\$project.csproj
# }

$Env:Platform = 'x64'
foreach ($project in $Tests)
{
dotnet test -c Debug -a x64 .\$project\$project.csproj
if (!$?) { throw }
dotnet test -c Release -a x64 .\$project\$project.csproj
if (!$?) { throw }
}

popd
Pop-Location

0 comments on commit 63b3cd7

Please sign in to comment.