From 03196a5218afaa3a4d5fcb61c7a9ac1be6bc3fd3 Mon Sep 17 00:00:00 2001 From: Antonio Nuno Monteiro Date: Tue, 3 Sep 2019 13:42:52 -0700 Subject: [PATCH] tweak circle config --- .circleci/config.yml | 61 ++++++++++++++++++++++++++++---------------- 1 file changed, 39 insertions(+), 22 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 80dee25..a8af641 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,4 +1,4 @@ -version: 2 +version: 2.1 common_cache_key: &common_cache_key key: dependency-cache-{{ checksum "../ocaml-version" }}-{{ checksum ".circleci/config.yml" }}-{{ checksum "httpaf.opam" }}-{{ checksum "httpaf-async.opam" }}-{{ checksum "httpaf-lwt.opam" }}-{{ checksum "httpaf-lwt-unix.opam" }}-{{ checksum "httpaf-mirage.opam" }} @@ -10,6 +10,10 @@ esy_post_build_cache_key: &esy_post_build_cache_key key: esy-post-build-cache-{{ checksum "esy.json" }}-{{ checksum "../esy-checksum" }}-{{ checksum ".circleci/config.yml" }} opam-steps: &opam-steps + parameters: + all_tests: + type: boolean + default: true steps: - checkout - run: @@ -30,7 +34,7 @@ opam-steps: &opam-steps - run: name: "Install deps" command: | - sudo apt-get install -y pkg-config libgmp-dev autotools-dev autoconf lsof libssl-dev + sudo apt-get install -y pkg-config libgmp-dev lsof libssl-dev opam update opam install -y dune opam install -t --deps-only . @@ -41,18 +45,30 @@ opam-steps: &opam-steps <<: *common_cache_key paths: - ~/.opam - - run: - name: 'Test' - command: | - eval `opam config env` - dune build @all - dune runtest --no-buffer + - when: + condition: <> + steps: + - run: + name: 'Test' + command: | + eval `opam config env` + dune build @all + dune runtest --no-buffer + - unless: + condition: <> + steps: + - run: + name: 'Test' + command: | + eval `opam config env` + dune build @async/all @lwt-unix/all @examples/lwt/all @examples/async/all + dune runtest --no-buffer - run: name: 'Check git is clean' command: git diff --exit-code jobs: - 4.04.2: + OCaml-404: docker: - image: ocaml/opam2:debian-10-ocaml-4.04 environment: @@ -60,28 +76,28 @@ jobs: - OCAML_VERSION: "4.04.2" - OPAMSOLVERTIMEOUT: "1200" <<: *opam-steps - 4.05.0: + OCaml-405: docker: - image: ocaml/opam2:debian-10-ocaml-4.05 environment: - TERM: dumb - OCAML_VERSION: "4.05.0" <<: *opam-steps - 4.06.1: + OCaml-406: docker: - image: ocaml/opam2:debian-10-ocaml-4.06 environment: - TERM: dumb - OCAML_VERSION: "4.06.1" <<: *opam-steps - 4.07.1: + OCaml-407: docker: - image: ocaml/opam2:debian-10-ocaml-4.07 environment: - TERM: dumb - OCAML_VERSION: "4.07.1" <<: *opam-steps - 4.08.1: + OCaml-408: docker: - image: ocaml/opam2:debian-10-ocaml-4.08 environment: @@ -107,10 +123,8 @@ jobs: - restore_cache: <<: *esy_post_build_cache_key - run: - name: "Install esy + system deps" - command: | - sudo apt-get install texinfo autotools-dev autoconf - npm install -g esy + name: "Install esy" + command: npm install -g esy - run: name: 'esy install' command: ~/.npm-global/bin/esy install @@ -138,27 +152,30 @@ workflows: version: 2 build-deploy: jobs: - - 4.04.2: + - OCaml-404: + all_tests: false filters: branches: ignore: - gh-pages - - 4.05.0: + - OCaml-405: + all_tests: false filters: branches: ignore: - gh-pages - - 4.06.1: + - OCaml-406: + all_tests: false filters: branches: ignore: - gh-pages - - 4.07.1: + - OCaml-407: filters: branches: ignore: - gh-pages - - 4.08.1: + - OCaml-408: filters: branches: ignore: