Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Add basic Travis CI support #12

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

Carbenium
Copy link

@Carbenium Carbenium commented Jun 18, 2017

Travis CI builds the sln using msbuild in Release and Debug configurations

Still disabled projects:

  • Banshee.Osx - can only built on OS X
  • Banshee.GStreamerSharp - needs gstreamer-sharp as dependency which isn't that easy to build from official upstream sources
  • Banshee.Windows - can only be built on Windows
  • Banshee.Dap.AppleDevice - needs libgpod-cil as dependency which is unmaintained and out of date. IDevices can be synchronized using B.Dap.MassStorage. It might be better to remove this one.
  • Banshee.Dap.Karma - very old stuff. Probably better to remove, too.
  • Banshee.UbuntuOneMusicStore - more or less dead

B.YouTube pulls its dependecies on Google.GData.* using NuGet

Ref #4

.travis.yml Outdated
- BUILD_CONFIGURATION=Debug

script:
- msbuild /p:Configuration=$BUILD_CONFIGURATION Banshee.sln
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm, I hadn't thought much about CI when I did the autotools changes in 1e4ea09 (switches for everything, disable all by default)

I think we should stick to using them for building in a CI chain - although it might be more natural to use a solution file here.

I tried master's autotools setup and had to use ./autoregen.sh instead of the generic autoreconf -fvi though and I think if we add part of the above sha1's patch (the M4_DIRS change in configure.ac) then we can get it working, we'll have to add a bunch of --enable/disable switches.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to build it both ways (Solution and autotools) to ensure compatibility between both build systems. Especially since you can't really use autotools on Windows.

This PR should be just the first step. And since scripting the msbuild part was easier, I did that for starters ;)

Copy link
Owner

@arfbtwn arfbtwn Jun 19, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, both systems should be able to build and we'll be building a full blown package using this configuration rather than a subset - are there any other solution or project file changes needed?

I'm pretty sure autotools works on Windows too though :P

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not that I'm aware of. As you can see here it builds just fine.
For the feature/lite branch we might have to adjust some things, but I haven't had any chance to look at that yet.

I'm pretty sure autotools works on Windows too though :P

Oh well. You never stop learning new things. Although I prefer the msbuild approch for .NET projects.
We might even consider switching to a NuGet based approach to get the dependencies fulfilled. But that needs some more thought.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I skimmed the build log last week but haven't had a chance to pick it apart - nice to see the successful build.

I've just checked the solution configuration on master branch and it looks like we need to enable some projects for full coverage:

  • Backends\B.GStreamerSharp; (I think we only build the native one)
  • Dap\B.AppleDevice;
  • Dap\B.Karma;
  • Extensions\B.BooScript;
  • Extensions\B.SoundMenu; (I'm not on Ubuntu but it should probably build as long as it's still a thing)
  • Extensions\B.SqlDebugConsole;
  • Extensions\B.UbuntuOneMusicStore; (I thought UbuntuOne was dead? - think we can ignore this one)
  • Extensions\B.UPnPClient;
  • Extensions\B.YouTube.

@arfbtwn
Copy link
Owner

arfbtwn commented Jun 19, 2017

I notice the trusty distro tag, does that mean we can create a ppa (or whatever the current Ubuntu community project is) from our builds?

@Carbenium
Copy link
Author

Yeah, packaging is something we should think about, too.
In this case the distro tag ensures we build on Ubuntu 14.04. Without it, Travis would default to 12.04, which does not have all dependencies (and frankly is quite old).

@nicman23
Copy link

i could probably make the makefiles for a basic deb ...

@Carbenium
Copy link
Author

@arfbtwn I enabled some more projects to be built.

Do you want the autotools part in this PR? Although I don't really know how to deal with NuGet dependencies using that build system. So some help there would be really appreciated.

@Carbenium Carbenium mentioned this pull request Sep 1, 2017
4 tasks
<PackageReference Include="Google.GData.Client" Version="2.2.0.0" />
<PackageReference Include="Google.GData.Extensions" Version="2.2.0.0" />
<PackageReference Include="Google.GData.YouTube" Version="2.2.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="4.0.5.0" />
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's pulling in this dependency?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All the used Google.GData.* packages.

See https://www.nuget.org/packages/Google.GData.Client/ for example.

@arfbtwn
Copy link
Owner

arfbtwn commented Sep 1, 2017

I wouldn't worry about auto-tools for this one - I guess for NuGet packages we'd want to record the dependencies somewhere in the makefiles and have them restored during the configure phase but having the PackageReference elements seems like the way to go for MSBuild, I'm guessing the YouTube support libraries aren't available as distribution packages anymore?

@Carbenium
Copy link
Author

I at least couldn't find any distribution packages. Even for gstreamer-sharp I couldn't find anything in the *.deb-world

@nicman23
Copy link

nicman23 commented Sep 2, 2017

werent there an issue to move away from gstreamer-sharp?

@arfbtwn
Copy link
Owner

arfbtwn commented Sep 2, 2017

@nicman23: yeah #6, it's request for comments though; when we raised it we were having some fundamental trouble with the managed engine that @Carbenium was able to patch in #8.

@Carbenium: No worries on the tricky to build/OS dependent stuff, we'll try and take care of some of it in the autotools version so let's remove the commented build script for gstreamer-sharp.

Somewhat unrelated but I had a look at setting up an Ubuntu PPA, might be a solution for getting the tricky dependencies built and packaged so we can install them on the CI build host and target machines in the usual way with apt.

This is looking really good, I'm not sure about the inter-extension dependency from the ubuntu sound menu to the notification area (in order to get the notify-sharp binding stuff) though - perhaps we should pull that internal define out into a small library (ala Mtp) so we can keep those separate? - if you have time to do the refactor and MSBuild changes then I'll follow up with an autotools commit for it.

Banshee.sln Outdated
@@ -1,649 +1,659 @@

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you mind un-fixing the line endings on this file? - I think the whitespace diff showed just a couple of projects being added to both Debug and Release build configurations.

You may have sane git attributes or core.autocrlf set - I can never figure out which, line endings in git are a bit of black magic - unfortunately the repository at this point doesn't have this commit which should get us all on the same page: b0d226f (it's in feature/fixes)

If you like I'll merge that commit into master and then if you rebase on top of that it should clean up the diff?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, let's do that.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done 👍 #31

@Carbenium
Copy link
Author

[...] perhaps we should pull that internal define out into a small library (ala Mtp) so we can keep those separate? - if you have time to do the refactor and MSBuild changes then I'll follow up with an autotools commit for it.

I'll see what I can do ;)

@arfbtwn
Copy link
Owner

arfbtwn commented Sep 3, 2017

next time you rebase over this if you make 35d6cd9 a fixup for 89787b9 then I think it'll remove it from the history - looks like that's when the build script appeared :)

@@ -26,6 +26,7 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<Optimize>false</Optimize>
<OutputPath>..\..\..\bin</OutputPath>
<DefineConstants>INTERNAL_NOTIFY_SHARP</DefineConstants>
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note to myself: Remove this once the notification lib refactoring is merged.

arfbtwn
arfbtwn previously approved these changes Sep 11, 2017
Copy link
Owner

@arfbtwn arfbtwn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't want to bother you while on holiday but I reckon this one's pretty much ready too

@Carbenium
Copy link
Author

I'm going to take a final look (at least resolve the merge conflict 😉 ) this evening and get back to you on this.

Travis CI build the sln using msbuild in Release and Debug configurations

Ref #4
ci: Add libmono-upnp-cil

ci: Add nuget restore step using msbuild

B.UPnPClient: Adjust hint paths for UPnP libs
@Carbenium
Copy link
Author

@arfbtwn Alright, we have a green build again. This one is ready from my side.

@arfbtwn arfbtwn mentioned this pull request Sep 15, 2017
@arfbtwn arfbtwn dismissed their stale review September 16, 2017 18:40

older xbuild systems can't build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants