Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initiate CI checks for inclusion in installer #36

Merged
merged 2 commits into from
May 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .ci/CloneTest.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Param([string]$repo)

# **** Cloning BHoM Test_Toolkit ****
$repo = "Test_Toolkit"

# **** Defining Paths ****
$slnPath = "$ENV:BUILD_SOURCESDIRECTORY\$repo\$repo.sln"

# **** Cloning Repo ****
Write-Output ("Cloning " + $repo + " to " + $ENV:BUILD_SOURCESDIRECTORY + "\" + $repo)
git clone -q --branch=master https://github.com/BHoM/$repo.git $ENV:BUILD_SOURCESDIRECTORY\$repo

# **** Restore NuGet ****
Write-Output ("Restoring NuGet packages for " + $repo)
& NuGet.exe restore $slnPath
67 changes: 67 additions & 0 deletions .ci/check-all-depandants.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# ASP.NET Core (.NET Framework)
# Build and test ASP.NET Core projects targeting the full .NET Framework.
# Add steps that publish symbols, save build artifacts, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core

trigger:
- master
pr:
- master

pool:
vmImage: 'vs2017-win2016'

variables:
solution: '**/OpenStreetMap_Toolkit.sln'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
projectName: 'OpenStreetMap_Toolkit'

steps:
- checkout: self
persistCredentials: true

- task: CopyFiles@2
displayName: 'Move Cloned Files to Correct Toolkit Folder'
inputs:
SourceFolder: '$(Build.SourcesDirectory)'
Contents: '**'
TargetFolder: '$(Build.SourcesDirectory)/$(projectName)'

- task: DeleteFiles@1
displayName: 'Clean Up After Moving Cloned Files'
inputs:
SourceFolder: '$(Build.SourcesDirectory)'
Contents: '**.sln'

- task: NuGetToolInstaller@1

- task: PowerShell@2
displayName: 'Clone Test Toolkit'
inputs:
filePath: '.ci/CloneTest.ps1'

- task: PowerShell@2
displayName: 'Clone and Build Dependencies'
inputs:
filePath: '$(Build.SourcesDirectory)/Test_Toolkit/CloneAndBuildDependencies.ps1'

- task: NuGetCommand@2
displayName: 'Restore NuGets for Primary Solution'
inputs:
restoreSolution: '$(solution)'

- task: PowerShell@2
displayName: 'Build Primary Solution'
inputs:
filePath: '$(Build.SourcesDirectory)/Test_Toolkit/BuildPrimarySolution.ps1'

- task: PowerShell@2
displayName: 'Clone and Build Core Dependencies'
inputs:
filePath: '$(Build.SourcesDirectory)/Test_Toolkit/CloneAndBuildCore.ps1'

- task: PowerShell@2
displayName: 'Clone and Build all Dependencies'
inputs:
filePath: '$(Build.SourcesDirectory)/Test_Toolkit/CloneAndBuildDependencies.ps1'
62 changes: 62 additions & 0 deletions .ci/check-core.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# ASP.NET Core (.NET Framework)
# Build and test ASP.NET Core projects targeting the full .NET Framework.
# Add steps that publish symbols, save build artifacts, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core

trigger:
- master
pr:
- master

pool:
vmImage: 'vs2017-win2016'

variables:
solution: '**/OpenStreetMap_Toolkit.sln'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
projectName: 'OpenStreetMap_Toolkit'

steps:
- checkout: self
persistCredentials: true

- task: CopyFiles@2
displayName: 'Move Cloned Files to Correct Toolkit Folder'
inputs:
SourceFolder: '$(Build.SourcesDirectory)'
Contents: '**'
TargetFolder: '$(Build.SourcesDirectory)/$(projectName)'

- task: DeleteFiles@1
displayName: 'Clean Up After Moving Cloned Files'
inputs:
SourceFolder: '$(Build.SourcesDirectory)'
Contents: '**.sln'

- task: NuGetToolInstaller@1

- task: PowerShell@2
displayName: 'Clone Test Toolkit'
inputs:
filePath: '.ci/CloneTest.ps1'

- task: PowerShell@2
displayName: 'Clone and Build Dependencies'
inputs:
filePath: '$(Build.SourcesDirectory)/Test_Toolkit/CloneAndBuildDependencies.ps1'

- task: NuGetCommand@2
displayName: 'Restore NuGets for Primary Solution'
inputs:
restoreSolution: '$(solution)'

- task: PowerShell@2
displayName: 'Build Primary Solution'
inputs:
filePath: '$(Build.SourcesDirectory)/Test_Toolkit/BuildPrimarySolution.ps1'

- task: PowerShell@2
displayName: 'Clone and Build Core Dependencies'
inputs:
filePath: '$(Build.SourcesDirectory)/Test_Toolkit/CloneAndBuildCore.ps1'
45 changes: 45 additions & 0 deletions .ci/check-installer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# ASP.NET Core (.NET Framework)
# Build and test ASP.NET Core projects targeting the full .NET Framework.
# Add steps that publish symbols, save build artifacts, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core

trigger:
- master
pr:
- master

pool:
vmImage: 'vs2017-win2016'

variables:
solution: '**/OpenStreetMap_Toolkit.sln'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
projectName: 'OpenStreetMap_Toolkit'

steps:
- checkout: self
persistCredentials: true

- task: DeleteFiles@1
displayName: 'Clean Up After Moving Cloned Files'
inputs:
SourceFolder: '$(Build.SourcesDirectory)'
Contents: '**.sln'

- task: NuGetToolInstaller@1

- task: PowerShell@2
displayName: 'Clone Test Toolkit'
inputs:
filePath: '.ci/CloneTest.ps1'

- task: PowerShell@2
displayName: 'Clone BHoM_Installer'
inputs:
filePath: '$(Build.SourcesDirectory)/Test_Toolkit/CloneInstaller.ps1'

- task: PowerShell@2
displayName: 'Run BHoM_Installer tasks'
inputs:
filePath: '$(Build.SourcesDirectory)/Test_Toolkit/BuildInstaller.ps1'
63 changes: 63 additions & 0 deletions .ci/run-compliance-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# ASP.NET Core (.NET Framework)
# Build and test ASP.NET Core projects targeting the full .NET Framework.
# Add steps that publish symbols, save build artifacts, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core

trigger:
- master
pr:
- master

pool:
vmImage: 'vs2017-win2016'

variables:
solution: '**/OpenStreetMap_Toolkit.sln'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
projectName: 'OpenStreetMap_Toolkit'

steps:
- checkout: self
persistCredentials: true

- task: CopyFiles@2
displayName: 'Move Cloned Files to Correct Toolkit Folder'
inputs:
SourceFolder: '$(Build.SourcesDirectory)'
Contents: '**'
TargetFolder: '$(Build.SourcesDirectory)/$(projectName)'

- task: DeleteFiles@1
displayName: 'Clean Up After Moving Cloned Files'
inputs:
SourceFolder: '$(Build.SourcesDirectory)'
Contents: '**.sln'

- task: NuGetToolInstaller@1

- task: PowerShell@2
displayName: 'Clone Test Toolkit'
inputs:
filePath: '.ci/CloneTest.ps1'

- task: PowerShell@2
displayName: 'Clone and Build Dependencies'
inputs:
filePath: '$(Build.SourcesDirectory)/Test_Toolkit/CloneAndBuildDependencies.ps1'

- task: PowerShell@2
displayName: 'Build Test Toolkit'
inputs:
filePath: '$(Build.SourcesDirectory)/Test_Toolkit/BuildTest.ps1'

- task: PowerShell@2
displayName: 'Copy changed files'
inputs:
filePath: '$(Build.SourcesDirectory)/Test_Toolkit/MovePRFiles.ps1'

- task: VSTest@2
inputs:
testSelector: 'testAssemblies'
testAssemblyVer2: '$(Build.SourcesDirectory)/Test_Toolkit/Build/CodeComplianceTest_Test.dll'
runSettingsFile: '.ci/testSettings.runsettings'
66 changes: 66 additions & 0 deletions .ci/testSettings.runsettings
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<?xml version="1.0" encoding="utf-8"?>
<RunSettings>
<!-- Configurations that affect the Test Framework -->
<RunConfiguration>
<MaxCpuCount>1</MaxCpuCount>
<!-- Path relative to solution directory -->
<ResultsDirectory>..\TestResults</ResultsDirectory>

<!-- [x86] | x64
- You can also change it from menu Test, Test Settings, Default Processor Architecture -->
<TargetPlatform>x86</TargetPlatform>

<!-- Framework35 | [Framework40] | Framework45 -->
<TargetFrameworkVersion>Framework40</TargetFrameworkVersion>

<!-- Path to Test Adapters -->
<!--<TestAdaptersPaths>%SystemDrive%\Temp\foo;%SystemDrive%\Temp\bar</TestAdaptersPaths>-->
</RunConfiguration>

<!-- Configurations for data collectors -->
<DataCollectionRunSettings>
<DataCollectors>
<DataCollector friendlyName="Code Coverage" uri="datacollector://Microsoft/CodeCoverage/2.0" assemblyQualifiedName="Microsoft.VisualStudio.Coverage.DynamicCoverageDataCollector, Microsoft.VisualStudio.TraceCollector, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<Configuration>
<CodeCoverage>
<ModulePaths>
<Exclude>
<ModulePath>.*CPPUnitTestFramework.*</ModulePath>
</Exclude>
</ModulePaths>

<!-- We recommend you do not change the following values: -->
<UseVerifiableInstrumentation>True</UseVerifiableInstrumentation>
<AllowLowIntegrityProcesses>True</AllowLowIntegrityProcesses>
<CollectFromChildProcesses>True</CollectFromChildProcesses>
<CollectAspDotNet>False</CollectAspDotNet>

</CodeCoverage>
</Configuration>
</DataCollector>

</DataCollectors>
</DataCollectionRunSettings>

<!-- Parameters used by tests at runtime -->
<TestRunParameters>
<Parameter name="projectName" value="OpenStreetMap_Toolkit" />
<Parameter name="oMName" value="OpenStreetMap_oM" />
<Parameter name="engineName" value="OpenStreetMap_Engine" />
<Parameter name="adapterName" value="null" />
</TestRunParameters>

<!-- Adapter Specific sections -->

<!-- MSTest adapter -->
<MSTest>
<MapInconclusiveToFailed>True</MapInconclusiveToFailed>
<CaptureTraceOutput>false</CaptureTraceOutput>
<DeleteDeploymentDirectoryAfterTestRunIsComplete>False</DeleteDeploymentDirectoryAfterTestRunIsComplete>
<DeploymentEnabled>False</DeploymentEnabled>
<AssemblyResolution>
<Directory path="D:\myfolder\bin\" includeSubDirectories="false"/>
</AssemblyResolution>
</MSTest>

</RunSettings>
Empty file added core.txt
Empty file.
Empty file added dependants.txt
Empty file.
2 changes: 2 additions & 0 deletions dependencies.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
BHoM/BHoM
BHoM/BHoM_Engine