Skip to content

Commit

Permalink
Build Release instead of Debug in build.cmd (#210)
Browse files Browse the repository at this point in the history
* Build Release instead of Debug in build.cmd

* fix test
  • Loading branch information
yangpanMS authored Nov 10, 2023
1 parent 321d8a3 commit d9d04ec
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 21 deletions.
6 changes: 3 additions & 3 deletions build-packages.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,17 @@ call dotnet restore %PackagesProject% --force
echo:
echo [Create NuGet Package] VirtualClient %VCBuildVersion%
echo --------------------------------------------------
call dotnet pack %PackagesProject% --force --no-restore --no-build -c Debug -p:Version=%VCBuildVersion% -p:NuspecFile=%PackageDir%\nuspec\VirtualClient.nuspec && echo: || Goto :Error
call dotnet pack %PackagesProject% --force --no-restore --no-build -c Release -p:Version=%VCBuildVersion% -p:NuspecFile=%PackageDir%\nuspec\VirtualClient.nuspec && echo: || Goto :Error

echo:
echo [Create NuGet Package] VirtualClient.Framework %VCBuildVersion%
echo --------------------------------------------------
call dotnet pack %PackagesProject% --force --no-restore --no-build -c Debug -p:Version=%VCBuildVersion% -p:NuspecFile=%PackageDir%\nuspec\VirtualClient.Framework.nuspec && echo: || Goto :Error
call dotnet pack %PackagesProject% --force --no-restore --no-build -c Release -p:Version=%VCBuildVersion% -p:NuspecFile=%PackageDir%\nuspec\VirtualClient.Framework.nuspec && echo: || Goto :Error

echo:
echo [Create NuGet Package] VirtualClient.TestFramework %VCBuildVersion%
echo --------------------------------------------------
call dotnet pack %PackagesProject% --force --no-restore --no-build -c Debug -p:Version=%VCBuildVersion% -p:NuspecFile=%PackageDir%\nuspec\VirtualClient.TestFramework.nuspec && echo: || Goto :Error
call dotnet pack %PackagesProject% --force --no-restore --no-build -c Release -p:Version=%VCBuildVersion% -p:NuspecFile=%PackageDir%\nuspec\VirtualClient.TestFramework.nuspec && echo: || Goto :Error
Goto :End

:Usage
Expand Down
2 changes: 1 addition & 1 deletion build-test.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ echo [Running Tests]
echo --------------------------------------------------

for /f "tokens=*" %%f in ('dir /B /S %~dp0src\*Tests.csproj') do (
call dotnet test %%f --no-restore --no-build --filter "(Category=Unit|Category=Functional)" --logger "console;verbosity=normal" && echo: || Goto :Error
call dotnet test -c Release %%f --no-restore --no-build --filter "(Category=Unit|Category=Functional)" --logger "console;verbosity=normal" && echo: || Goto :Error
)

Goto :End
Expand Down
10 changes: 5 additions & 5 deletions build.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ call %VCSolutionDir%\build-stage-packaging-tools.cmd && echo: || Goto :Error
echo:
echo [Building Source Code] VirtualClient %VCBuildVersion%
echo -------------------------------------------------------
call dotnet build "%VCSolutionDir%\VirtualClient.sln" -c Debug && echo: || Goto :Error
call dotnet publish "%VCSolutionDir%\VirtualClient.Main\VirtualClient.Main.csproj" -r linux-x64 -c Debug --self-contained -p:InvariantGlobalization=true %TrimFlag% && echo: || Goto :Error
call dotnet publish "%VCSolutionDir%\VirtualClient.Main\VirtualClient.Main.csproj" -r linux-arm64 -c Debug --self-contained -p:InvariantGlobalization=true %TrimFlag% && echo: || Goto :Error
call dotnet publish "%VCSolutionDir%\VirtualClient.Main\VirtualClient.Main.csproj" -r win-x64 -c Debug --self-contained %TrimFlag% && echo: || Goto :Error
call dotnet publish "%VCSolutionDir%\VirtualClient.Main\VirtualClient.Main.csproj" -r win-arm64 -c Debug --self-contained %TrimFlag% && echo: || Goto :Error
call dotnet build "%VCSolutionDir%\VirtualClient.sln" -c Release && echo: || Goto :Error
call dotnet publish "%VCSolutionDir%\VirtualClient.Main\VirtualClient.Main.csproj" -r linux-x64 -c Release --self-contained -p:InvariantGlobalization=true %TrimFlag% && echo: || Goto :Error
call dotnet publish "%VCSolutionDir%\VirtualClient.Main\VirtualClient.Main.csproj" -r linux-arm64 -c Release --self-contained -p:InvariantGlobalization=true %TrimFlag% && echo: || Goto :Error
call dotnet publish "%VCSolutionDir%\VirtualClient.Main\VirtualClient.Main.csproj" -r win-x64 -c Release --self-contained %TrimFlag% && echo: || Goto :Error
call dotnet publish "%VCSolutionDir%\VirtualClient.Main\VirtualClient.Main.csproj" -r win-arm64 -c Release --self-contained %TrimFlag% && echo: || Goto :Error
Goto :End

:Usage
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
The path to the 'bin' directory in the repo 'out' folder (e.g. /repo/out/bin).
- BinConfigDir
The path to the build configuration directory in the 'bin' directory (e.g. /repo/out/bin/Debug).
The path to the build configuration directory in the 'bin' directory (e.g. /repo/out/bin/Release).
- PackagingSourceDir
The directory to the/this project where the .nuspec files are contained.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ call dotnet restore %~dp0VirtualClient.ExampleWorkload.csproj --force
echo:
echo [Creating Package: Example Workload]
echo --------------------------------------------------
call dotnet pack %~dp0VirtualClient.ExampleWorkload.csproj --force --no-restore --no-build -c Debug -p:NuspecFile=%~dp0\exampleworkload.nuspec && echo: || Goto :Error
call dotnet pack %~dp0VirtualClient.ExampleWorkload.csproj --force --no-restore --no-build -c Release -p:NuspecFile=%~dp0\exampleworkload.nuspec && echo: || Goto :Error

Goto :End

Expand Down
20 changes: 10 additions & 10 deletions src/VirtualClient/build-packages-workloads.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -20,53 +20,53 @@ if /i "%PackageName%" NEQ "" (
echo:
echo [Creating NuGet Package: %PackageName% Workload]
echo --------------------------------------------------
call dotnet pack %PackagingProject% --force --no-restore --no-build -c Debug -p:NuspecFile=%PackagingDir%\nuspec\%PackageName%.nuspec && echo: || Goto :Error
call dotnet pack %PackagingProject% --force --no-restore --no-build -c Release -p:NuspecFile=%PackagingDir%\nuspec\%PackageName%.nuspec && echo: || Goto :Error

) else (
echo:
echo [Creating NuGet Package: DiskSpd Workload]
echo --------------------------------------------------
call dotnet pack %PackagingProject% --force --no-restore --no-build -c Debug -p:NuspecFile=%PackagingDir%\nuspec\diskspd.nuspec && echo: || Goto :Error
call dotnet pack %PackagingProject% --force --no-restore --no-build -c Release -p:NuspecFile=%PackagingDir%\nuspec\diskspd.nuspec && echo: || Goto :Error

echo:
echo [Creating NuGet Package: FIO Workload]
echo --------------------------------------------------
call dotnet pack %PackagingProject% --force --no-restore --no-build -c Debug -p:NuspecFile=%PackagingDir%\nuspec\fio.nuspec && echo: || Goto :Error
call dotnet pack %PackagingProject% --force --no-restore --no-build -c Release -p:NuspecFile=%PackagingDir%\nuspec\fio.nuspec && echo: || Goto :Error

echo:
echo [Creating NuGet Package: Graph500 Workload]
echo --------------------------------------------------
call dotnet pack %PackagingProject% --force --no-restore --no-build -c Debug -p:NuspecFile=%PackagingDir%\nuspec\graph500.nuspec && echo: || Goto :Error
call dotnet pack %PackagingProject% --force --no-restore --no-build -c Release -p:NuspecFile=%PackagingDir%\nuspec\graph500.nuspec && echo: || Goto :Error

echo:
echo [Creating NuGet Package: LAPACK Workload]
echo --------------------------------------------------
call dotnet pack %PackagingProject% --force --no-restore --no-build -c Debug -p:NuspecFile=%PackagingDir%\nuspec\lapack.nuspec && echo: || Goto :Error
call dotnet pack %PackagingProject% --force --no-restore --no-build -c Release -p:NuspecFile=%PackagingDir%\nuspec\lapack.nuspec && echo: || Goto :Error

echo:
echo [Creating NuGet Package: Networking Workload]
echo --------------------------------------------------
call dotnet pack %PackagingProject% --force --no-restore --no-build -c Debug -p:NuspecFile=%PackagingDir%\nuspec\networking.nuspec && echo: || Goto :Error
call dotnet pack %PackagingProject% --force --no-restore --no-build -c Release -p:NuspecFile=%PackagingDir%\nuspec\networking.nuspec && echo: || Goto :Error

echo:
echo [Creating NuGet Package: OpenFoam Workload]
echo --------------------------------------------------
call dotnet pack %PackagingProject% --force --no-restore --no-build -c Debug -p:NuspecFile=%PackagingDir%\nuspec\openfoam.nuspec && echo: || Goto :Error
call dotnet pack %PackagingProject% --force --no-restore --no-build -c Release -p:NuspecFile=%PackagingDir%\nuspec\openfoam.nuspec && echo: || Goto :Error

echo:
echo [Creating NuGet Package: OpenSSL Workload]
echo --------------------------------------------------
call dotnet pack %PackagingProject% --force --no-restore --no-build -c Debug -p:NuspecFile=%PackagingDir%\nuspec\openssl.nuspec && echo: || Goto :Error
call dotnet pack %PackagingProject% --force --no-restore --no-build -c Release -p:NuspecFile=%PackagingDir%\nuspec\openssl.nuspec && echo: || Goto :Error

echo:
echo [Creating NuGet Package: PowerShell7 Runtime]
echo --------------------------------------------------
call dotnet pack %PackagingProject% --force --no-restore --no-build -c Debug -p:NuspecFile=%PackagingDir%\nuspec\powershell7.nuspec && echo: || Goto :Error
call dotnet pack %PackagingProject% --force --no-restore --no-build -c Release -p:NuspecFile=%PackagingDir%\nuspec\powershell7.nuspec && echo: || Goto :Error

echo:
echo [Creating NuGet Package: LMbench Workload]
echo --------------------------------------------------
call dotnet pack %PackagingProject% --force --no-restore --no-build -c Debug -p:NuspecFile=%PackagingDir%\nuspec\lmbench.nuspec && echo: || Goto :Error
call dotnet pack %PackagingProject% --force --no-restore --no-build -c Release -p:NuspecFile=%PackagingDir%\nuspec\lmbench.nuspec && echo: || Goto :Error
)

Goto :End
Expand Down

0 comments on commit d9d04ec

Please sign in to comment.