Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Support for the D programming language #730

Closed
jacob-carlborg opened this Issue · 37 comments

10 participants

@jacob-carlborg

I don't know if this is the correct place to ask but, what's the policy of adding support for new languages to travis. I think it would be great if the D programming language could be supported. Also what's the process of adding support for a new language, what needs to be implemented?

@henrikhodne
Owner

Any language is supported on Travis. The only difference between the language keys in the .travis.yml file is what worker the test runs on, what packages are preinstalled and what the default run commands are. You can specify any build command and install pretty much anything you want on the workers.

It's possible to add support for more languages, though, either more sensible defaults and/or more preinstalled packages. I believe @joshk knows more about that.

@jacob-carlborg

Ok, I see. That sounds good. I was mostly thinking of having a D compiler installed by default.

@joshk
Owner
@jacob-carlborg

Sure, I'm willing to do the work. I just don't know how and what's need to be done.

Unfortunately there is no dedicated D build system that is used by most D projects. Most projects either use a shell script or make.

@dymk

+1 for native D support. I've got a basically working solution at https://github.com/dymk/travis-d-tests, but it's not optimal.

@BanzaiMan
Owner

I am willing to take a look at this, once http://dlang.org comes up. You'd think that someone has already written a Chef recipe to set up a D language environment, but the D language simply resists any attempt to search for useful information. I welcome any help.

@BanzaiMan BanzaiMan was assigned
@jacob-carlborg

I'm thinking we need the following installed by default:

When building it would run the following commands:

  1. Clone the repository, I assume Travis handles this automatically
  2. If a compiler is specified, just like with RVM, install that using $ dvm install <compiler>. Otherwise run $ dvm install -l to install the latest compiler
  3. Set the default compiler: $ dvm use <compiler> -d
  4. Install dependencies and build project $ dub
  5. Run tests: $ dub test

Those the above look good? I'm I missing something?

@BanzaiMan
Owner

@jacob-carlborg Thank you for the suggestions. Do these things have to be installed from source? No Debian packages?

@jacob-carlborg

I don't know if the LDC or GDC packages are the latest versions.

Don't know what's installed by default but having GCC, libpthread, libm and libdl is required as well (for linking). The ia32-libs package would be nice to have as well.

@BanzaiMan
Owner

@jacob-carlborg Thanks for the information.

Is there a 64-bit executable for dvm? Are we expected to build it from source? (I don't think we'll have a 32-bit VM any more.)

The LDC package on debian.org seems old. It's expecting libllvm2.7, but I believe we have 2.9.

@BanzaiMan
Owner

Building LDC from source seems problematic at the moment, as it requires LLVM 3.1 or later.

@jacob-carlborg

Is there a 64-bit executable for dvm? Are we expected to build it from source? (I don't think we'll have a 32-bit VM any more.)

Unfortunately it's currently not available as a 64bit executable. For various reasons it's not straightforward to fix this. Can't the ia32-libs package be installed to be able to run 32bit? I would like that regardless.

Alternatively we could install DMD without DVM, but DVM makes it easy to install new versions of DMD and having multiple versions installed. It's just like RVM. The biggest reason for why I would like to have DVM installed is that new versions of DMD is released so often. I assume that means the Chef cookbooks need to be updated when a new version of DMD is available.

Building LDC from source seems problematic at the moment, as it requires LLVM 3.1 or later.

LDC has pre-compiled binaries available here: https://github.com/ldc-developers/ldc/releases. Can't we use those? LDC should work with LLVM 3.1-3.3.

@BanzaiMan
Owner

@jacob-carlborg Do you mind opening a separate issue for ia32-libs?

LLVM on Ubuntu appears to be stuck on 2.9 at the moment. (I could be doing something wrong, of course.) I don't think we can use LDC because of that.

vagrant@precise64:~$ sudo apt-get install llvm
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  binfmt-support libffi-dev libllvm2.9 llvm-2.9 llvm-2.9-dev llvm-2.9-runtime llvm-runtime
Suggested packages:
  llvm-2.9-doc
The following NEW packages will be installed:
  binfmt-support libffi-dev libllvm2.9 llvm llvm-2.9 llvm-2.9-dev llvm-2.9-runtime llvm-runtime
0 upgraded, 8 newly installed, 0 to remove and 147 not upgraded.
⋮
⋮
@jacob-carlborg

@jacob-carlborg Do you mind opening a separate issue for ia32-libs?

Sure.

LLVM on Ubuntu appears to be stuck on 2.9 at the moment. (I could be doing something wrong, of course.) I don't think we can use LDC because of that.

LLVM provides pre-compiled binaries for Debian here: http://llvm.org/releases/download.html#3.3. I also find these Debian packages:

@jacob-carlborg

If we can't install LDC by default at this time that would be acceptable for me. The most important compiler is DMD.

@BanzaiMan
Owner

DVM relies on D1? http://stackoverflow.com/questions/6476932/building-tangobos-to-work-with-dmdscript-getting-ecma-scripting-to-work-with-d says it is out of date.

I think I can get DMD, GDC and Dub working in relative ease. I'm having trouble with dsss, and by extension dvm.

Here's the error when I try building dsss: https://gist.github.com/BanzaiMan/8010637

@jacob-carlborg

DVM relies on D1? http://stackoverflow.com/questions/6476932/building-tangobos-to-work-with-dmdscript-getting-ecma-scripting-to-work-with-d says it is out of date.

Yes. I noticed that the build instructions are not up to date. Build by running the shell script build_release.sh. I'll update the instructions. BTW, why do you need to build from source? It won't work with 64bit anyway, that's why I don't provide pre-compiled binaries for 64bit linux.

There are Debian packages available for DMD here: http://dlang.org/download.html.

@BanzaiMan BanzaiMan referenced this issue from a commit in travis-ci/travis-cookbooks
@BanzaiMan BanzaiMan [WIP] Add D recipe
See travis-ci/travis-ci#730 for the background

This commit simply adds bare minimum pieces for running the D compiler.

Source: http://d-apt.sourceforge.net/
01e7252
@pussinboots

Hello guys,

i started programming with D yesterday and from some scala play project
know travis and love it. So i write a little .travis,yml file for a simple vibe.d
project on github (https://github.com/pussinboots/dfirstweb).

And it worked out of the box so maybe it is helpful to you.
nice day

@MartinNowak
  • Most important thing is to get dmd (with libphobos2) and dub to run.
  • The official download site offers a debian package.
  • Other compilers (GDC, LDC) are a separate problem.
  • Dub already supports selecting compilers, why do we need DVM?
  • AFAIK libcurl already is a dependency of the debian package.
@jacob-carlborg

DVM allows you do have multiple compilers installed. It works just like RVM, have a look at the first code block here: http://about.travis-ci.org/docs/user/languages/ruby/. DMD update so often that I think it would be good to have an easy way to test for multiple compilers. Or use an older version.

@jacob-carlborg

Most important thing is to get dmd (with libphobos2) and dub to run.

They have already be added: travis-ci/travis-cookbooks@01e7252

@BanzaiMan
Owner

FYI: That cookbook is not merged or deployed yet.

@jacob-carlborg

FYI: That cookbook is not merged or deployed yet.

It looks lite it was committed to the main repository, it wasn't?

@BanzaiMan
Owner

@jacob-carlborg To a non-default branch, yes.

@jacob-carlborg

Right, now I found the branch name.

@jacob-carlborg

@BanzaiMan

DVM relies on D1

I've ported DVM to D2 now: https://github.com/jacob-carlborg/dvm/releases/tag/v0.4.2. Binaries are available for 64bit.

@BanzaiMan
Owner

@jacob-carlborg awesome! I'll take a look soon (hopefully next week).

@Geod24

@BanzaiMan @jacob-carlborg Thanks for your work ! Any update on this ?

@BanzaiMan
Owner

Thanks for the reminder. I have no updates at this time, however.

@jacob-carlborg

Anything we in the D community can do to increase the progress on this?

@BanzaiMan BanzaiMan removed their assignment
@jacob-carlborg

@BanzaiMan what's the status of this? Anything we can do to help?

@roidrage
Owner

@jacob-carlborg As there is little knowledge of D in our team, and it's not an immediate priority on our roadmap, we'd suggest the D community look into both providing and maintaining the build scripts necessary for this to be naturally supported.

See https://github.com/travis-ci/travis-build for the scripts on how language implementations are done.

@MartinNowak

we'd suggest the D community look into both providing and maintaining the build scripts necessary for this to be naturally supported.

Sounds great, we'll have a look at it.

@MartinNowak

Pull request for travis-build.
travis-ci/travis-build#340

@BanzaiMan
Owner

This has been rolled out. Thanks!

@BanzaiMan BanzaiMan closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.