From 043e6316425d3173c4831dc6b6c4049e8b9e2866 Mon Sep 17 00:00:00 2001 From: Anil Madhavapeddy Date: Sat, 19 Jan 2019 11:04:26 +0000 Subject: [PATCH 1/4] Refresh the Travis scripts to test more distros and targets - Instead of hardcoding versions, the opam2 Docker images now have aliases to the latest versions of the OS, so use those. - Remove the patch version from the compiler version, so the latest is always used. - Build all the targets to ensure examples work (fixes #93) --- .travis.yml | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/.travis.yml b/.travis.yml index 06a76e4d..8341cce1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,16 +7,18 @@ script: bash -ex ./.travis-docker.sh env: global: - PINS="httpaf-async:. httpaf-lwt:. httpaf:." + - TESTS=true matrix: - - PACKAGE="httpaf" DISTRO="ubuntu-16.04" OCAML_VERSION="4.07.1" - - PACKAGE="httpaf-async" DISTRO="ubuntu-16.04" OCAML_VERSION="4.07.1" - - PACKAGE="httpaf-lwt" DISTRO="ubuntu-16.04" OCAML_VERSION="4.07.1" - - PACKAGE="httpaf" DISTRO="ubuntu-16.04" OCAML_VERSION="4.06.0" - - PACKAGE="httpaf-async" DISTRO="ubuntu-16.04" OCAML_VERSION="4.06.0" - - PACKAGE="httpaf-lwt" DISTRO="ubuntu-16.04" OCAML_VERSION="4.06.0" - - PACKAGE="httpaf" DISTRO="ubuntu-16.04" OCAML_VERSION="4.04.2" - - PACKAGE="httpaf-async" DISTRO="ubuntu-16.04" OCAML_VERSION="4.04.2" - - PACKAGE="httpaf-lwt" DISTRO="ubuntu-16.04" OCAML_VERSION="4.04.2" - - PACKAGE="httpaf" DISTRO="debian-unstable" OCAML_VERSION="4.03.0" - - PACKAGE="httpaf-async" DISTRO="debian-unstable" OCAML_VERSION="4.03.0" - - PACKAGE="httpaf-lwt" DISTRO="debian-unstable" OCAML_VERSION="4.03.0" + - PACKAGE="httpaf" DISTRO="ubuntu" OCAML_VERSION="4.07" + - PACKAGE="httpaf-async" DISTRO="alpine" OCAML_VERSION="4.07" + - PACKAGE="httpaf-lwt" DISTRO="debian-stable" OCAML_VERSION="4.07" + - PACKAGE="httpaf" DISTRO="ubuntu-lts" OCAML_VERSION="4.06" + - PACKAGE="httpaf-async" DISTRO="fedora" OCAML_VERSION="4.06" + - PACKAGE="httpaf-lwt" DISTRO="opensuse" OCAML_VERSION="4.05" + - PACKAGE="httpaf" DISTRO="centos" OCAML_VERSION="4.04" + - PACKAGE="httpaf-async" DISTRO="ubuntu" OCAML_VERSION="4.04" + - PACKAGE="httpaf-lwt" DISTRO="ubuntu" OCAML_VERSION="4.04" + - PACKAGE="httpaf" DISTRO="debian-testing" OCAML_VERSION="4.03" + - PACKAGE="httpaf-async" DISTRO="debian-testing" OCAML_VERSION="4.03" + - PACKAGE="httpaf-lwt" DISTRO="debian-testing" OCAML_VERSION="4.03" + - PACKAGE="httpaf" DISTRO="alpine" OCAML_VERSION="4.07" POST_INSTALL_HOOK="opam install . && opam exec -- dune build @all" From cd6152494c63223474bbe58954ec07df53b327c8 Mon Sep 17 00:00:00 2001 From: Anil Madhavapeddy Date: Sat, 19 Jan 2019 13:26:20 +0000 Subject: [PATCH 2/4] travis: install test packages also --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 8341cce1..10446fd3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,4 +21,4 @@ env: - PACKAGE="httpaf" DISTRO="debian-testing" OCAML_VERSION="4.03" - PACKAGE="httpaf-async" DISTRO="debian-testing" OCAML_VERSION="4.03" - PACKAGE="httpaf-lwt" DISTRO="debian-testing" OCAML_VERSION="4.03" - - PACKAGE="httpaf" DISTRO="alpine" OCAML_VERSION="4.07" POST_INSTALL_HOOK="opam install . && opam exec -- dune build @all" + - PACKAGE="httpaf" DISTRO="alpine" OCAML_VERSION="4.07" POST_INSTALL_HOOK="opam install -t . && opam exec -- dune build @all" From 0343d90f14ce377306087f55a36881c630749dff Mon Sep 17 00:00:00 2001 From: Doug Patti Date: Sun, 20 Jan 2019 18:32:27 -0500 Subject: [PATCH 3/4] run the build and tests on every CI build I'm attempting to use `make` here since it mirrors the typical development workflow and also lets you specify multiple actions easily. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 10446fd3..fde91ec1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,6 +8,7 @@ env: global: - PINS="httpaf-async:. httpaf-lwt:. httpaf:." - TESTS=true + - POST_INSTALL_HOOK="opam install -t . && opam exec -- make build tests" matrix: - PACKAGE="httpaf" DISTRO="ubuntu" OCAML_VERSION="4.07" - PACKAGE="httpaf-async" DISTRO="alpine" OCAML_VERSION="4.07" @@ -21,4 +22,3 @@ env: - PACKAGE="httpaf" DISTRO="debian-testing" OCAML_VERSION="4.03" - PACKAGE="httpaf-async" DISTRO="debian-testing" OCAML_VERSION="4.03" - PACKAGE="httpaf-lwt" DISTRO="debian-testing" OCAML_VERSION="4.03" - - PACKAGE="httpaf" DISTRO="alpine" OCAML_VERSION="4.07" POST_INSTALL_HOOK="opam install -t . && opam exec -- dune build @all" From 76fd166678df7157c338268e383c7764228d4bed Mon Sep 17 00:00:00 2001 From: Doug Patti Date: Sun, 20 Jan 2019 23:12:49 -0500 Subject: [PATCH 4/4] reduce the number of ci builds Instead of this giant matrix, we're going to focus on a single linux distro and a few versions of OCaml, and for each one we can install all 3 packages and also use our `Makefile` rules to build the examples. It's possible that I don't completely understand the tradeoffs of doing it this way, but we should at least have much more reasonable build times. --- .travis.yml | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/.travis.yml b/.travis.yml index fde91ec1..48e61901 100644 --- a/.travis.yml +++ b/.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: + - DISTRO="ubuntu" - PINS="httpaf-async:. httpaf-lwt:. httpaf:." + - PACKAGE="httpaf" - TESTS=true - - POST_INSTALL_HOOK="opam install -t . && opam exec -- make build tests" + - POST_INSTALL_HOOK="opam install --with-test httpaf-async httpaf-lwt && opam exec -- make examples" matrix: - - PACKAGE="httpaf" DISTRO="ubuntu" OCAML_VERSION="4.07" - - PACKAGE="httpaf-async" DISTRO="alpine" OCAML_VERSION="4.07" - - PACKAGE="httpaf-lwt" DISTRO="debian-stable" OCAML_VERSION="4.07" - - PACKAGE="httpaf" DISTRO="ubuntu-lts" OCAML_VERSION="4.06" - - PACKAGE="httpaf-async" DISTRO="fedora" OCAML_VERSION="4.06" - - PACKAGE="httpaf-lwt" DISTRO="opensuse" OCAML_VERSION="4.05" - - PACKAGE="httpaf" DISTRO="centos" OCAML_VERSION="4.04" - - PACKAGE="httpaf-async" DISTRO="ubuntu" OCAML_VERSION="4.04" - - PACKAGE="httpaf-lwt" DISTRO="ubuntu" OCAML_VERSION="4.04" - - PACKAGE="httpaf" DISTRO="debian-testing" OCAML_VERSION="4.03" - - PACKAGE="httpaf-async" DISTRO="debian-testing" OCAML_VERSION="4.03" - - PACKAGE="httpaf-lwt" DISTRO="debian-testing" OCAML_VERSION="4.03" + - OCAML_VERSION="4.07" + - OCAML_VERSION="4.06" + - OCAML_VERSION="4.05"