-
Notifications
You must be signed in to change notification settings - Fork 789
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #169 from dsyme/appveyor
Minimal PR to enable appveyor support
- Loading branch information
Showing
13 changed files
with
281 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<configuration> | ||
<solution> | ||
<add key="disableSourceControlIntegration" value="true" /> | ||
</solution> | ||
</configuration> |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,136 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup> | ||
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">$(MSBuildProjectDirectory)\..\</SolutionDir> | ||
|
||
<!-- Enable the restore command to run before builds --> | ||
<RestorePackages Condition=" '$(RestorePackages)' == '' ">false</RestorePackages> | ||
|
||
<!-- Property that enables building a package from a project --> | ||
<BuildPackage Condition=" '$(BuildPackage)' == '' ">false</BuildPackage> | ||
|
||
<!-- Determines if package restore consent is required to restore packages --> | ||
<RequireRestoreConsent Condition=" '$(RequireRestoreConsent)' != 'false' ">true</RequireRestoreConsent> | ||
|
||
<!-- Download NuGet.exe if it does not already exist --> | ||
<DownloadNuGetExe Condition=" '$(DownloadNuGetExe)' == '' ">false</DownloadNuGetExe> | ||
</PropertyGroup> | ||
|
||
<ItemGroup Condition=" '$(PackageSources)' == '' "> | ||
<!-- Package sources used to restore packages. By default, registered sources under %APPDATA%\NuGet\NuGet.Config will be used --> | ||
<!-- The official NuGet package source (https://www.nuget.org/api/v2/) will be excluded if package sources are specified and it does not appear in the list --> | ||
<!-- | ||
<PackageSource Include="https://www.nuget.org/api/v2/" /> | ||
<PackageSource Include="https://my-nuget-source/nuget/" /> | ||
--> | ||
</ItemGroup> | ||
|
||
<PropertyGroup Condition=" '$(OS)' == 'Windows_NT'"> | ||
<!-- Windows specific commands --> | ||
<NuGetToolsPath>$([System.IO.Path]::Combine($(SolutionDir), ".nuget"))</NuGetToolsPath> | ||
<PackagesConfig>$([System.IO.Path]::Combine($(ProjectDir), "packages.config"))</PackagesConfig> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition=" '$(OS)' != 'Windows_NT'"> | ||
<!-- We need to launch nuget.exe with the mono command if we're not on windows --> | ||
<NuGetToolsPath>$(SolutionDir).nuget</NuGetToolsPath> | ||
<PackagesConfig>packages.config</PackagesConfig> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup> | ||
<!-- NuGet command --> | ||
<NuGetExePath Condition=" '$(NuGetExePath)' == '' ">$(NuGetToolsPath)\NuGet.exe</NuGetExePath> | ||
<PackageSources Condition=" $(PackageSources) == '' ">@(PackageSource)</PackageSources> | ||
|
||
<NuGetCommand Condition=" '$(OS)' == 'Windows_NT'">"$(NuGetExePath)"</NuGetCommand> | ||
<NuGetCommand Condition=" '$(OS)' != 'Windows_NT' ">mono --runtime=v4.0.30319 $(NuGetExePath)</NuGetCommand> | ||
|
||
<PackageOutputDir Condition="$(PackageOutputDir) == ''">$(TargetDir.Trim('\\'))</PackageOutputDir> | ||
|
||
<RequireConsentSwitch Condition=" $(RequireRestoreConsent) == 'true' ">-RequireConsent</RequireConsentSwitch> | ||
<NonInteractiveSwitch Condition=" '$(VisualStudioVersion)' != '' AND '$(OS)' == 'Windows_NT' ">-NonInteractive</NonInteractiveSwitch> | ||
|
||
<PaddedSolutionDir Condition=" '$(OS)' == 'Windows_NT'">"$(SolutionDir) "</PaddedSolutionDir> | ||
<PaddedSolutionDir Condition=" '$(OS)' != 'Windows_NT' ">"$(SolutionDir)"</PaddedSolutionDir> | ||
|
||
<!-- Commands --> | ||
<RestoreCommand>$(NuGetCommand) install "$(PackagesConfig)" -source "$(PackageSources)" $(NonInteractiveSwitch) $(RequireConsentSwitch) -solutionDir $(PaddedSolutionDir)</RestoreCommand> | ||
<BuildCommand>$(NuGetCommand) pack "$(ProjectPath)" -Properties "Configuration=$(Configuration);Platform=$(Platform)" $(NonInteractiveSwitch) -OutputDirectory "$(PackageOutputDir)" -symbols</BuildCommand> | ||
|
||
<!-- We need to ensure packages are restored prior to assembly resolve --> | ||
<BuildDependsOn Condition="$(RestorePackages) == 'true'"> | ||
RestorePackages; | ||
$(BuildDependsOn); | ||
</BuildDependsOn> | ||
|
||
<!-- Make the build depend on restore packages --> | ||
<BuildDependsOn Condition="$(BuildPackage) == 'true'"> | ||
$(BuildDependsOn); | ||
BuildPackage; | ||
</BuildDependsOn> | ||
</PropertyGroup> | ||
|
||
<Target Name="CheckPrerequisites"> | ||
<!-- Raise an error if we're unable to locate nuget.exe --> | ||
<Error Condition="'$(DownloadNuGetExe)' != 'true' AND !Exists('$(NuGetExePath)')" Text="Unable to locate '$(NuGetExePath)'" /> | ||
<!-- | ||
Take advantage of MsBuild's build dependency tracking to make sure that we only ever download nuget.exe once. | ||
This effectively acts as a lock that makes sure that the download operation will only happen once and all | ||
parallel builds will have to wait for it to complete. | ||
--> | ||
<MsBuild Targets="_DownloadNuGet" Projects="$(MSBuildThisFileFullPath)" Properties="Configuration=NOT_IMPORTANT;DownloadNuGetExe=$(DownloadNuGetExe)" /> | ||
</Target> | ||
|
||
<Target Name="_DownloadNuGet"> | ||
<DownloadNuGet OutputFilename="$(NuGetExePath)" Condition=" '$(DownloadNuGetExe)' == 'true' AND !Exists('$(NuGetExePath)')" /> | ||
</Target> | ||
|
||
<Target Name="RestorePackages" DependsOnTargets="CheckPrerequisites"> | ||
<Exec Command="$(RestoreCommand)" | ||
Condition="'$(OS)' != 'Windows_NT' And Exists('$(PackagesConfig)')" /> | ||
|
||
<Exec Command="$(RestoreCommand)" | ||
LogStandardErrorAsError="true" | ||
Condition="'$(OS)' == 'Windows_NT' And Exists('$(PackagesConfig)')" /> | ||
</Target> | ||
|
||
<Target Name="BuildPackage" DependsOnTargets="CheckPrerequisites"> | ||
<Exec Command="$(BuildCommand)" | ||
Condition=" '$(OS)' != 'Windows_NT' " /> | ||
|
||
<Exec Command="$(BuildCommand)" | ||
LogStandardErrorAsError="true" | ||
Condition=" '$(OS)' == 'Windows_NT' " /> | ||
</Target> | ||
|
||
<UsingTask TaskName="DownloadNuGet" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll"> | ||
<ParameterGroup> | ||
<OutputFilename ParameterType="System.String" Required="true" /> | ||
</ParameterGroup> | ||
<Task> | ||
<Reference Include="System.Core" /> | ||
<Using Namespace="System" /> | ||
<Using Namespace="System.IO" /> | ||
<Using Namespace="System.Net" /> | ||
<Using Namespace="Microsoft.Build.Framework" /> | ||
<Using Namespace="Microsoft.Build.Utilities" /> | ||
<Code Type="Fragment" Language="cs"> | ||
<![CDATA[ | ||
try { | ||
OutputFilename = Path.GetFullPath(OutputFilename); | ||
Log.LogMessage("Downloading latest version of NuGet.exe..."); | ||
WebClient webClient = new WebClient(); | ||
webClient.DownloadFile("https://www.nuget.org/nuget.exe", OutputFilename); | ||
return true; | ||
} | ||
catch (Exception ex) { | ||
Log.LogErrorFromException(ex); | ||
return false; | ||
} | ||
]]> | ||
</Code> | ||
</Task> | ||
</UsingTask> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
@echo on | ||
|
||
set APPVEYOR_CI=1 | ||
|
||
:: Check prerequisites | ||
set _msbuildexe="%ProgramFiles(x86)%\MSBuild\12.0\Bin\MSBuild.exe" | ||
if not exist %_msbuildexe% set _msbuildexe="%ProgramFiles%\MSBuild\12.0\Bin\MSBuild.exe" | ||
if not exist %_msbuildexe% set _msbuildexe="%ProgramFiles(x86)%\MSBuild\14.0\Bin\MSBuild.exe" | ||
if not exist %_msbuildexe% set _msbuildexe="%ProgramFiles%\MSBuild\14.0\Bin\MSBuild.exe" | ||
if not exist %_msbuildexe% echo Error: Could not find MSBuild.exe. Please see http://www.microsoft.com/en-us/download/details.aspx?id=40760. && goto :eof | ||
|
||
set _gacutilexe="%ProgramFiles(x86)%\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\gacutil.exe" | ||
if not exist %_gacutilexe% echo Error: Could not find gacutil.exe. && goto :eof | ||
|
||
.\.nuget\NuGet.exe restore packages.config -PackagesDirectory packages | ||
@if ERRORLEVEL 1 echo Error: Nuget restore failed && goto :eof | ||
|
||
::Build | ||
%_gacutilexe% /i lkg\FSharp-2.0.50726.900\bin\FSharp.Core.dll | ||
@if ERRORLEVEL 1 echo Error: gacutil failed && goto :eof | ||
|
||
%_msbuildexe% src\fsharp-proto-build.proj | ||
@if ERRORLEVEL 1 echo Error: compiler proto build failed && goto :eof | ||
|
||
ngen install lib\proto\fsc-proto.exe | ||
|
||
%_msbuildexe% src/fsharp-library-build.proj /p:UseNugetPackages=true | ||
@if ERRORLEVEL 1 echo Error: library debug build failed && goto :eof | ||
|
||
%_msbuildexe% src/fsharp-compiler-build.proj /p:UseNugetPackages=true | ||
@if ERRORLEVEL 1 echo Error: compile debug build failed && goto :eof | ||
|
||
REM We don't build new net20 FSharp.Core anymore | ||
REM %_msbuildexe% src/fsharp-library-build.proj /p:UseNugetPackages=true /p:TargetFramework=net20 | ||
REM @if ERRORLEVEL 1 echo Error: library net20 debug build failed && goto :eof | ||
|
||
%_msbuildexe% src/fsharp-library-build.proj /p:UseNugetPackages=true /p:TargetFramework=portable47 | ||
@if ERRORLEVEL 1 echo Error: library portable47 debug build failed && goto :eof | ||
|
||
REM Dropped for faster build | ||
REM %_msbuildexe% src/fsharp-library-build.proj /p:UseNugetPackages=true /p:TargetFramework=portable7 | ||
REM @if ERRORLEVEL 1 echo Error: library portable7 debug build failed && goto :eof | ||
|
||
|
||
%_msbuildexe% src/fsharp-library-build.proj /p:UseNugetPackages=true /p:TargetFramework=portable78 | ||
@if ERRORLEVEL 1 echo Error: library portable78 debug build failed && goto :eof | ||
|
||
REM Dropped for faster build | ||
REM %_msbuildexe% src/fsharp-library-build.proj /p:UseNugetPackages=true /p:TargetFramework=portable259 | ||
REM @if ERRORLEVEL 1 echo Error: library portable259 debug build failed && goto :eof | ||
|
||
%_msbuildexe% src/fsharp-library-unittests-build.proj /p:UseNugetPackages=true | ||
@if ERRORLEVEL 1 echo Error: library unittests debug build failed && goto :eof | ||
|
||
|
||
REM Dropped for faster build | ||
REM %_msbuildexe% src/fsharp-library-unittests-build.proj /p:UseNugetPackages=true /p:TargetFramework=portable47 | ||
@REM if ERRORLEVEL 1 echo Error: library unittests debug build failed portable47 && goto :eof | ||
|
||
REM Dropped for faster build | ||
REM %_msbuildexe% src/fsharp-library-unittests-build.proj /p:UseNugetPackages=true /p:TargetFramework=portable7 | ||
REM @if ERRORLEVEL 1 echo Error: library unittests debug build failed portable7 && goto :eof | ||
|
||
REM Dropped for faster build | ||
REM %_msbuildexe% src/fsharp-library-unittests-build.proj /p:UseNugetPackages=true /p:TargetFramework=portable78 | ||
REM @if ERRORLEVEL 1 echo Error: library unittests debug build failed portable78 && goto :eof | ||
|
||
|
||
@echo on | ||
call src\update.cmd debug -ngen | ||
|
||
@echo on | ||
call tests\BuildTestTools.cmd debug | ||
REM @if ERRORLEVEL 1 echo Error: 'tests\BuildTestTools.cmd debug' failed && goto :eof | ||
|
||
@echo on | ||
|
||
pushd tests | ||
|
||
REM Disabled while working out perl problem, see https://github.com/Microsoft/visualfsharp/pull/169 | ||
REM call RunTests.cmd debug fsharp Smoke | ||
REM @if ERRORLEVEL 1 echo Error: 'RunTests.cmd debug fsharpqa Smoke' failed && goto :eof | ||
|
||
REM Disabled while working out perl problem, see https://github.com/Microsoft/visualfsharp/pull/169 | ||
REM call RunTests.cmd debug fsharpqa Smoke | ||
REM @if ERRORLEVEL 1 echo Error: 'RunTests.cmd debug fsharpqa Smoke' failed && goto :eof | ||
|
||
set PATH=%PATH%;%~dp0%packages\NUnit.Runners.2.6.3\tools\ | ||
call RunTests.cmd debug coreunit | ||
@if ERRORLEVEL 1 echo Error: 'RunTests.cmd debug coreunit' failed && goto :eof | ||
|
||
popd | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
init: | ||
build_script: | ||
- cmd: appveyor-build.cmd | ||
test: off | ||
version: 0.0.1.{build} | ||
artifacts: | ||
- path: Debug | ||
name: Debug |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<packages> | ||
<package id="NUnit" version="2.6.3" targetFramework="net40" /> | ||
<package id="NUnit.Runners" version="2.6.3" /> | ||
</packages> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.