fixed a bug of not building.
Visual bug is known and annoying.
This commit is contained in:
parent
e59a909c62
commit
09ee0d89df
4
.gitignore
vendored
4
.gitignore
vendored
@ -5,3 +5,7 @@
|
||||
src/bindings/python/__pycache__/
|
||||
/src/AdvChkSys.Benchmarks/bin
|
||||
/src/AdvChkSys.Benchmarks/obj
|
||||
build/lib/AdvChkSys.dll
|
||||
build/lib/AdvChkSys.xml
|
||||
build/windows/AdvChkSys.dll
|
||||
build/windows/AdvChkSys.xml
|
||||
|
||||
93
build.bat
93
build.bat
@ -110,74 +110,84 @@ if %ERRORLEVEL% neq 0 (
|
||||
echo %GREEN%✓ Packages restored%RESET%
|
||||
echo.
|
||||
|
||||
:: Build for Windows
|
||||
if "%BUILD_WINDOWS%"=="true" (
|
||||
echo %BRIGHT%%BLUE%Building for Windows...%RESET%
|
||||
dotnet build "%PROJECT_DIR%\AdvChkSys.csproj" -c %CONFIG% -r win-x64 --no-restore
|
||||
:: Build the library (platform-agnostic)
|
||||
echo %BRIGHT%%BLUE%Building AdvChkSys library...%RESET%
|
||||
dotnet build "%PROJECT_DIR%\AdvChkSys.csproj" -c %CONFIG% --no-restore
|
||||
if %ERRORLEVEL% neq 0 (
|
||||
echo %RED%✗ Windows build failed%RESET%
|
||||
echo %RED%✗ Library build failed%RESET%
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
:: Copy Windows build to output directory
|
||||
:: Copy library to output directories
|
||||
if not exist "%OUTPUT_DIR%\lib" mkdir "%OUTPUT_DIR%\lib"
|
||||
copy "%PROJECT_DIR%\bin\%CONFIG%\netstandard2.1\AdvChkSys.dll" "%OUTPUT_DIR%\lib\"
|
||||
copy "%PROJECT_DIR%\bin\%CONFIG%\netstandard2.1\AdvChkSys.xml" "%OUTPUT_DIR%\lib\"
|
||||
|
||||
:: Create platform-specific directories
|
||||
if "%BUILD_WINDOWS%"=="true" (
|
||||
if not exist "%OUTPUT_DIR%\windows" mkdir "%OUTPUT_DIR%\windows"
|
||||
copy "%PROJECT_DIR%\bin\%CONFIG%\netstandard2.1\AdvChkSys.dll" "%OUTPUT_DIR%\windows\"
|
||||
copy "%PROJECT_DIR%\bin\%CONFIG%\netstandard2.1\AdvChkSys.xml" "%OUTPUT_DIR%\windows\"
|
||||
|
||||
echo %GREEN%✓ Windows build completed%RESET%
|
||||
echo.
|
||||
)
|
||||
|
||||
:: Build for Linux
|
||||
if "%BUILD_LINUX%"=="true" (
|
||||
echo %BRIGHT%%BLUE%Building for Linux...%RESET%
|
||||
dotnet build "%PROJECT_DIR%\AdvChkSys.csproj" -c %CONFIG% -r linux-x64 --no-restore
|
||||
if %ERRORLEVEL% neq 0 (
|
||||
echo %RED%✗ Linux build failed%RESET%
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
:: Copy Linux build to output directory
|
||||
if not exist "%OUTPUT_DIR%\linux" mkdir "%OUTPUT_DIR%\linux"
|
||||
copy "%PROJECT_DIR%\bin\%CONFIG%\netstandard2.1\AdvChkSys.dll" "%OUTPUT_DIR%\linux\"
|
||||
copy "%PROJECT_DIR%\bin\%CONFIG%\netstandard2.1\AdvChkSys.xml" "%OUTPUT_DIR%\linux\"
|
||||
|
||||
echo %GREEN%✓ Linux build completed%RESET%
|
||||
echo.
|
||||
)
|
||||
|
||||
:: Build for macOS
|
||||
if "%BUILD_MAC%"=="true" (
|
||||
echo %BRIGHT%%BLUE%Building for macOS...%RESET%
|
||||
dotnet build "%PROJECT_DIR%\AdvChkSys.csproj" -c %CONFIG% -r osx-x64 --no-restore
|
||||
if %ERRORLEVEL% neq 0 (
|
||||
echo %RED%✗ macOS build failed%RESET%
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
:: Copy macOS build to output directory
|
||||
if not exist "%OUTPUT_DIR%\macos" mkdir "%OUTPUT_DIR%\macos"
|
||||
copy "%PROJECT_DIR%\bin\%CONFIG%\netstandard2.1\AdvChkSys.dll" "%OUTPUT_DIR%\macos\"
|
||||
copy "%PROJECT_DIR%\bin\%CONFIG%\netstandard2.1\AdvChkSys.xml" "%OUTPUT_DIR%\macos\"
|
||||
|
||||
echo %GREEN%✓ macOS build completed%RESET%
|
||||
echo.
|
||||
)
|
||||
echo.
|
||||
|
||||
:: Build benchmarks
|
||||
if "%BUILD_BENCHMARKS%"=="true" (
|
||||
echo %BRIGHT%%BLUE%Building ChunkMark benchmarks...%RESET%
|
||||
|
||||
:: Restore benchmark packages
|
||||
dotnet restore "%BENCHMARKS_DIR%\AdvChkSys.Benchmarks.csproj"
|
||||
|
||||
:: Build for Windows
|
||||
if "%BUILD_WINDOWS%"=="true" (
|
||||
dotnet publish "%BENCHMARKS_DIR%\AdvChkSys.Benchmarks.csproj" -c %CONFIG% -r win-x64 --self-contained true -p:PublishSingleFile=true -p:PublishTrimmed=true
|
||||
if %ERRORLEVEL% neq 0 (
|
||||
echo %RED%✗ Benchmark build failed%RESET%
|
||||
exit /b 1
|
||||
echo %RED%✗ Windows benchmark build failed%RESET%
|
||||
) else (
|
||||
if not exist "%OUTPUT_DIR%\benchmarks\windows" mkdir "%OUTPUT_DIR%\benchmarks\windows"
|
||||
copy "%BENCHMARKS_DIR%\bin\%CONFIG%\net6.0\win-x64\publish\ChunkMark.exe" "%OUTPUT_DIR%\benchmarks\windows\"
|
||||
echo %GREEN%✓ Windows benchmarks built%RESET%
|
||||
)
|
||||
)
|
||||
|
||||
:: Copy benchmark to output directory
|
||||
if not exist "%OUTPUT_DIR%\benchmarks" mkdir "%OUTPUT_DIR%\benchmarks"
|
||||
copy "%BENCHMARKS_DIR%\bin\%CONFIG%\net6.0\win-x64\publish\ChunkMark.exe" "%OUTPUT_DIR%\benchmarks\"
|
||||
:: Build for Linux
|
||||
if "%BUILD_LINUX%"=="true" (
|
||||
dotnet publish "%BENCHMARKS_DIR%\AdvChkSys.Benchmarks.csproj" -c %CONFIG% -r linux-x64 --self-contained true -p:PublishSingleFile=true -p:PublishTrimmed=true
|
||||
if %ERRORLEVEL% neq 0 (
|
||||
echo %RED%✗ Linux benchmark build failed%RESET%
|
||||
) else (
|
||||
if not exist "%OUTPUT_DIR%\benchmarks\linux" mkdir "%OUTPUT_DIR%\benchmarks\linux"
|
||||
copy "%BENCHMARKS_DIR%\bin\%CONFIG%\net6.0\linux-x64\publish\ChunkMark" "%OUTPUT_DIR%\benchmarks\linux\"
|
||||
echo %GREEN%✓ Linux benchmarks built%RESET%
|
||||
)
|
||||
)
|
||||
|
||||
echo %GREEN%✓ Benchmarks built%RESET%
|
||||
:: Build for macOS
|
||||
if "%BUILD_MAC%"=="true" (
|
||||
dotnet publish "%BENCHMARKS_DIR%\AdvChkSys.Benchmarks.csproj" -c %CONFIG% -r osx-x64 --self-contained true -p:PublishSingleFile=true -p:PublishTrimmed=true
|
||||
if %ERRORLEVEL% neq 0 (
|
||||
echo %RED%✗ macOS benchmark build failed%RESET%
|
||||
) else (
|
||||
if not exist "%OUTPUT_DIR%\benchmarks\macos" mkdir "%OUTPUT_DIR%\benchmarks\macos"
|
||||
copy "%BENCHMARKS_DIR%\bin\%CONFIG%\net6.0\osx-x64\publish\ChunkMark" "%OUTPUT_DIR%\benchmarks\macos\"
|
||||
echo %GREEN%✓ macOS benchmarks built%RESET%
|
||||
)
|
||||
)
|
||||
echo.
|
||||
)
|
||||
|
||||
@ -208,18 +218,25 @@ echo.
|
||||
echo %BRIGHT%%GREEN%Build completed successfully!%RESET%
|
||||
echo.
|
||||
echo %BRIGHT%%WHITE%Output files:%RESET%
|
||||
echo %WHITE%• Library: %OUTPUT_DIR%\lib\AdvChkSys.dll%RESET%
|
||||
|
||||
if "%BUILD_WINDOWS%"=="true" (
|
||||
echo %WHITE%• Windows: %OUTPUT_DIR%\windows\AdvChkSys.dll%RESET%
|
||||
if "%BUILD_BENCHMARKS%"=="true" (
|
||||
echo %WHITE%• Windows Benchmark: %OUTPUT_DIR%\benchmarks\windows\ChunkMark.exe%RESET%
|
||||
)
|
||||
)
|
||||
if "%BUILD_LINUX%"=="true" (
|
||||
echo %WHITE%• Linux: %OUTPUT_DIR%\linux\AdvChkSys.dll%RESET%
|
||||
if "%BUILD_BENCHMARKS%"=="true" (
|
||||
echo %WHITE%• Linux Benchmark: %OUTPUT_DIR%\benchmarks\linux\ChunkMark%RESET%
|
||||
)
|
||||
)
|
||||
if "%BUILD_MAC%"=="true" (
|
||||
echo %WHITE%• macOS: %OUTPUT_DIR%\macos\AdvChkSys.dll%RESET%
|
||||
)
|
||||
if "%BUILD_BENCHMARKS%"=="true" (
|
||||
echo %WHITE%• Benchmarks: %OUTPUT_DIR%\benchmarks\ChunkMark.exe%RESET%
|
||||
echo %WHITE%• macOS Benchmark: %OUTPUT_DIR%\benchmarks\macos\ChunkMark%RESET%
|
||||
)
|
||||
)
|
||||
if "%BUILD_NUGET%"=="true" (
|
||||
echo %WHITE%• NuGet: %OUTPUT_DIR%\nuget\AdvChkSys.%VERSION%.nupkg%RESET%
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user