Skip to content

Commit

Permalink
Update R provider to use Paket & try fix Travis
Browse files Browse the repository at this point in the history
The only notable thing about this is that I had to move RProvider.DesignTime to a
separate directory (a good thing anyway) so that it can have its own `paket.references`
file (specifying additional dependencies). This is now also using github reference
to get the type provider starter pack files.
  • Loading branch information
tpetricek committed Jan 13, 2015
1 parent 9dbe52a commit ebe83b3
Show file tree
Hide file tree
Showing 37 changed files with 929 additions and 302 deletions.
6 changes: 0 additions & 6 deletions .nuget/NuGet.Config

This file was deleted.

Binary file removed .nuget/NuGet.exe
Binary file not shown.
136 changes: 0 additions & 136 deletions .nuget/NuGet.targets

This file was deleted.

Binary file added .paket/paket.bootstrapper.exe
Binary file not shown.
38 changes: 38 additions & 0 deletions .paket/paket.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<!-- Enable the restore command to run before builds -->
<RestorePackages Condition=" '$(RestorePackages)' == '' ">true</RestorePackages>
<!-- Download Paket.exe if it does not already exist -->
<DownloadPaket Condition=" '$(DownloadPaket)' == '' ">true</DownloadPaket>
<PaketToolsPath>$(MSBuildThisFileDirectory)</PaketToolsPath>
<PaketRootPath>$(MSBuildThisFileDirectory)..\</PaketRootPath>
</PropertyGroup>
<PropertyGroup>
<!-- Paket command -->
<PaketExePath Condition=" '$(PaketExePath)' == '' ">$(PaketToolsPath)paket.exe</PaketExePath>
<PaketBootStrapperExePath Condition=" '$(PaketBootStrapperExePath)' == '' ">$(PaketToolsPath)paket.bootstrapper.exe</PaketBootStrapperExePath>
<PaketCommand Condition=" '$(OS)' == 'Windows_NT'">"$(PaketExePath)"</PaketCommand>
<PaketCommand Condition=" '$(OS)' != 'Windows_NT' ">mono --runtime=v4.0.30319 $(PaketExePath)</PaketCommand>
<PaketBootStrapperCommand Condition=" '$(OS)' == 'Windows_NT'">"$(PaketBootStrapperExePath)"</PaketBootStrapperCommand>
<PaketBootStrapperCommand Condition=" '$(OS)' != 'Windows_NT' ">mono --runtime=v4.0.30319 $(PaketBootStrapperExePath)</PaketBootStrapperCommand>
<!-- Commands -->
<PaketReferences Condition="!Exists('$(MSBuildProjectFullPath).paket.references')">$(MSBuildProjectDirectory)\paket.references</PaketReferences>
<PaketReferences Condition="Exists('$(MSBuildProjectFullPath).paket.references')">$(MSBuildProjectFullPath).paket.references</PaketReferences>
<RestoreCommand>$(PaketCommand) restore --references-files "$(PaketReferences)"</RestoreCommand>
<DownloadPaketCommand>$(PaketBootStrapperCommand)</DownloadPaketCommand>
<!-- We need to ensure packages are restored prior to assembly resolve -->
<BuildDependsOn Condition="$(RestorePackages) == 'true'">RestorePackages; $(BuildDependsOn);</BuildDependsOn>
</PropertyGroup>
<Target Name="CheckPrerequisites">
<!-- Raise an error if we're unable to locate paket.exe -->
<Error Condition="'$(DownloadPaket)' != 'true' AND !Exists('$(PaketExePath)')" Text="Unable to locate '$(PaketExePath)'" />
<MsBuild Targets="DownloadPaket" Projects="$(MSBuildThisFileFullPath)" Properties="Configuration=NOT_IMPORTANT;DownloadPaket=$(DownloadPaket)" />
</Target>
<Target Name="DownloadPaket">
<Exec Command="$(DownloadPaketCommand)" Condition=" '$(DownloadPaket)' == 'true' AND !Exists('$(PaketExePath)')" />
</Target>
<Target Name="RestorePackages" DependsOnTargets="CheckPrerequisites">
<Exec Command="$(RestoreCommand)" WorkingDirectory="$(PaketRootPath)" Condition="Exists('$(PaketReferences)')" />
</Target>
</Project>
13 changes: 3 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,14 @@
language: objective-c
language: csharp

env:
global:
- EnableNuGetPackageRestore=true
matrix:
- MONO_VERSION="3.2.5"
sudo: false

install:
- wget "http://download.xamarin.com/MonoFrameworkMDK/Macx86/MonoFramework-MDK-${MONO_VERSION}.macos10.xamarin.x86.pkg"
- sudo installer -pkg "MonoFramework-MDK-${MONO_VERSION}.macos10.xamarin.x86.pkg" -target /
- chmod 755 ./build.sh

script:
- ./build.sh AllCore

branches:
except:
- gh-pages
- release

8 changes: 7 additions & 1 deletion RProvider.Tests.sln
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@


Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.30110.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".paket", ".paket", "{B91D3969-5664-4A5F-845A-4FD7268C1BE9}"
ProjectSection(SolutionItems) = preProject
paket.dependencies = paket.dependencies
paket.lock = paket.lock
EndProjectSection
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Test.RProvider", "tests\Test.RProvider\Test.RProvider.fsproj", "{A371037F-5B03-4C6C-91D3-5DFD494E0BFB}"
EndProject
Global
Expand Down
17 changes: 8 additions & 9 deletions RProvider.sln
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@


Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.30110.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".paket", ".paket", "{4F7B6E34-9782-4B13-BF92-CDE7C7F54B86}"
ProjectSection(SolutionItems) = preProject
paket.dependencies = paket.dependencies
paket.lock = paket.lock
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "project", "project", "{5FA7D1AD-DEDA-4553-81D1-6E4728386A2F}"
ProjectSection(SolutionItems) = preProject
build.cmd = build.cmd
Expand All @@ -13,13 +19,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "project", "project", "{5FA7
nuget\RProvider.nuspec = nuget\RProvider.nuspec
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{6D45A358-1BAC-4180-BEE7-39996F45DEAC}"
ProjectSection(SolutionItems) = preProject
.nuget\NuGet.Config = .nuget\NuGet.Config
.nuget\NuGet.exe = .nuget\NuGet.exe
.nuget\NuGet.targets = .nuget\NuGet.targets
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{B34F96AE-40C8-44AC-8D82-5196202C080E}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{9C22FF03-BB06-4332-8104-20AB4959BABA}"
Expand Down Expand Up @@ -47,7 +46,7 @@ Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "RProvider", "src\RProvider\
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "RWrapperGenerator", "src\RWrapperGenerator\RWrapperGenerator.fsproj", "{66A390A5-526A-4BD1-B876-E7425B643C70}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "RProvider.DesignTime", "src\RProvider\RProvider.DesignTime.fsproj", "{00496B70-99EA-4ED2-AFD5-6DB4A1DB7317}"
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "RProvider.DesignTime", "src\RProvider.DesignTime\RProvider.DesignTime.fsproj", "{00496B70-99EA-4ED2-AFD5-6DB4A1DB7317}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "RProvider.Server", "src\RProvider\RProvider.Server.fsproj", "{7FF9CFA3-2516-4970-9DD8-54C7D4CA24AA}"
EndProject
Expand Down
6 changes: 2 additions & 4 deletions build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,7 @@ Target "MergeRProviderServer" (fun _ ->


Target "RunTests" (fun _ ->
let xunitVersion = GetPackageVersion "packages" "xunit.runners"
let xunitPath = sprintf "packages/xunit.runners.%s/tools/xunit.console.clr4.exe" xunitVersion
let xunitPath = "packages/xunit.runners/tools/xunit.console.clr4.exe"

ActivateFinalTarget "CloseTestRunner"

Expand All @@ -151,7 +150,6 @@ FinalTarget "CloseTestRunner" (fun _ ->
Target "NuGet" (fun _ ->
// Format the description to fit on a single line (remove \r\n and double-spaces)
let projectDescription = projectDescription.Replace("\r", "").Replace("\n", "").Replace(" ", " ")
let nugetPath = ".nuget/nuget.exe"
NuGet (fun p ->
{ p with
Authors = authors
Expand All @@ -162,7 +160,7 @@ Target "NuGet" (fun _ ->
ReleaseNotes = String.concat " " release.Notes
Tags = tags
OutputPath = "bin"
ToolPath = nugetPath
ToolPath = "nuget.exe"
AccessKey = getBuildParamOrDefault "nugetkey" ""
Publish = hasBuildParam "nugetkey" })
"nuget/RProvider.nuspec"
Expand Down
32 changes: 27 additions & 5 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,32 @@
if test "$OS" = "Windows_NT"
then
# use .Net
.nuget/NuGet.exe install FAKE -OutputDirectory packages -ExcludeVersion
packages/FAKE/tools/FAKE.exe build.fsx $@

.paket/paket.bootstrapper.exe
exit_code=$?
if [ $exit_code -ne 0 ]; then
exit $exit_code
fi

.paket/paket.exe restore
exit_code=$?
if [ $exit_code -ne 0 ]; then
exit $exit_code
fi

packages/FAKE/tools/FAKE.exe $@ --fsiargs -d:MONO build.fsx
else
# use mono
mono .nuget/NuGet.exe install FAKE -OutputDirectory packages -ExcludeVersion
mono packages/FAKE/tools/FAKE.exe $@ --fsiargs -d:MONO build.fsx
fi
mono .paket/paket.bootstrapper.exe prerelease
exit_code=$?
if [ $exit_code -ne 0 ]; then
exit $exit_code
fi

mono .paket/paket.exe restore
exit_code=$?
if [ $exit_code -ne 0 ]; then
exit $exit_code
fi
mono packages/FAKE/tools/FAKE.exe $@ --fsiargs -d:MONO build.fsx
fi
8 changes: 0 additions & 8 deletions docs/tools/packages.config

This file was deleted.

5 changes: 5 additions & 0 deletions docs/tools/paket.references
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FSharp.Data
FSharp.Formatting
FSharp.Compiler.Service
Microsoft.AspNet.Razor
RazorEngine
Loading

0 comments on commit ebe83b3

Please sign in to comment.