Giter Site home page Giter Site logo

ocaml-ci-scripts's Introduction

CI scripts for OCaml projects

Supported CI:

  • stable: Travis CI Ubuntu, Debian and OSX workers.
  • experimental: Appveyor Windows Server 2012 R2 (x64) workers.

ocaml-ci-scripts's People

Contributors

andyli avatar avsm avatar chris00 avatar cyrilst avatar djs55 avatar dra27 avatar dsheets avatar edwintorok avatar euanh avatar fdopen avatar fgimenez avatar gaborigloi avatar gasche avatar hannesm avatar jonsterling avatar kit-ty-kate avatar lcdunstan avatar leonidas-from-xiv avatar lindig avatar liyishuai avatar mor1 avatar rjbou avatar samoht avatar seliopou avatar simonjbeaumont avatar talex5 avatar xvilka avatar yallop avatar ygrek avatar yomimono avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ocaml-ci-scripts's Issues

Docker-based Travis builds failing with OCaml 4.04

Recently most of our Travis builds started failing with the following error:

opam: "execvp" failed on ci-opam: No such file or directory

For example, this one: https://travis-ci.org/xapi-project/ocaml-netlink/jobs/313427741#L581

The cause is probably this issue: https://caml.inria.fr/mantis/view.php?id=7640

I'd be grateful for any help you can provide ๐Ÿ™‚ - It would be really helpful for us if this was fixed or there was a workaround that we could use to make our Travis builds work again.

Destination directory of documentation

The docgen script copies the contents of all *.docdir directories as follows:

cp _build/*.docdir/* $DOCDIR

This just clobbered my gh-pages directory. There are several issues here:

  1. If there is more than one .docdir directory containing files of the same name (typically index.html), the copy command can clobber itself.
  2. The user might not even want to have the API-documentation in the topmost directory of the gh-pages branch.
  3. Documentation files that don't exist anymore will not be removed.

The following may be more closer to what most users want:

rsync -a --delete ย _build/*.docdir $DOCDIR

This would keep API-documentation of distinct libraries of a repository separate and allows the user to have their own index.html to refer to the appropriate documentation.

Alternatively, we could introduce new variables to indicate the destination directory or what should happen. At least for my purposes the above would be perfectly sufficient.

How to avoid an optional dependency being built?

I've tried many variations on:

    - PACKAGE=biokepi INSTALL=false TESTS=false PINS="trakeva:https://github.com/smondet/trakeva.git ketrew:https://github.com/hammerlab/ketrew.git" DEPOPTS=postgresql EXTRA_DEPS=postgresql PRE_INSTALL_HOOK='opam install postgresql'

but the build always fails on MacOSX: https://travis-ci.org/hammerlab/biokepi/builds/82633540
(because of Sqlite needing a hack: https://github.com/smondet/trakeva#sqlite3-on-macosx)

Sqlite3 is an optional dependency and postgresql should replace it โ†’
https://github.com/hammerlab/ketrew/blob/master/opam#L30
how do I convince the ocaml-travisci-skeleton to not install it?

Ability to override OPAM_SWITCH

I'd like to leave a matrix testing 4.05.0+rc1, so I added OCAML_VERSION=4.05 OPAM_SWITCH=4.05.0+rc1 to the test matrix. However, this results in this:

+OPAM_SWITCH=4.05.0+rc1
+BASE_REMOTE=git://github.com/ocaml/opam-repository
+UPDATE_GCC_BINUTILS=0
+UBUNTU_TRUSTY=0
+INSTALL_XQUARTZ=true
+install_on_linux
+OCAML_VERSION=4.02
+OPAM_SWITCH=4.05.0+trunk

Would it be OK for install_on_linux to go with OPAM_SWITCH if it's specified?

`make configure` awkward for Mirage unikernels

The docs say:

It assumes the existence of a Makefile at the root of the repo having targets configure and build.

However, Makefile is normally generated by mirage, so adding one to the source repository will cause lots of trouble with git.

CI for multi opam packages

Is there a way to test all packages defined in a single git repository? I'm transitioning cohttp away from depopts, and I'd like to make sure travis is still working.

What is the license for this code?

We're suggesting that people copy these build scripts into their own projects. It would be good to say what the license for these files is.

Add option to inject commands

Hi,

I am using OASIS for my project but as I don't want to have it as a dependency of my project, I pregenerate the setup.ml in release tarballs. Therefore it is not listed in the OPAM file. Could there be an additional option for calling additional commands? I'd need to install oasis via OPAM and then run oasis setup.

If interested, I can prepare a PR.

travis-docker defaults to an old travis-opam version

When using travis-docker, this part determines what version of travis-opam should be used:

if [ $fork_user != $default_user -o $fork_branch != $default_branch ]; then
echo RUN opam remove travis-opam >> Dockerfile
echo RUN opam pin add -n travis-opam \
https://github.com/$fork_user/ocaml-ci-scripts.git#$fork_branch \
>> Dockerfile
echo RUN opam depext -i travis-opam >> Dockerfile
fi

In particular, this means that by default, the latest version on opam is used. At this time, it means 1.0.3, even though 1.1.0 is released and includes useful fixes such as #146.

I believe that releasing 1.1.0 on opam would be enough to fix this issue.

As a workaround, it is possible to set FORK_BRANCH=v1.1.0 in the environment.

Thanks!

New release

There's quite a lot of unreleased code on master (currently 60 commits since the last release, v1.0.2).

It would be useful to have a new release, since some recent changes (e.g. #96) are expected to fix longstanding problems with CI builds such as this.

pass variables in the build matrix to the container

When testing mirage, we'd like to pass the MODE environment variable to the container we start with .travis-docker.sh . It's easy enough to add this to the list of variables copied into env.list and passed to the container, but I wonder whether a more general solution might be widely useful.

Name change causes problems with pinning

The script .travis-docker.sh allows pinning ocaml-ci-scripts to enable using features from unreleased versions.

However, the name of the travis-opam binary has been changed in recent versions to ci-opam. Since the ocaml/opam Docker images and the .travis-docker.sh script both still use the old name, pinning recent versions rarely works.

Build on MacOSX consistantly fails while Linux passes

See: https://travis-ci.org/jnavila/plotkicadsch/jobs/185877988

The compilation consistantly passes with Linux, but fails as consistantly on Mac ;-)

The compilation fails with the following error:

- + /Users/travis/.opam/4.04.0/bin/ocamlfind ocamlopt -a -o src/plotkicadsch.cmxa
- ar: no archive members specified
- usage:  ar -d [-TLsv] archive file ...
- 	ar -m [-TLsv] archive file ...
- 	ar -m [-abiTLsv] position archive file ...
- 	ar -p [-TLsv] archive [file ...]
- 	ar -q [-cTLsv] archive file ...
- 	ar -r [-cuTLsv] archive file ...
- 	ar -r [-abciuTLsv] position archive file ...
- 	ar -t [-TLsv] archive [file ...]
- 	ar -x [-ouTLsv] archive [file ...]
- File "_none_", line 1:
- Error: Error while creating the library src/plotkicadsch.a
- Command exited with code 2.
- E: Failure("Command ''/Users/travis/.opam/4.04.0/bin/ocamlbuild' src/plotkicadsch.cma src/plotkicadsch.native src/plotgitsch.native -tag debug' terminated with error code 10")

Digging into similar issues, it seems that the ar utility on MacOSX doesn't accept creating empty archives where as GCC's ar is happy with it.

4.05 support

Hi,

OCaml 4.05+beta2 was released earlier, so I assume that a final version will be out in a couple weeks.
Can you please add support to it so that it is possible to test it on Travis?

Thanks!

DEPOPTS broken?

while I can find some export DEPOPTS=mirage-xen in here, mirage-xen itself is never installed!?!?

Debian Docker images are currently broken

This manifests as a failure to download a .deb which looks superficially like a network glitch but is in fact a permanent error.

From mirage/mirage#837 -- we use unstable stable and testing as names but these are aliases and they've recently been bumped, causing the Docker images to be out of sync.

I think we should

  • regenerate the Docker images
  • perhaps switch to using the release names (stretch etc)

Update version on brew (system is now 4.04)

Is there a reason that that the .travis-ocaml.sh script hasn't been updated to the new 4.04 system switch?

In the current state asking for 4.03. will switch to system which is now 4.04. I'm just wondering if there is a reason besides the "no one has noticed it yet."

DEPOPTS variable confusion

DEPOPTS is being used for 2 different purposes:

  • as a true/false variable to determine if a run with the optional dependencies should be done
  • the names of the optional packages

If you set DEPOPTS=true, you end up also having "true" as the name of the optional package to install.

The README should also be fixed. Right now it mentions the second usage above for DEPOPTS.

CircleCI support

It'd be useful for ocaml-ci-scripts to support CircleCI. Here's the documentation for the configuration.

OPAM env required?

Shouldn't this script evaluate the OPAM init scripts to adjust PATH? Or is it a deliberate decision not to do that? I would make a PR, but would like to know if there is some reason behind this.

Background: I have dependencies that install binaries via OPAM, but these are not in the PATH unless setting the OPAM variables properly.

OCAML_VERSION=4.04 leads to 4.04.0

whereas I'd expect it to be 4.04.2, i.e. the highest minor version. I suspect similar inconsistencies are around with other OCaml versions if you disregard the minor number.

Wrong OCaml version for 4.02.3 image

It looks like image ocaml/opam:debian-stable_ocaml-4.02.3 contains OCaml 4.01.0 instead of 4.02.3.

> docker pull ocaml/opam:debian-stable_ocaml-4.02.3
debian-stable_ocaml-4.02.3: Pulling from ocaml/opam
28c297c6ec72: Already exists 
a3ed95caeb02: Already exists 
d3a2cca92131: Pull complete 
38f8b0265afb: Pull complete 
7f5a04423ce8: Pull complete 
Digest: sha256:09cb52431d5034beb5fd407f08d839a5a9185ebb2f4417decaa934a14537586e
Status: Downloaded newer image for ocaml/opam:debian-stable_ocaml-4.02.3
> docker run -ti ocaml/opam:debian-stable_ocaml-4.02.3 bash
opam@b4fa61ef998e:~$ opam config var ocaml-version
4.01.0

Support for setting package name

Currently, the scripts use the default my-package name. We could add something like:

- PACKAGE=<name>

in the env variable to set-ip correctly. Or we can read it in the opam file ...

TravisCI Log Folding

Travis' default shell provides the command travis_fold(action, name), where action is either open or close. Its implementation is here and simply involves outputting a string to trigger the fold.

Would it be possible to add these commands/string output into the scripts to make the logs easier to follow?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.