Skip to content

Commit e187094

Browse files
authored
Merge pull request #540: Start the move to yaml pipelines.
2 parents 1de8c60 + e2c2fee commit e187094

14 files changed

Lines changed: 274 additions & 23 deletions
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: $(date:yy)$(DayOfYear)$(rev:.r)
2+
3+
trigger:
4+
- master
5+
- releases/shipped
6+
7+
variables:
8+
majorAndMinorVersion: '0.5'
9+
revision: '$(Build.BuildNumber)'
10+
11+
jobs:
12+
- job: Build_Windows
13+
variables:
14+
platformFriendlyName: Windows
15+
strategy:
16+
maxParallel: 2
17+
matrix:
18+
debug:
19+
configuration: Debug
20+
release:
21+
configuration: Release
22+
pool:
23+
vmImage: vs2017-win2016
24+
steps:
25+
- template: templates/windows-build-and-unit-test.yml
26+
27+
- job: Build_macOS
28+
variables:
29+
platformFriendlyName: macOS
30+
strategy:
31+
maxParallel: 2
32+
matrix:
33+
debug:
34+
configuration: Debug
35+
release:
36+
configuration: Release
37+
pool:
38+
vmImage: macOS 10.13
39+
steps:
40+
- template: templates/macos-build-and-unit-test.yml
41+
42+
- job: FunctionalTests_Windows
43+
timeoutInMinutes: 240
44+
variables:
45+
platformFriendlyName: Windows
46+
configuration: Release
47+
pool:
48+
name: FunctionalTests
49+
dependsOn: Build_Windows
50+
condition: succeeded()
51+
steps:
52+
- checkout: none # We'll get the build drop from Build_Windows job
53+
- template: templates/windows-functional-test.yml

.azure-pipelines/pull-request.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: $(date:yy)$(DayOfYear)$(rev:.r)
2+
3+
trigger: none
4+
5+
variables:
6+
majorAndMinorVersion: '0.4'
7+
revision: '$(Build.BuildNumber)'
8+
platform: 'x64'
9+
configuration: release
10+
11+
jobs:
12+
- job: Windows
13+
pool:
14+
vmImage: vs2017-win2016
15+
steps:
16+
- template: templates/windows-build-and-unit-test.yml
17+
18+
- job: macOS
19+
pool:
20+
vmImage: macOS 10.13
21+
steps:
22+
- template: templates/macos-build-and-unit-test.yml
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
steps:
2+
3+
- task: DotNetCoreInstaller@0
4+
displayName: Use .NET Core SDK 2.1.301
5+
inputs:
6+
packageType: sdk
7+
version: '2.1.301'
8+
9+
- task: InstallAppleCertificate@2
10+
displayName: Install kext certificate
11+
inputs:
12+
certSecureFile: PrjFSKextAug272018.p12
13+
certPwd: $(PrjFSKextCertPassword)
14+
keychain: temp
15+
16+
- script: Scripts/Mac/BuildGVFSForMac.sh $(configuration)
17+
displayName: Build VFSForGit $(configuration)
18+
19+
- script: MirrorProvider/Scripts/Mac/Build.sh $(configuration)
20+
displayName: Build MirrorProvider $(configuration)
21+
22+
- task: PublishTestResults@2
23+
displayName: Publish test results
24+
inputs:
25+
testRunner: NUnit
26+
testResultsFiles: '**/TestResult.xml'
27+
searchFolder: $(System.DefaultWorkingDirectory)
28+
testRunTitle: Mac $(configuration) Unit Tests
29+
publishRunAttachments: true
30+
condition: succeededOrFailed()
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
steps:
2+
3+
- script: $(Build.Repository.LocalPath)\\Scripts\\NukeBuildOutputs.bat
4+
displayName: Delete previous build outputs
5+
continueOnError: true
6+
7+
- powershell: |
8+
& 'C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\sn.exe' -Vr *,31bf3856ad364e35
9+
& 'C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\x64\sn.exe' -Vr *,31bf3856ad364e35
10+
displayName: Disable strong name validation for MS delay-signed assemblies
11+
12+
- script: $(Build.Repository.LocalPath)\Scripts\BuildGVFSForWindows.bat $(configuration) $(majorAndMinorVersion).$(revision)
13+
displayName: Run VFSForGit build script ($(configuration))
14+
15+
- script: $(Build.Repository.LocalPath)\MirrorProvider\Scripts\Windows\Build.bat $(configuration)
16+
displayName: Build MirrorProvider ($(configuration))
17+
18+
- script: $(Build.Repository.LocalPath)\Scripts\RunUnitTests.bat $(configuration)
19+
displayName: Run unit tests
20+
21+
- task: PublishTestResults@2
22+
displayName: Publish unit test results
23+
inputs:
24+
testRunner: NUnit
25+
testResultsFiles: "**\\TestResult.xml"
26+
searchFolder: $(System.DefaultWorkingDirectory)
27+
testRunTitle: Windows $(configuration) Unit Tests
28+
publishRunAttachments: true
29+
30+
- script: $(Build.Repository.LocalPath)\Scripts\CI\CreateBuildDrop.bat $(configuration) $(Build.ArtifactStagingDirectory)\Tests
31+
displayName: Create functional test drop.
32+
33+
- task: PublishBuildArtifacts@1
34+
displayName: Publish functional test drop artifact.
35+
inputs:
36+
pathtoPublish: $(Build.ArtifactStagingDirectory)\Tests
37+
artifactName: "FunctionalTests_$(platformFriendlyName)_$(configuration)"
38+
parallel: true
39+
parallelCount: 8
40+
condition: succeededOrFailed()
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
steps:
2+
3+
- task: DownloadBuildArtifacts@0
4+
displayName: Download functional test drop
5+
inputs:
6+
buildType: current
7+
downloadType: specific
8+
artifactName: FunctionalTests_$(platformFriendlyName)_$(configuration)
9+
downloadPath: $(Build.BinariesDirectory)
10+
11+
- script: $(Build.BinariesDirectory)/FunctionalTests_$(platformFriendlyName)_$(configuration)/src/Scripts/ReinstallGVFS.bat $(configuration)
12+
displayName: Run VFSForGit and G4W installers
13+
14+
- script: git config --global credential.interactive never
15+
displayName: Disable interactive auth
16+
17+
- script: $(Build.BinariesDirectory)/FunctionalTests_$(platformFriendlyName)_$(configuration)/src/Scripts/RunFunctionalTests.bat $(configuration) --test-gvfs-on-path --replace-inbox-projfs
18+
displayName: Run functional tests
19+
20+
- task: PublishTestResults@2
21+
displayName: Publish functional test results
22+
inputs:
23+
testRunner: NUnit
24+
testResultsFiles: "**\\TestResult*.xml"
25+
searchFolder: $(System.DefaultWorkingDirectory)
26+
testRunTitle: Windows $(configuration) Functional Tests
27+
publishRunAttachments: true
28+
condition: succeededOrFailed()

GVFS/GVFS.Build/GVFS.PreBuild.csproj

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@
8585
<PackagesPath ParameterType="System.String" Required="true" />
8686
<OutputFile ParameterType="System.String" Required="true" />
8787
<LatestInstaller ParameterType="System.String" Output="true" />
88+
<LatestInstallerFilename ParameterType="System.String" Output="true" />
8889
</ParameterGroup>
8990
<Task>
9091
<Code Type="Class" Source="GenerateGitVersionConstants.cs" />
@@ -93,10 +94,11 @@
9394

9495
<UsingTask TaskName="GenerateInstallScripts" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v12.0.dll">
9596
<ParameterGroup>
96-
<G4WInstallerPath ParameterType="System.String" Required="true" />
97-
<GVFSSetupPath ParameterType="System.String" Required="true" />
98-
<G4WInstallBatPath ParameterType="System.String" Required="true" />
99-
<GVFSInstallBatPath ParameterType="System.String" Required="true" />
97+
<GitInstallerFilename ParameterType="System.String" Required="true" />
98+
<VFSForGitSetupFilename ParameterType="System.String" Required="true" />
99+
<GitInstallBatPath ParameterType="System.String" Required="true" />
100+
<VFSForGitInstallBatPath ParameterType="System.String" Required="true" />
101+
<UnifiedInstallBatPath ParameterType="System.String" Required="true" />
100102
</ParameterGroup>
101103
<Task>
102104
<Code Type="Class" Source="GenerateInstallScripts.cs" />
@@ -138,11 +140,13 @@
138140
</UsingTask>
139141

140142
<PropertyGroup>
143+
<GVFSSetupFilename>SetupGVFS.$(GVFSVersion).exe</GVFSSetupFilename>
141144
<GVFSSetupPath>$(BuildOutputDir)\GVFS.Installer.Windows\bin\x64\$(Configuration)\SetupGVFS.$(GVFSVersion).exe</GVFSSetupPath>
142145
<OutDir>$(BuildOutputDir)\GVFS.Build\</OutDir>
143146
<GitVersionConstantsPath>$(OutDir)GVFSConstants.GitVersion.cs</GitVersionConstantsPath>
144147
<G4WInstallBatPath>$(OutDir)InstallG4W.bat</G4WInstallBatPath>
145148
<GVFSInstallBatPath>$(OutDir)InstallGVFS.bat</GVFSInstallBatPath>
149+
<UnifiedInstallBatPath>$(OutDir)InstallProduct.bat</UnifiedInstallBatPath>
146150
<GVFSInstallerNuspecPath>$(OutDir)GVFS.Installers.nuspec</GVFSInstallerNuspecPath>
147151
<AssemblyVersionPath>$(BuildOutputDir)\CommonAssemblyVersion.cs</AssemblyVersionPath>
148152
<VersionHeaderPath>$(BuildOutputDir)\CommonVersionHeader.h</VersionHeaderPath>
@@ -186,13 +190,19 @@
186190
<Target Name="GenerateInstallScripts"
187191
DependsOnTargets="GVFSPackageRestore;$(GenerateInstallScriptsDependsOn)"
188192
Inputs="$(RestoreTimestampPath);@(GeneratedPackageConfig);$(MSBuildThisFileFullPath);$(MSBuildProjectFullPath);$(MSBuildThisFileDirectory)GenerateGitVersionConstants.cs;$(MSBuildThisFileDirectory)GenerateInstallScripts.cs;$(MSBuildThisFileDirectory)GenerateGVFSInstallersNuspec.cs"
189-
Outputs="$(GitVersionConstantsPath);$(G4WInstallBatPath);$(GVFSInstallBatPath);$(GVFSInstallerNuspecPath)"
193+
Outputs="$(GitVersionConstantsPath);$(G4WInstallBatPath);$(GVFSInstallBatPath);$(GVFSInstallerNuspecPath);$(UnifiedInstallBatPath);$(OutDir)$(G4WInstallerFilename)"
190194
Condition="'$(OS)' == 'Windows_NT'">
191195
<GenerateGitVersionConstants GitPackageVersion="$(GitPackageVersion)" PackagesPath="$(PackagesDir)" OutputFile="$(GitVersionConstantsPath)">
192-
<Output PropertyName="G4WInstaller" TaskParameter="LatestInstaller" />
196+
<Output TaskParameter="LatestInstaller" PropertyName="G4WInstaller" />
197+
<Output TaskParameter="LatestInstallerFilename" PropertyName="G4WInstallerFilename" />
193198
</GenerateGitVersionConstants>
194-
<GenerateInstallScripts G4WInstallerPath="$(G4WInstaller)" GVFSSetupPath="$(GVFSSetupPath)" G4WInstallBatPath="$(G4WInstallBatPath)" GVFSInstallBatPath="$(GVFSInstallBatPath)" />
199+
<GenerateInstallScripts GitInstallerFilename="$(G4WInstallerFilename)"
200+
VFSForGitSetupFilename="$(GVFSSetupFilename)"
201+
GitInstallBatPath="$(G4WInstallBatPath)"
202+
VFSForGitInstallBatPath="$(GVFSInstallBatPath)"
203+
UnifiedInstallBatPath="$(UnifiedInstallBatPath)"/>
195204
<GenerateGVFSInstallersNuspec GVFSSetupPath="$(GVFSSetupPath)" GitPackageVersion="$(GitPackageVersion)" PackagesPath="$(PackagesDir)" OutputFile="$(GVFSInstallerNuspecPath)" />
205+
<Copy SourceFiles="$(G4WInstaller)" DestinationFiles="$(OutDir)\$(G4WInstallerFilename)" />
196206
</Target>
197207

198208
<Target Name="GenerateShared"

GVFS/GVFS.Build/GenerateGitVersionConstants.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ public class GenerateGitVersionConstants : Task
2020
[Output]
2121
public string LatestInstaller { get; set; }
2222

23+
[Output]
24+
public string LatestInstallerFilename { get; set; }
25+
2326
public override bool Execute()
2427
{
2528
this.Log.LogMessage(MessageImportance.High, "Creating constants for Git package " + this.GitPackageVersion);
@@ -36,11 +39,11 @@ public override bool Execute()
3639
}
3740

3841
this.LatestInstaller = Path.GetFullPath(Directory.EnumerateFiles(installerDirectory).Single());
39-
string installer = Path.GetFileName(this.LatestInstaller);
42+
this.LatestInstallerFilename = Path.GetFileName(this.LatestInstaller);
4043
GitVersion version;
41-
if (!GitVersion.TryParseInstallerName(installer, out version))
44+
if (!GitVersion.TryParseInstallerName(this.LatestInstallerFilename, out version))
4245
{
43-
this.Log.LogError("Unable to parse git version: " + installer);
46+
this.Log.LogError("Unable to parse git version: " + this.LatestInstallerFilename);
4447
return false;
4548
}
4649

Lines changed: 34 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,61 @@
11
using Microsoft.Build.Framework;
22
using Microsoft.Build.Utilities;
33
using System.IO;
4+
using System.Text;
45

56
namespace GVFS.PreBuild
67
{
78
public class GenerateInstallScripts : Task
89
{
910
[Required]
10-
public string G4WInstallerPath { get; set; }
11+
public string GitInstallerFilename { get; set; }
1112

1213
[Required]
13-
public string GVFSSetupPath { get; set; }
14+
public string VFSForGitSetupFilename { get; set; }
1415

1516
[Required]
16-
public string G4WInstallBatPath { get; set; }
17+
public string GitInstallBatPath { get; set; }
1718

1819
[Required]
19-
public string GVFSInstallBatPath { get; set; }
20+
public string VFSForGitInstallBatPath { get; set; }
21+
22+
[Required]
23+
public string UnifiedInstallBatPath { get; set; }
2024

2125
public override bool Execute()
2226
{
23-
this.Log.LogMessage(MessageImportance.High, "Creating install script for " + this.G4WInstallerPath);
27+
this.Log.LogMessage(MessageImportance.High, "Creating install scripts for " + this.GitInstallerFilename);
28+
29+
File.WriteAllText(
30+
this.GitInstallBatPath,
31+
this.GetGitInstallCommand());
2432

2533
File.WriteAllText(
26-
this.G4WInstallBatPath,
27-
this.G4WInstallerPath + @" /DIR=""C:\Program Files\Git"" /NOICONS /COMPONENTS=""ext,ext\shellhere,ext\guihere,assoc,assoc_sh"" /GROUP=""Git"" /VERYSILENT /SUPPRESSMSGBOXES /NORESTART");
34+
this.VFSForGitInstallBatPath,
35+
this.GetVFSForGitInstallCommand());
36+
37+
StringBuilder sb = new StringBuilder();
38+
sb.AppendLine("REM AUTOGENERATED DO NOT EDIT");
39+
sb.AppendLine();
40+
sb.AppendLine(this.GetGitInstallCommand());
41+
sb.AppendLine();
42+
sb.AppendLine(this.GetVFSForGitInstallCommand());
2843

2944
File.WriteAllText(
30-
this.GVFSInstallBatPath,
31-
this.GVFSSetupPath + " /VERYSILENT /SUPPRESSMSGBOXES /NORESTART");
45+
this.UnifiedInstallBatPath,
46+
sb.ToString());
3247

3348
return true;
3449
}
50+
51+
public string GetGitInstallCommand()
52+
{
53+
return "%~dp0\\" + this.GitInstallerFilename + @" /DIR=""C:\Program Files\Git"" /NOICONS /COMPONENTS=""ext,ext\shellhere,ext\guihere,assoc,assoc_sh"" /GROUP=""Git"" /VERYSILENT /SUPPRESSMSGBOXES /NORESTART";
54+
}
55+
56+
public string GetVFSForGitInstallCommand()
57+
{
58+
return "%~dp0\\" + this.VFSForGitSetupFilename + " /VERYSILENT /SUPPRESSMSGBOXES /NORESTART";
59+
}
3560
}
3661
}

GVFS/GVFS.FunctionalTests/GVFS.FunctionalTests.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
<OutputType>Exe</OutputType>
55
<TargetFramework>netcoreapp2.1</TargetFramework>
66
<Platforms>x64</Platforms>
7+
<!-- see https://github.com/NuGet/Home/issues/4837 for reference to CopyLocalLockFileAssemblies -->
8+
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
9+
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
10+
<RuntimeIdentifiers>win-x64;osx-x64</RuntimeIdentifiers>
711
</PropertyGroup>
812

913
<PropertyGroup>

GVFS/GVFS.Installer.Windows/GVFS.Installer.Windows.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
4949
<Target Name="CreateInstaller" BeforeTargets="Build;SignFiles">
5050
<Exec Command="$(PackagesDir)\Tools.InnoSetup.5.5.9\tools\ISCC.exe /DPlatformAndConfiguration=$(Platform)\$(Configuration) /DProjFSPackage=$(ProjFSPackage) /DBuildOutputDir=$(BuildOutputDir) /DPackagesDir=$(PackagesDir) /DGVFSVersion=$(GVFSVersion) Setup.iss /O$(OutputPath)" />
51+
<Copy SourceFiles="$(OutputPath)SetupGVFS.$(GVFSVersion).exe" DestinationFiles="$(BuildOutputDir)\GVFS.Build\SetupGVFS.$(GVFSVersion).exe" />
5152
</Target>
5253
<Target Name="Clean">
5354
<RemoveDir Directories="$(BuildOutputDir)\$(MSBuildProjectName)" />

0 commit comments

Comments
 (0)