From 33060d9787f36869758995bfb4f1289d777e4682 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Thu, 26 Oct 2023 00:08:22 -0400 Subject: [PATCH] Sync appveyor script further to build release --- appveyor.yml | 80 +++++++++++++++++++++++----------------------------- 1 file changed, 36 insertions(+), 44 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 68f34a97..1729f264 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -8,10 +8,6 @@ pull_requests: # vm template image: Visual Studio 2022 -# msbuild configuration -configuration: -- Debug - # install dependencies install: - cd %APPVEYOR_BUILD_FOLDER% @@ -19,37 +15,45 @@ install: # build step build_script: - - cmd: dotnet build Test\Test.csproj --framework net48 - - cmd: dotnet publish Test\Test.csproj --framework net6.0 --runtime win-x86 --self-contained true -p:PublishSingleFile=true - - cmd: dotnet publish Test\Test.csproj --framework net6.0 --runtime win-x64 --self-contained true -p:PublishSingleFile=true - - cmd: dotnet publish Test\Test.csproj --framework net6.0 --runtime linux-x64 --self-contained true -p:PublishSingleFile=true - - cmd: dotnet publish Test\Test.csproj --framework net6.0 --runtime osx-x64 --self-contained true -p:PublishSingleFile=true - - cmd: dotnet publish Test\Test.csproj --framework net7.0 --runtime win-x86 --self-contained true -p:PublishSingleFile=true - - cmd: dotnet publish Test\Test.csproj --framework net7.0 --runtime win-x64 --self-contained true -p:PublishSingleFile=true - - cmd: dotnet publish Test\Test.csproj --framework net7.0 --runtime linux-x64 --self-contained true -p:PublishSingleFile=true - - cmd: dotnet publish Test\Test.csproj --framework net7.0 --runtime osx-x64 --self-contained true -p:PublishSingleFile=true - - cmd: dotnet pack BinaryObjectScanner\BinaryObjectScanner.csproj --output %APPVEYOR_BUILD_FOLDER% + - 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 + + # 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 + + # Nuget Package + - dotnet pack BinaryObjectScanner\BinaryObjectScanner.csproj --output %APPVEYOR_BUILD_FOLDER% # post-build script after_build: - - cmd: cd %APPVEYOR_BUILD_FOLDER%\Test\bin\Debug\net48 - - cmd: 7z a -tzip %APPVEYOR_BUILD_FOLDER%\BinaryObjectScanner_%APPVEYOR_REPO_COMMIT%_net48.zip * - - cmd: cd %APPVEYOR_BUILD_FOLDER%\Test\bin\Debug\net6.0\win-x86\publish\ - - cmd: 7z a -tzip %APPVEYOR_BUILD_FOLDER%\BinaryObjectScanner_%APPVEYOR_REPO_COMMIT%_net6.0_win-x86.zip * - - cmd: cd %APPVEYOR_BUILD_FOLDER%\Test\bin\Debug\net6.0\win-x64\publish\ - - cmd: 7z a -tzip %APPVEYOR_BUILD_FOLDER%\BinaryObjectScanner_%APPVEYOR_REPO_COMMIT%_net6.0_win-x64.zip * - - cmd: cd %APPVEYOR_BUILD_FOLDER%\Test\bin\Debug\net6.0\linux-x64\publish\ - - cmd: 7z a -tzip %APPVEYOR_BUILD_FOLDER%\BinaryObjectScanner_%APPVEYOR_REPO_COMMIT%_net6.0_linux-x64.zip * - - cmd: cd %APPVEYOR_BUILD_FOLDER%\Test\bin\Debug\net6.0\osx-x64\publish\ - - cmd: 7z a -tzip %APPVEYOR_BUILD_FOLDER%\BinaryObjectScanner_%APPVEYOR_REPO_COMMIT%_net6.0_osx-x64.zip * - - cmd: cd %APPVEYOR_BUILD_FOLDER%\Test\bin\Debug\net7.0\win-x86\publish\ - - cmd: 7z a -tzip %APPVEYOR_BUILD_FOLDER%\BinaryObjectScanner_%APPVEYOR_REPO_COMMIT%_net7.0_win-x86.zip * - - cmd: cd %APPVEYOR_BUILD_FOLDER%\Test\bin\Debug\net7.0\win-x64\publish\ - - cmd: 7z a -tzip %APPVEYOR_BUILD_FOLDER%\BinaryObjectScanner_%APPVEYOR_REPO_COMMIT%_net7.0_win-x64.zip * - - cmd: cd %APPVEYOR_BUILD_FOLDER%\Test\bin\Debug\net7.0\linux-x64\publish\ - - cmd: 7z a -tzip %APPVEYOR_BUILD_FOLDER%\BinaryObjectScanner_%APPVEYOR_REPO_COMMIT%_net7.0_linux-x64.zip * - - cmd: cd %APPVEYOR_BUILD_FOLDER%\Test\bin\Debug\net7.0\osx-x64\publish\ - - cmd: 7z a -tzip %APPVEYOR_BUILD_FOLDER%\BinaryObjectScanner_%APPVEYOR_REPO_COMMIT%_net7.0_osx-x64.zip * + - cd %APPVEYOR_BUILD_FOLDER%\Test\bin\Debug\net48 + - 7z a -tzip %APPVEYOR_BUILD_FOLDER%\BinaryObjectScanner_%APPVEYOR_REPO_COMMIT%_net48.zip * + - 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\net7.0\win-x64\publish\ + - 7z a -tzip %APPVEYOR_BUILD_FOLDER%\BinaryObjectScanner_%APPVEYOR_REPO_COMMIT%_net7.0_win-x64.zip * + - cd %APPVEYOR_BUILD_FOLDER%\Test\bin\Debug\net7.0\linux-x64\publish\ + - 7z a -tzip %APPVEYOR_BUILD_FOLDER%\BinaryObjectScanner_%APPVEYOR_REPO_COMMIT%_net7.0_linux-x64.zip * + - cd %APPVEYOR_BUILD_FOLDER%\Test\bin\Debug\net7.0\osx-x64\publish\ + - 7z a -tzip %APPVEYOR_BUILD_FOLDER%\BinaryObjectScanner_%APPVEYOR_REPO_COMMIT%_net7.0_osx-x64.zip * # success/failure tracking on_success: @@ -61,23 +65,11 @@ on_failure: # artifact linking artifacts: -- path: BinaryObjectScanner_%APPVEYOR_REPO_COMMIT%_net48.zip - name: BinaryObjectScanner (.NET Framework 4.8) -- path: BinaryObjectScanner_%APPVEYOR_REPO_COMMIT%_net6.0_win-x86.zip - name: BinaryObjectScanner (.NET 6.0, Windows x86) - 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%_net7.0_win-x86.zip - name: BinaryObjectScanner (.NET 7.0, Windows x86) -- path: BinaryObjectScanner_%APPVEYOR_REPO_COMMIT%_net7.0_win-x64.zip - name: BinaryObjectScanner (.NET 7.0, Windows x64) -- path: BinaryObjectScanner_%APPVEYOR_REPO_COMMIT%_net7.0_linux-x64.zip - name: BinaryObjectScanner (.NET 7.0, Linux x64) -- path: BinaryObjectScanner_%APPVEYOR_REPO_COMMIT%_net7.0_osx-x64.zip - name: BinaryObjectScanner (.NET 7.0, OSX x64) - path: '*.nupkg' name: Nuget Packages