Update build scripts

This commit is contained in:
Matt Nadareski
2023-11-14 16:13:49 -05:00
parent 9421249b8e
commit 9b4fd91717
3 changed files with 60 additions and 69 deletions

View File

@@ -18,34 +18,32 @@ build_script:
- dotnet restore
# Debug
- dotnet publish Test\Test.csproj -f net48 -r win7-x64 -c Debug --self-contained true
- dotnet publish Test\Test.csproj -f net6.0 -r win-x64 -c Debug --self-contained true -p:PublishSingleFile=true
- dotnet publish Test\Test.csproj -f net6.0 -r linux-x64 -c Debug --self-contained true -p:PublishSingleFile=true
- dotnet publish Test\Test.csproj -f net6.0 -r osx-x64 -c Debug --self-contained true -p:PublishSingleFile=true
- dotnet publish Test\Test.csproj -f net7.0 -r win-x64 -c Debug --self-contained true -p:PublishSingleFile=true
- dotnet publish Test\Test.csproj -f net7.0 -r linux-x64 -c Debug --self-contained true -p:PublishSingleFile=true
- dotnet publish Test\Test.csproj -f net7.0 -r osx-x64 -c Debug --self-contained true -p:PublishSingleFile=true
- dotnet publish Test\Test.csproj -f net8.0 -r win-x64 -c Debug --self-contained true -p:PublishSingleFile=true
- dotnet publish Test\Test.csproj -f net8.0 -r linux-x64 -c Debug --self-contained true -p:PublishSingleFile=true
- dotnet publish Test\Test.csproj -f net8.0 -r osx-x64 -c Debug --self-contained true -p:PublishSingleFile=true
# Release
- dotnet publish Test\Test.csproj -f net48 -r win7-x64 -c Release --self-contained true -p:DebugSymbols=false
- dotnet publish Test\Test.csproj -f net6.0 -r win-x64 -c Release --self-contained true -p:PublishSingleFile=true -p:DebugSymbols=false
- dotnet publish Test\Test.csproj -f net6.0 -r linux-x64 -c Release --self-contained true -p:PublishSingleFile=true -p:DebugSymbols=false
- dotnet publish Test\Test.csproj -f net6.0 -r osx-x64 -c Release --self-contained true -p:PublishSingleFile=true -p:DebugSymbols=false
- dotnet publish Test\Test.csproj -f net7.0 -r win-x64 -c Release --self-contained true -p:PublishSingleFile=true -p:DebugSymbols=false
- dotnet publish Test\Test.csproj -f net7.0 -r linux-x64 -c Release --self-contained true -p:PublishSingleFile=true -p:DebugSymbols=false
- dotnet publish Test\Test.csproj -f net7.0 -r osx-x64 -c Release --self-contained true -p:PublishSingleFile=true -p:DebugSymbols=false
- dotnet publish Test\Test.csproj -f net8.0 -r win-x64 -c Release --self-contained true -p:PublishSingleFile=true -p:DebugSymbols=false
- dotnet publish Test\Test.csproj -f net8.0 -r linux-x64 -c Release --self-contained true -p:PublishSingleFile=true -p:DebugSymbols=false
- dotnet publish Test\Test.csproj -f net8.0 -r osx-x64 -c Release --self-contained true -p:PublishSingleFile=true -p:DebugSymbols=false
# Nuget Package
- dotnet pack BinaryObjectScanner\BinaryObjectScanner.csproj --output %APPVEYOR_BUILD_FOLDER%
# post-build script
after_build:
- cd %APPVEYOR_BUILD_FOLDER%\Test\bin\Debug\net6.0\win-x64\publish\
- 7z a -tzip %APPVEYOR_BUILD_FOLDER%\BinaryObjectScanner_%APPVEYOR_REPO_COMMIT%_net6.0_win-x64.zip *
- cd %APPVEYOR_BUILD_FOLDER%\Test\bin\Debug\net6.0\linux-x64\publish\
- 7z a -tzip %APPVEYOR_BUILD_FOLDER%\BinaryObjectScanner_%APPVEYOR_REPO_COMMIT%_net6.0_linux-x64.zip *
- cd %APPVEYOR_BUILD_FOLDER%\Test\bin\Debug\net6.0\osx-x64\publish\
- 7z a -tzip %APPVEYOR_BUILD_FOLDER%\BinaryObjectScanner_%APPVEYOR_REPO_COMMIT%_net6.0_osx-x64.zip *
- cd %APPVEYOR_BUILD_FOLDER%\Test\bin\Debug\net8.0\win-x64\publish\
- 7z a -tzip %APPVEYOR_BUILD_FOLDER%\BinaryObjectScanner_%APPVEYOR_REPO_COMMIT%_net8.0_win-x64.zip *
- cd %APPVEYOR_BUILD_FOLDER%\Test\bin\Debug\net8.0\linux-x64\publish\
- 7z a -tzip %APPVEYOR_BUILD_FOLDER%\BinaryObjectScanner_%APPVEYOR_REPO_COMMIT%_net8.0_linux-x64.zip *
- cd %APPVEYOR_BUILD_FOLDER%\Test\bin\Debug\net8.0\osx-x64\publish\
- 7z a -tzip %APPVEYOR_BUILD_FOLDER%\BinaryObjectScanner_%APPVEYOR_REPO_COMMIT%_net8.0_osx-x64.zip *
# success/failure tracking
on_success:
@@ -57,11 +55,11 @@ on_failure:
# artifact linking
artifacts:
- path: BinaryObjectScanner_%APPVEYOR_REPO_COMMIT%_net6.0_win-x64.zip
name: BinaryObjectScanner (.NET 6.0, Windows x64)
- path: BinaryObjectScanner_%APPVEYOR_REPO_COMMIT%_net6.0_linux-x64.zip
name: BinaryObjectScanner (.NET 6.0, Linux x64)
- path: BinaryObjectScanner_%APPVEYOR_REPO_COMMIT%_net6.0_osx-x64.zip
name: BinaryObjectScanner (.NET 6.0, OSX x64)
- path: BinaryObjectScanner_%APPVEYOR_REPO_COMMIT%_net8.0_win-x64.zip
name: BinaryObjectScanner (.NET 8.0, Windows x64)
- path: BinaryObjectScanner_%APPVEYOR_REPO_COMMIT%_net8.0_linux-x64.zip
name: BinaryObjectScanner (.NET 8.0, Linux x64)
- path: BinaryObjectScanner_%APPVEYOR_REPO_COMMIT%_net8.0_osx-x64.zip
name: BinaryObjectScanner (.NET 8.0, OSX x64)
- path: '*.nupkg'
name: Nuget Packages

View File

@@ -1,7 +1,7 @@
#! /bin/bash
# This batch file assumes the following:
# - .NET 7.0 (or newer) SDK is installed and in PATH
# - .NET 8.0 (or newer) SDK is installed and in PATH
# - zip is installed and in PATH
# - The relevant commandline programs are already downloaded
# and put into their respective folders
@@ -28,17 +28,17 @@ dotnet publish Test/Test.csproj -f net6.0 -r win-x64 -c Release --self-contained
dotnet publish Test/Test.csproj -f net6.0 -r linux-x64 -c Release --self-contained true -p:PublishSingleFile=true -p:PublishTrimmed=true -p:DebugType=None -p:DebugSymbols=false
dotnet publish Test/Test.csproj -f net6.0 -r osx-x64 -c Release --self-contained true -p:PublishSingleFile=true -p:PublishTrimmed=true -p:DebugType=None -p:DebugSymbols=false
# .NET 7.0 Debug
echo "Building .NET 7.0 debug"
dotnet publish Test/Test.csproj -f net7.0 -r win-x64 -c Debug --self-contained true -p:PublishSingleFile=true
dotnet publish Test/Test.csproj -f net7.0 -r linux-x64 -c Debug --self-contained true -p:PublishSingleFile=true
dotnet publish Test/Test.csproj -f net7.0 -r osx-x64 -c Debug --self-contained true -p:PublishSingleFile=true
# .NET 8.0 Debug
echo "Building .NET 8.0 debug"
dotnet publish Test/Test.csproj -f net8.0 -r win-x64 -c Debug --self-contained true -p:PublishSingleFile=true
dotnet publish Test/Test.csproj -f net8.0 -r linux-x64 -c Debug --self-contained true -p:PublishSingleFile=true
dotnet publish Test/Test.csproj -f net8.0 -r osx-x64 -c Debug --self-contained true -p:PublishSingleFile=true
# .NET 7.0 Release
echo "Building .NET 7.0 release"
dotnet publish Test/Test.csproj -f net7.0 -r win-x64 -c Release --self-contained true -p:PublishSingleFile=true -p:PublishTrimmed=true -p:DebugType=None -p:DebugSymbols=false
dotnet publish Test/Test.csproj -f net7.0 -r linux-x64 -c Release --self-contained true -p:PublishSingleFile=true -p:PublishTrimmed=true -p:DebugType=None -p:DebugSymbols=false
dotnet publish Test/Test.csproj -f net7.0 -r osx-x64 -c Release --self-contained true -p:PublishSingleFile=true -p:PublishTrimmed=true -p:DebugType=None -p:DebugSymbols=false
# .NET 8.0 Release
echo "Building .NET 8.0 release"
dotnet publish Test/Test.csproj -f net8.0 -r win-x64 -c Release --self-contained true -p:PublishSingleFile=true -p:PublishTrimmed=true -p:DebugType=None -p:DebugSymbols=false
dotnet publish Test/Test.csproj -f net8.0 -r linux-x64 -c Release --self-contained true -p:PublishSingleFile=true -p:PublishTrimmed=true -p:DebugType=None -p:DebugSymbols=false
dotnet publish Test/Test.csproj -f net8.0 -r osx-x64 -c Release --self-contained true -p:PublishSingleFile=true -p:PublishTrimmed=true -p:DebugType=None -p:DebugSymbols=false
# Create Test Debug archives
cd $BUILD_FOLDER/Test/bin/Debug/net6.0/win-x64/publish/
@@ -47,12 +47,12 @@ cd $BUILD_FOLDER/Test/bin/Debug/net6.0/linux-x64/publish/
zip -r $BUILD_FOLDER/BinaryObjectScanner_net6.0_linux-x64_debug.zip .
cd $BUILD_FOLDER/Test/bin/Debug/net6.0/osx-x64/publish/
zip -r $BUILD_FOLDER/BinaryObjectScanner_net6.0_osx-x64_debug.zip .
cd $BUILD_FOLDER/Test/bin/Debug/net7.0/win-x64/publish/
zip -r $BUILD_FOLDER/BinaryObjectScanner_net7.0_win-x64_debug.zip .
cd $BUILD_FOLDER/Test/bin/Debug/net7.0/linux-x64/publish/
zip -r $BUILD_FOLDER/BinaryObjectScanner_net7.0_linux-x64_debug.zip .
cd $BUILD_FOLDER/Test/bin/Debug/net7.0/osx-x64/publish/
zip -r $BUILD_FOLDER/BinaryObjectScanner_net7.0_osx-x64_debug.zip .
cd $BUILD_FOLDER/Test/bin/Debug/net8.0/win-x64/publish/
zip -r $BUILD_FOLDER/BinaryObjectScanner_net8.0_win-x64_debug.zip .
cd $BUILD_FOLDER/Test/bin/Debug/net8.0/linux-x64/publish/
zip -r $BUILD_FOLDER/BinaryObjectScanner_net8.0_linux-x64_debug.zip .
cd $BUILD_FOLDER/Test/bin/Debug/net8.0/osx-x64/publish/
zip -r $BUILD_FOLDER/BinaryObjectScanner_net8.0_osx-x64_debug.zip .
# Create Test Release archives
cd $BUILD_FOLDER/Test/bin/Release/net6.0/win-x64/publish/
@@ -61,9 +61,9 @@ cd $BUILD_FOLDER/Test/bin/Release/net6.0/linux-x64/publish/
zip -r $BUILD_FOLDER/BinaryObjectScanner_net6.0_linux-x64_release.zip .
cd $BUILD_FOLDER/Test/bin/Release/net6.0/osx-x64/publish/
zip -r $BUILD_FOLDER/BinaryObjectScanner_net6.0_osx-x64_release.zip .
cd $BUILD_FOLDER/Test/bin/Release/net7.0/win-x64/publish/
zip -r $BUILD_FOLDER/BinaryObjectScanner_net7.0_win-x64_release.zip .
cd $BUILD_FOLDER/Test/bin/Release/net7.0/linux-x64/publish/
zip -r $BUILD_FOLDER/BinaryObjectScanner_net7.0_linux-x64_release.zip .
cd $BUILD_FOLDER/Test/bin/Release/net7.0/osx-x64/publish/
zip -r $BUILD_FOLDER/BinaryObjectScanner_net7.0_osx-x64_release.zip .
cd $BUILD_FOLDER/Test/bin/Release/net8.0/win-x64/publish/
zip -r $BUILD_FOLDER/BinaryObjectScanner_net8.0_win-x64_release.zip .
cd $BUILD_FOLDER/Test/bin/Release/net8.0/linux-x64/publish/
zip -r $BUILD_FOLDER/BinaryObjectScanner_net8.0_linux-x64_release.zip .
cd $BUILD_FOLDER/Test/bin/Release/net8.0/osx-x64/publish/
zip -r $BUILD_FOLDER/BinaryObjectScanner_net8.0_osx-x64_release.zip .

View File

@@ -1,8 +1,7 @@
@echo OFF
REM This batch file assumes the following:
REM - .NET Framework 4.8 SDK is installed and in PATH
REM - .NET 7.0 (or newer) SDK is installed and in PATH
REM - .NET 8.0 (or newer) SDK is installed and in PATH
REM - 7-zip commandline (7z.exe) is installed and in PATH
REM - The relevant commandline programs are already downloaded
REM and put into their respective folders
@@ -19,52 +18,46 @@ dotnet restore
REM Debug
echo Building debug
dotnet publish Test\Test.csproj -f net48 -r win7-x64 -c Debug --self-contained true
dotnet publish Test\Test.csproj -f net6.0 -r win-x64 -c Debug --self-contained true -p:PublishSingleFile=true
dotnet publish Test\Test.csproj -f net6.0 -r linux-x64 -c Debug --self-contained true -p:PublishSingleFile=true
dotnet publish Test\Test.csproj -f net6.0 -r osx-x64 -c Debug --self-contained true -p:PublishSingleFile=true
dotnet publish Test\Test.csproj -f net7.0 -r win-x64 -c Debug --self-contained true -p:PublishSingleFile=true
dotnet publish Test\Test.csproj -f net7.0 -r linux-x64 -c Debug --self-contained true -p:PublishSingleFile=true
dotnet publish Test\Test.csproj -f net7.0 -r osx-x64 -c Debug --self-contained true -p:PublishSingleFile=true
dotnet publish Test\Test.csproj -f net8.0 -r win-x64 -c Debug --self-contained true -p:PublishSingleFile=true
dotnet publish Test\Test.csproj -f net8.0 -r linux-x64 -c Debug --self-contained true -p:PublishSingleFile=true
dotnet publish Test\Test.csproj -f net8.0 -r osx-x64 -c Debug --self-contained true -p:PublishSingleFile=true
REM Release
echo Building release
dotnet publish Test\Test.csproj -f net48 -r win7-x64 -c Release --self-contained true -p:DebugType=None -p:DebugSymbols=false
dotnet publish Test\Test.csproj -f net6.0 -r win-x64 -c Release --self-contained true -p:PublishSingleFile=true -p:DebugType=None -p:DebugSymbols=false
dotnet publish Test\Test.csproj -f net6.0 -r linux-x64 -c Release --self-contained true -p:PublishSingleFile=true -p:DebugType=None -p:DebugSymbols=false
dotnet publish Test\Test.csproj -f net6.0 -r osx-x64 -c Release --self-contained true -p:PublishSingleFile=true -p:DebugType=None -p:DebugSymbols=false
dotnet publish Test\Test.csproj -f net7.0 -r win-x64 -c Release --self-contained true -p:PublishSingleFile=true -p:DebugType=None -p:DebugSymbols=false
dotnet publish Test\Test.csproj -f net7.0 -r linux-x64 -c Release --self-contained true -p:PublishSingleFile=true -p:DebugType=None -p:DebugSymbols=false
dotnet publish Test\Test.csproj -f net7.0 -r osx-x64 -c Release --self-contained true -p:PublishSingleFile=true -p:DebugType=None -p:DebugSymbols=false
dotnet publish Test\Test.csproj -f net8.0 -r win-x64 -c Release --self-contained true -p:PublishSingleFile=true -p:DebugType=None -p:DebugSymbols=false
dotnet publish Test\Test.csproj -f net8.0 -r linux-x64 -c Release --self-contained true -p:PublishSingleFile=true -p:DebugType=None -p:DebugSymbols=false
dotnet publish Test\Test.csproj -f net8.0 -r osx-x64 -c Release --self-contained true -p:PublishSingleFile=true -p:DebugType=None -p:DebugSymbols=false
REM Create Test Debug archives
cd %BUILD_FOLDER%\Test\bin\Debug\net48\win7-x64\publish\
7z a -tzip %BUILD_FOLDER%\BinaryObjectScanner_net48_debug.zip *
cd %BUILD_FOLDER%\Test\bin\Debug\net6.0\win-x64\publish\
7z a -tzip %BUILD_FOLDER%\BinaryObjectScanner_net6.0_win-x64_debug.zip *
cd %BUILD_FOLDER%\Test\bin\Debug\net6.0\linux-x64\publish\
7z a -tzip %BUILD_FOLDER%\BinaryObjectScanner_net6.0_linux-x64_debug.zip *
cd %BUILD_FOLDER%\Test\bin\Debug\net6.0\osx-x64\publish\
7z a -tzip %BUILD_FOLDER%\BinaryObjectScanner_net6.0_osx-x64_debug.zip *
cd %BUILD_FOLDER%\Test\bin\Debug\net7.0\win-x64\publish\
7z a -tzip %BUILD_FOLDER%\BinaryObjectScanner_net7.0_win-x64_debug.zip *
cd %BUILD_FOLDER%\Test\bin\Debug\net7.0\linux-x64\publish\
7z a -tzip %BUILD_FOLDER%\BinaryObjectScanner_net7.0_linux-x64_debug.zip *
cd %BUILD_FOLDER%\Test\bin\Debug\net7.0\osx-x64\publish\
7z a -tzip %BUILD_FOLDER%\BinaryObjectScanner_net7.0_osx-x64_debug.zip *
cd %BUILD_FOLDER%\Test\bin\Debug\net8.0\win-x64\publish\
7z a -tzip %BUILD_FOLDER%\BinaryObjectScanner_net8.0_win-x64_debug.zip *
cd %BUILD_FOLDER%\Test\bin\Debug\net8.0\linux-x64\publish\
7z a -tzip %BUILD_FOLDER%\BinaryObjectScanner_net8.0_linux-x64_debug.zip *
cd %BUILD_FOLDER%\Test\bin\Debug\net8.0\osx-x64\publish\
7z a -tzip %BUILD_FOLDER%\BinaryObjectScanner_net8.0_osx-x64_debug.zip *
REM Create Test Release archives
cd %BUILD_FOLDER%\Test\bin\Release\net48\win7-x64\publish\
7z a -tzip %BUILD_FOLDER%\BinaryObjectScanner_net48_release.zip *
cd %BUILD_FOLDER%\Test\bin\Release\net6.0\win-x64\publish\
7z a -tzip %BUILD_FOLDER%\BinaryObjectScanner_net6.0_win-x64_release.zip *
cd %BUILD_FOLDER%\Test\bin\Release\net6.0\linux-x64\publish\
7z a -tzip %BUILD_FOLDER%\BinaryObjectScanner_net6.0_linux-x64_release.zip *
cd %BUILD_FOLDER%\Test\bin\Release\net6.0\osx-x64\publish\
7z a -tzip %BUILD_FOLDER%\BinaryObjectScanner_net6.0_osx-x64_release.zip *
cd %BUILD_FOLDER%\Test\bin\Release\net7.0\win-x64\publish\
7z a -tzip %BUILD_FOLDER%\BinaryObjectScanner_net7.0_win-x64_release.zip *
cd %BUILD_FOLDER%\Test\bin\Release\net7.0\linux-x64\publish\
7z a -tzip %BUILD_FOLDER%\BinaryObjectScanner_net7.0_linux-x64_release.zip *
cd %BUILD_FOLDER%\Test\bin\Release\net7.0\osx-x64\publish\
7z a -tzip %BUILD_FOLDER%\BinaryObjectScanner_net7.0_osx-x64_release.zip *
cd %BUILD_FOLDER%\Test\bin\Release\net8.0\win-x64\publish\
7z a -tzip %BUILD_FOLDER%\BinaryObjectScanner_net8.0_win-x64_release.zip *
cd %BUILD_FOLDER%\Test\bin\Release\net8.0\linux-x64\publish\
7z a -tzip %BUILD_FOLDER%\BinaryObjectScanner_net8.0_linux-x64_release.zip *
cd %BUILD_FOLDER%\Test\bin\Release\net8.0\osx-x64\publish\
7z a -tzip %BUILD_FOLDER%\BinaryObjectScanner_net8.0_osx-x64_release.zip *