Browse Source

travis: speed up the build, build examples

Spiros Eliopoulos 3 years ago
parent
commit
fba3900636
3 changed files with 16 additions and 16 deletions
  1. 8 15
      .travis.yml
  2. 4 1
      Makefile
  3. 4 0
      examples/dune

+ 8 - 15
.travis.yml

@@ -6,19 +6,12 @@ install: wget https://raw.githubusercontent.com/ocaml/ocaml-travisci-skeleton/ma
 script: bash -ex ./.travis-docker.sh
 env:
   global:
-  - PINS="angstrom-async:. angstrom-lwt-unix:. angstrom-unix:. angstrom:."
+  - DISTRO="ubuntu"
+  - PINS="angstrom-async:. angstrom-lwt:. angstrom-lwt-unix:. angstrom:."
+  - PACKAGE="angstrom"
+  - TESTS=true
+  - POST_INSTALL_HOOK="opam install --with-test angstrom-async angstrom-lwt && opam exec -- make examples"
   matrix:
-  - PACKAGE="angstrom"          DISTRO="ubuntu-lts"      OCAML_VERSION="4.07"
-  - PACKAGE="angstrom-async"    DISTRO="ubuntu-lts"      OCAML_VERSION="4.07"
-  - PACKAGE="angstrom-lwt-unix" DISTRO="ubuntu-lts"      OCAML_VERSION="4.07"
-  - PACKAGE="angstrom-unix"     DISTRO="ubuntu-lts"      OCAML_VERSION="4.07"
-  - PACKAGE="angstrom"          DISTRO="ubuntu-lts"      OCAML_VERSION="4.04"
-  - PACKAGE="angstrom-async"    DISTRO="ubuntu-lts"      OCAML_VERSION="4.04"
-  - PACKAGE="angstrom-lwt-unix" DISTRO="ubuntu-lts"      OCAML_VERSION="4.04"
-  - PACKAGE="angstrom-unix"     DISTRO="ubuntu-lts"      OCAML_VERSION="4.04"
-  - PACKAGE="angstrom"          DISTRO="alpine"          OCAML_VERSION="4.03"
-  - PACKAGE="angstrom-lwt-unix" DISTRO="alpine"          OCAML_VERSION="4.03"
-  - PACKAGE="angstrom-unix"     DISTRO="alpine"          OCAML_VERSION="4.03"
-  - PACKAGE="angstrom"          DISTRO="debian-unstable" OCAML_VERSION="4.03"
-  - PACKAGE="angstrom-lwt-unix" DISTRO="debian-unstable" OCAML_VERSION="4.03"
-  - PACKAGE="angstrom-unix"     DISTRO="debian-unstable" OCAML_VERSION="4.03"
+  - OCAML_VERSION="4.07"
+  - OCAML_VERSION="4.06"
+  - OCAML_VERSION="4.05"

+ 4 - 1
Makefile

@@ -1,4 +1,4 @@
-.PHONY: all build clean test install uninstall doc
+.PHONY: all build clean test install uninstall doc examples
 
 build:
 	dune build
@@ -8,6 +8,9 @@ all: build
 test:
 	dune runtest
 
+examples:
+	dune build @examples
+
 install:
 	dune install
 

+ 4 - 0
examples/dune

@@ -9,3 +9,7 @@
  (wrapped false)
  (modules RFC2616)
  (libraries angstrom))
+
+(alias
+ (name examples)
+ (deps RFC7159.cmxa RFC2616.cmxa))