Skip to content

Commit

Permalink
CI Improvements (#109)
Browse files Browse the repository at this point in the history
* Changing the package output path so all packages go to the same folder.

* Explicitly setting the repo to use 3.0.100-preview7-012821 rather than latest

* Reducing the azure-pipelines file size by using templates

* Updating the azure-pipelines to collection package artifacts

* Setting RuntimeIdentifier for ubuntu again.
  • Loading branch information
tannergooding committed Aug 10, 2019
1 parent 7c19f8a commit f522f5e
Show file tree
Hide file tree
Showing 6 changed files with 109 additions and 87 deletions.
2 changes: 1 addition & 1 deletion Directory.Build.props
Expand Up @@ -38,7 +38,7 @@
<Authors>Microsoft and Contributors</Authors>
<BaseOutputPath>$(BaseArtifactsPath)bin/$(BaseArtifactsPathSuffix)/</BaseOutputPath>
<Company>Microsoft</Company>
<PackageOutputPath>$(BaseArtifactsPath)pkg/$(BaseArtifactsPathSuffix)/$(Configuration)/</PackageOutputPath>
<PackageOutputPath>$(BaseArtifactsPath)pkg/$(Configuration)/</PackageOutputPath>
<Product>LLVMSharp</Product>
<VersionPrefix>8.0.0</VersionPrefix>
<VersionSuffix>alpha</VersionSuffix>
Expand Down
134 changes: 50 additions & 84 deletions scripts/azure-pipelines.yml
Expand Up @@ -5,94 +5,60 @@ pr:
- master

jobs:
- job: windows_debug_x86
pool:
name: Hosted
demands: Cmd
steps:
- task: BatchScript@1
displayName: 'Run scripts/cibuild.cmd'
inputs:
filename: scripts/cibuild.cmd
arguments: '-configuration Debug -architecture x86'
- template: azure-windows.yml
parameters:
name: windows_debug_x86
pool: Hosted
configuration: Debug
architecture: x86

- job: windows_release_x86
pool:
name: Hosted
demands: Cmd
steps:
- task: BatchScript@1
displayName: 'Run scripts/cibuild.cmd'
inputs:
filename: scripts/cibuild.cmd
arguments: '-configuration Release -architecture x86'
- template: azure-windows.yml
parameters:
name: windows_release_x86
pool: Hosted
configuration: Release
architecture: x86

- job: windows_debug_x64
pool:
name: Hosted
demands: Cmd
steps:
- task: BatchScript@1
displayName: 'Run scripts/cibuild.cmd'
inputs:
filename: scripts/cibuild.cmd
arguments: '-configuration Debug -architecture x64'
- template: azure-windows.yml
parameters:
name: windows_debug_x64
pool: Hosted
configuration: Debug
architecture: x64

- job: windows_release_x64
pool:
name: Hosted
demands: Cmd
steps:
- task: BatchScript@1
displayName: 'Run scripts/cibuild.cmd'
inputs:
filename: scripts/cibuild.cmd
arguments: '-configuration Release -architecture x64'
- template: azure-windows.yml
parameters:
name: windows_release_x64
pool: Hosted
configuration: Release
architecture: x64

- job: ubuntu_1604_debug_x64
pool:
name: Hosted Ubuntu 1604
variables:
RuntimeIdentifier: ubuntu.16.04-x64
steps:
- task: Bash@3
displayName: 'Run scripts/cibuild.sh'
inputs:
targetType: filePath
filePath: ./scripts/cibuild.sh
arguments: '--configuration Debug --architecture x64'
- template: azure-unix.yml
parameters:
name: ubuntu_debug_x64
pool: Hosted Ubuntu 1604
configuration: Debug
architecture: x64
rid: ubuntu.16.04-x64

- job: ubuntu_1604_release_x64
pool:
name: Hosted Ubuntu 1604
variables:
RuntimeIdentifier: ubuntu.16.04-x64
steps:
- task: Bash@3
displayName: 'Run scripts/cibuild.sh'
inputs:
targetType: filePath
filePath: ./scripts/cibuild.sh
arguments: '--configuration Release --architecture x64'
- template: azure-unix.yml
parameters:
name: ubuntu_release_x64
pool: Hosted Ubuntu 1604
configuration: Release
architecture: x64
rid: ubuntu.16.04-x64

- job: macos_1014_debug_x64
pool:
name: Hosted macOS
steps:
- task: Bash@3
displayName: 'Run scripts/cibuild.sh'
inputs:
targetType: filePath
filePath: ./scripts/cibuild.sh
arguments: '--configuration Debug --architecture x64'
- template: azure-unix.yml
parameters:
name: macos_debug_x64
pool: Hosted macOS
configuration: Debug
architecture: x64

- job: macos_1014_release_x64
pool:
name: Hosted macOS
steps:
- task: Bash@3
displayName: 'Run scripts/cibuild.sh'
inputs:
targetType: filePath
filePath: ./scripts/cibuild.sh
arguments: '--configuration Release --architecture x64'
- template: azure-unix.yml
parameters:
name: macos_release_x64
pool: Hosted macOS
configuration: Release
architecture: x64
29 changes: 29 additions & 0 deletions scripts/azure-unix.yml
@@ -0,0 +1,29 @@
jobs:
- job: ${{parameters.name}}
pool:
name: ${{parameters.pool}}
steps:
- task: Bash@3
displayName: 'Run scripts/cibuild.sh'
inputs:
targetType: filePath
filePath: ./scripts/cibuild.sh
arguments: '--configuration ${{parameters.configuration}} --architecture ${{parameters.architecture}}'
- task: PublishTestResults@2
displayName: 'Publish Test Results'
inputs:
testResultsFormat: VSTest
testResultsFiles: artifacts/tst/${{parameters.configuration}}/*.trx
mergeTestResults: true
failTaskOnFailedTests: true
testRunTitle: '${{parameters.name}}'
buildConfiguration: ${{parameters.configuration}}
buildPlatform: ${{parameters.architecture}}
- task: PublishBuildArtifacts@1
displayName: 'Publish NuGet Packages'
inputs:
PathtoPublish: artifacts/pkg/${{parameters.configuration}}
ArtifactName: packages
publishLocation: Container
variables:
RuntimeIdentifier: ${{parameters.rid}}
27 changes: 27 additions & 0 deletions scripts/azure-windows.yml
@@ -0,0 +1,27 @@
jobs:
- job: ${{parameters.name}}
pool:
name: ${{parameters.pool}}
demands: Cmd
steps:
- task: BatchScript@1
displayName: 'Run scripts/cibuild.cmd'
inputs:
filename: scripts/cibuild.cmd
arguments: '-configuration ${{parameters.configuration}} -architecture ${{parameters.architecture}}'
- task: PublishTestResults@2
displayName: 'Publish Test Results'
inputs:
testResultsFormat: VSTest
testResultsFiles: artifacts/tst/${{parameters.configuration}}/*.trx
mergeTestResults: true
failTaskOnFailedTests: true
testRunTitle: '${{parameters.name}}'
buildConfiguration: ${{parameters.configuration}}
buildPlatform: ${{parameters.architecture}}
- task: PublishBuildArtifacts@1
displayName: 'Publish NuGet Packages'
inputs:
PathtoPublish: artifacts/pkg/${{parameters.configuration}}
ArtifactName: packages
publishLocation: Container
2 changes: 1 addition & 1 deletion scripts/build.ps1
Expand Up @@ -120,7 +120,7 @@ try {
$DotNetInstallDirectory = Join-Path -Path $ArtifactsDir -ChildPath "dotnet"
Create-Directory -Path $DotNetInstallDirectory

& $DotNetInstallScript -Channel release/3.0.1xx -Version latest -InstallDir $DotNetInstallDirectory -Architecture $architecture
& $DotNetInstallScript -Channel release/3.0.1xx -Version 3.0.100-preview7-012821 -InstallDir $DotNetInstallDirectory -Architecture $architecture
& $DotNetInstallScript -Channel 2.1 -Version latest -InstallDir $DotNetInstallDirectory -Architecture $architecture -Runtime dotnet
& $DotNetInstallScript -Channel 2.0 -Version latest -InstallDir $DotNetInstallDirectory -Architecture $architecture -Runtime dotnet

Expand Down
2 changes: 1 addition & 1 deletion scripts/build.sh
Expand Up @@ -204,7 +204,7 @@ if [[ ! -z "$architecture" ]]; then
DotNetInstallDirectory="$ArtifactsDir/dotnet"
CreateDirectory "$DotNetInstallDirectory"

. "$DotNetInstallScript" --channel release/3.0.1xx --version latest --install-dir "$DotNetInstallDirectory" --architecture "$architecture"
. "$DotNetInstallScript" --channel release/3.0.1xx --version 3.0.100-preview7-012821 --install-dir "$DotNetInstallDirectory" --architecture "$architecture"
. "$DotNetInstallScript" --channel 2.1 --version latest --install-dir "$DotNetInstallDirectory" --architecture "$architecture" --runtime dotnet
. "$DotNetInstallScript" --channel 2.0 --version latest --install-dir "$DotNetInstallDirectory" --architecture "$architecture" --runtime dotnet

Expand Down

0 comments on commit f522f5e

Please sign in to comment.