stages: - prebuild - build - test - deploy - analysis ############# # Stage PreBuild: Generate the solutions and keep the results for the further steps. pre_build: stage: prebuild script: - 'TeaBox.com RunBatch -batchFile=GenerateSolutions.bat' artifacts: paths: - TeaBox.2015.sln - 'Source\SourceControl\Project\TeaBox.SourceControl.vs2015.csproj' - 'Source\SourceControl\Tests\TeaBox.SourceControl.Tests.vs2015.csproj' - 'Source\Application\Project\TeaBox.Application.vs2015.csproj' - 'Source\Application\Tests\TeaBox.Application.Tests.vs2015.csproj' - 'Source\Core\Project\TeaBox.Core.vs2015.csproj' - 'Source\Core\Tests\TeaBox.Core.Tests.vs2015.csproj' - 'Source\Teabox\Launcher\TeaBox.Launcher.Console.vs2015.csproj' - 'Source\Teabox\Launcher\TeaBox.Launcher.vs2015.csproj' - 'Source\Macros\Project\TeaBox.Macros.vs2015.csproj' - 'Source\Macros\Tests\TeaBox.Macros.Tests.vs2015.csproj' - 'Source\Teabox\Project\TeaBox.vs2015.csproj' expire_in: '1h' ############# # Stage Build: compile the solution on all targets, keep the binaries for further steps. build:anycpu_debug: stage: build script: - 'TeaBox.com Build -solutionFile=TeaBox.2015.sln -configuration="Debug|Any CPU"' build:anycpu_release: stage: build script: - 'TeaBox.com Build -solutionFile=TeaBox.2015.sln -configuration="Release|Any CPU"' artifacts: name: "TeaBox_AnyCPU" paths: - binaries/ - binaries.tests/ build:win32_debug: stage: build script: - 'TeaBox.com Build -solutionFile=TeaBox.2015.sln -configuration="Debug|win32"' build:win32_release: stage: build script: - 'TeaBox.com Build -solutionFile=TeaBox.2015.sln -configuration="Release|win32"' artifacts: name: "TeaBox_x64" paths: - binaries/ - binaries.tests/ build:x64_debug: stage: build script: - 'TeaBox.com Build -solutionFile=TeaBox.2015.sln -configuration="Debug|x64"' build:x64_release: stage: build script: - 'TeaBox.com Build -solutionFile=TeaBox.2015.sln -configuration="Release|x64"' artifacts: name: "TeaBox_x64" paths: - binaries/ - binaries.tests/ ############# # Stage Test: # -Run all unit tests # -Launch TeaBox to make sure it is usable # -Make sure all the plugins from the plugin store are compiling simplelog:anycpu: stage: test script: - 'xcopy /Y "TestScripts\TestScript.cs" "binaries\Scripts\"' - '"binaries/TeaBox.com" SimpleLog -text="SUCCESSFUL"' dependencies: - build:anycpu_release simplelog:x64: stage: test script: - 'xcopy /Y "TestScripts\TestScript.cs" "binaries\Scripts\"' - '"binaries/TeaBox.com" SimpleLog -text="SUCCESSFUL"' dependencies: - build:x64_release simplelog:win32: stage: test script: - 'xcopy /Y "TestScripts\TestScript.cs" "binaries\Scripts\"' - '"binaries/TeaBox.com" SimpleLog -text="SUCCESSFUL"' dependencies: - build:win32_release pluginstore:anycpu: stage: test script: - 'xcopy /Y /S "PluginStore\*" "binaries\Scripts\"' - '"binaries/TeaBox.com" -OnlyCompile' dependencies: - build:anycpu_release pluginstore:x64: stage: test script: - 'xcopy /Y /S "PluginStore\*" "binaries\Scripts\"' - '"binaries/TeaBox.com" -OnlyCompile' dependencies: - build:x64_release pluginstore:win32: stage: test script: - 'xcopy /Y /S "PluginStore\*" "binaries\Scripts\"' - '"binaries/TeaBox.com" -OnlyCompile' dependencies: - build:win32_release unit_test:anycpu: stage: test script: - TeaBox.com RunTests -solutionFile=TeaBox.2015.sln dependencies: - build:anycpu_release - pre_build unit_test:x64: stage: test script: - TeaBox.com RunTests -solutionFile=TeaBox.2015.sln dependencies: - build:x64_release - pre_build unit_test:win32: stage: test script: - TeaBox.com RunTests -solutionFile=TeaBox.2015.sln dependencies: - build:win32_release - pre_build ############# # Stage Deploy: # -Deploy the tagged versions into Chocolatey deploy_to_choco: stage: deploy script: - TeaBox.com PublishChocoPackage -nuspecFile="Chocolatey/TeaBox.nuspec" only: - tags ############# # Stage Analysis: Run a full SonarQube analysis on the code base. sonarqube_analysis: stage: analysis script: - TeaBox.com AnalyseCode -solutionFile=TeaBox.2015.sln dependencies: - pre_build