Skip to content

Commit f522f5e

Browse files
CI Improvements (#109)
* 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.
1 parent 7c19f8a commit f522f5e

File tree

6 files changed

+109
-87
lines changed

6 files changed

+109
-87
lines changed

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
<Authors>Microsoft and Contributors</Authors>
3939
<BaseOutputPath>$(BaseArtifactsPath)bin/$(BaseArtifactsPathSuffix)/</BaseOutputPath>
4040
<Company>Microsoft</Company>
41-
<PackageOutputPath>$(BaseArtifactsPath)pkg/$(BaseArtifactsPathSuffix)/$(Configuration)/</PackageOutputPath>
41+
<PackageOutputPath>$(BaseArtifactsPath)pkg/$(Configuration)/</PackageOutputPath>
4242
<Product>LLVMSharp</Product>
4343
<VersionPrefix>8.0.0</VersionPrefix>
4444
<VersionSuffix>alpha</VersionSuffix>

scripts/azure-pipelines.yml

Lines changed: 50 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -5,94 +5,60 @@ pr:
55
- master
66

77
jobs:
8-
- job: windows_debug_x86
9-
pool:
10-
name: Hosted
11-
demands: Cmd
12-
steps:
13-
- task: BatchScript@1
14-
displayName: 'Run scripts/cibuild.cmd'
15-
inputs:
16-
filename: scripts/cibuild.cmd
17-
arguments: '-configuration Debug -architecture x86'
8+
- template: azure-windows.yml
9+
parameters:
10+
name: windows_debug_x86
11+
pool: Hosted
12+
configuration: Debug
13+
architecture: x86
1814

19-
- job: windows_release_x86
20-
pool:
21-
name: Hosted
22-
demands: Cmd
23-
steps:
24-
- task: BatchScript@1
25-
displayName: 'Run scripts/cibuild.cmd'
26-
inputs:
27-
filename: scripts/cibuild.cmd
28-
arguments: '-configuration Release -architecture x86'
15+
- template: azure-windows.yml
16+
parameters:
17+
name: windows_release_x86
18+
pool: Hosted
19+
configuration: Release
20+
architecture: x86
2921

30-
- job: windows_debug_x64
31-
pool:
32-
name: Hosted
33-
demands: Cmd
34-
steps:
35-
- task: BatchScript@1
36-
displayName: 'Run scripts/cibuild.cmd'
37-
inputs:
38-
filename: scripts/cibuild.cmd
39-
arguments: '-configuration Debug -architecture x64'
22+
- template: azure-windows.yml
23+
parameters:
24+
name: windows_debug_x64
25+
pool: Hosted
26+
configuration: Debug
27+
architecture: x64
4028

41-
- job: windows_release_x64
42-
pool:
43-
name: Hosted
44-
demands: Cmd
45-
steps:
46-
- task: BatchScript@1
47-
displayName: 'Run scripts/cibuild.cmd'
48-
inputs:
49-
filename: scripts/cibuild.cmd
50-
arguments: '-configuration Release -architecture x64'
29+
- template: azure-windows.yml
30+
parameters:
31+
name: windows_release_x64
32+
pool: Hosted
33+
configuration: Release
34+
architecture: x64
5135

52-
- job: ubuntu_1604_debug_x64
53-
pool:
54-
name: Hosted Ubuntu 1604
55-
variables:
56-
RuntimeIdentifier: ubuntu.16.04-x64
57-
steps:
58-
- task: Bash@3
59-
displayName: 'Run scripts/cibuild.sh'
60-
inputs:
61-
targetType: filePath
62-
filePath: ./scripts/cibuild.sh
63-
arguments: '--configuration Debug --architecture x64'
36+
- template: azure-unix.yml
37+
parameters:
38+
name: ubuntu_debug_x64
39+
pool: Hosted Ubuntu 1604
40+
configuration: Debug
41+
architecture: x64
42+
rid: ubuntu.16.04-x64
6443

65-
- job: ubuntu_1604_release_x64
66-
pool:
67-
name: Hosted Ubuntu 1604
68-
variables:
69-
RuntimeIdentifier: ubuntu.16.04-x64
70-
steps:
71-
- task: Bash@3
72-
displayName: 'Run scripts/cibuild.sh'
73-
inputs:
74-
targetType: filePath
75-
filePath: ./scripts/cibuild.sh
76-
arguments: '--configuration Release --architecture x64'
44+
- template: azure-unix.yml
45+
parameters:
46+
name: ubuntu_release_x64
47+
pool: Hosted Ubuntu 1604
48+
configuration: Release
49+
architecture: x64
50+
rid: ubuntu.16.04-x64
7751

78-
- job: macos_1014_debug_x64
79-
pool:
80-
name: Hosted macOS
81-
steps:
82-
- task: Bash@3
83-
displayName: 'Run scripts/cibuild.sh'
84-
inputs:
85-
targetType: filePath
86-
filePath: ./scripts/cibuild.sh
87-
arguments: '--configuration Debug --architecture x64'
52+
- template: azure-unix.yml
53+
parameters:
54+
name: macos_debug_x64
55+
pool: Hosted macOS
56+
configuration: Debug
57+
architecture: x64
8858

89-
- job: macos_1014_release_x64
90-
pool:
91-
name: Hosted macOS
92-
steps:
93-
- task: Bash@3
94-
displayName: 'Run scripts/cibuild.sh'
95-
inputs:
96-
targetType: filePath
97-
filePath: ./scripts/cibuild.sh
98-
arguments: '--configuration Release --architecture x64'
59+
- template: azure-unix.yml
60+
parameters:
61+
name: macos_release_x64
62+
pool: Hosted macOS
63+
configuration: Release
64+
architecture: x64

scripts/azure-unix.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
jobs:
2+
- job: ${{parameters.name}}
3+
pool:
4+
name: ${{parameters.pool}}
5+
steps:
6+
- task: Bash@3
7+
displayName: 'Run scripts/cibuild.sh'
8+
inputs:
9+
targetType: filePath
10+
filePath: ./scripts/cibuild.sh
11+
arguments: '--configuration ${{parameters.configuration}} --architecture ${{parameters.architecture}}'
12+
- task: PublishTestResults@2
13+
displayName: 'Publish Test Results'
14+
inputs:
15+
testResultsFormat: VSTest
16+
testResultsFiles: artifacts/tst/${{parameters.configuration}}/*.trx
17+
mergeTestResults: true
18+
failTaskOnFailedTests: true
19+
testRunTitle: '${{parameters.name}}'
20+
buildConfiguration: ${{parameters.configuration}}
21+
buildPlatform: ${{parameters.architecture}}
22+
- task: PublishBuildArtifacts@1
23+
displayName: 'Publish NuGet Packages'
24+
inputs:
25+
PathtoPublish: artifacts/pkg/${{parameters.configuration}}
26+
ArtifactName: packages
27+
publishLocation: Container
28+
variables:
29+
RuntimeIdentifier: ${{parameters.rid}}

scripts/azure-windows.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
jobs:
2+
- job: ${{parameters.name}}
3+
pool:
4+
name: ${{parameters.pool}}
5+
demands: Cmd
6+
steps:
7+
- task: BatchScript@1
8+
displayName: 'Run scripts/cibuild.cmd'
9+
inputs:
10+
filename: scripts/cibuild.cmd
11+
arguments: '-configuration ${{parameters.configuration}} -architecture ${{parameters.architecture}}'
12+
- task: PublishTestResults@2
13+
displayName: 'Publish Test Results'
14+
inputs:
15+
testResultsFormat: VSTest
16+
testResultsFiles: artifacts/tst/${{parameters.configuration}}/*.trx
17+
mergeTestResults: true
18+
failTaskOnFailedTests: true
19+
testRunTitle: '${{parameters.name}}'
20+
buildConfiguration: ${{parameters.configuration}}
21+
buildPlatform: ${{parameters.architecture}}
22+
- task: PublishBuildArtifacts@1
23+
displayName: 'Publish NuGet Packages'
24+
inputs:
25+
PathtoPublish: artifacts/pkg/${{parameters.configuration}}
26+
ArtifactName: packages
27+
publishLocation: Container

scripts/build.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ try {
120120
$DotNetInstallDirectory = Join-Path -Path $ArtifactsDir -ChildPath "dotnet"
121121
Create-Directory -Path $DotNetInstallDirectory
122122

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

scripts/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ if [[ ! -z "$architecture" ]]; then
204204
DotNetInstallDirectory="$ArtifactsDir/dotnet"
205205
CreateDirectory "$DotNetInstallDirectory"
206206

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

0 commit comments

Comments
 (0)