Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Depend on conduit-mirage instead of mirage-conduit #67

Merged
merged 10 commits into from
Sep 3, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 43 additions & 23 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -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 "hpack.opam" }}-{{ checksum "h2.opam" }}-{{ checksum "h2-lwt.opam" }}-{{ checksum "h2-lwt-unix.opam" }}-{{ checksum "h2-mirage.opam" }}
Expand All @@ -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:
Expand All @@ -30,28 +34,42 @@ 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 -y ocamlformat
opam pin add -y httpaf git+https://github.com/anmonteiro/httpaf#fork
opam pin add -y httpaf-lwt git+https://github.com/anmonteiro/httpaf#fork
opam pin add -y httpaf-lwt-unix git+https://github.com/anmonteiro/httpaf#fork
opam install -y lwt_ssl
opam install -t --deps-only .
# Use `--best-effort` so that it doesn't choke trying to install
# h2-mirage's deps (OCaml >= 4.07)
opam install -t --deps-only --best-effort .
- run:
name: 'Clean'
command: rm -rf ./_build
- save_cache:
<<: *common_cache_key
paths:
- ~/.opam
- run:
name: 'Test'
command: |
eval `opam config env`
dune build @all
dune runtest --no-buffer
- when:
condition: <<parameters.all_tests>>
steps:
- run:
name: 'Test'
command: |
eval `opam config env`
dune build @all
dune runtest --no-buffer
- unless:
condition: <<parameters.all_tests>>
steps:
- run:
name: 'Test'
command: |
eval `opam config env`
dune build @lwt-unix/all @examples/lwt/all
dune runtest --no-buffer
- run:
name: 'Slow Tests'
command: |
Expand All @@ -78,6 +96,7 @@ opam-steps: &opam-steps
kill $(lsof -i tcp:8080 | awk '{print $2}' | grep -v PID)
- run:
name: 'Check code is formatted with ocamlformat'
# TODO: do this based on a param
command: |
eval `opam config env`
case $OCAML_VERSION in
Expand All @@ -93,36 +112,36 @@ opam-steps: &opam-steps
command: git diff --exit-code

jobs:
4.04.2:
OCaml-404:
docker:
- image: ocaml/opam2:debian-10-ocaml-4.04
environment:
- TERM: dumb
- OCAML_VERSION: "4.04.2"
- OPAMSOLVERTIMEOUT: "600"
<<: *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:
Expand All @@ -148,10 +167,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
Expand Down Expand Up @@ -187,27 +204,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:
Expand Down
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
Unreleased
--------------

- h2-mirage: depend on `mirage-conduit` instead of `conduit-mirage`,
effectively placing a lower bound of OCaml 4.07 on the next release of
h2-mirage ([#67](https://github.com/anmonteiro/ocaml-h2/pull/67))
- h2-lwt-unix: replace the `dune` file (previously written in OCaml) with a
`(select)` form to avoid depending on `ocamlfind`
([#68](https://github.com/anmonteiro/ocaml-h2/pull/68))
Expand Down
7 changes: 3 additions & 4 deletions esy.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,13 @@
"@opam/angstrom": "*",
"@opam/faraday": "*",
"@opam/psq": "*",
"@opam/mirage-conduit": "*",
"@opam/conduit-mirage": "*",
"@opam/faraday-lwt-unix": "*",
"@opam/lwt_ssl": "*",
"@opam/conf-libev": "*",
"@opam/httpaf": "*",
"@opam/httpaf-lwt-unix": "*",
"@opam/ssl": ">= 0.5.8",
"@opam/dns": "< 4.0.0"
"@opam/ssl": ">= 0.5.8"
},
"devDependencies": {
"@opam/alcotest": "*",
Expand All @@ -32,7 +31,7 @@
},
"resolutions": {
"@opam/conf-libev": "esy-packages/libev:package.json#0b5eb66",
"@opam/conf-openssl": "esy-packages/esy-openssl#dafe9ad",
"@opam/conf-openssl": "esy-packages/esy-openssl#306bb87",
"@opam/httpaf": "anmonteiro/httpaf:httpaf.opam#7c5d991",
"@opam/httpaf-lwt": "anmonteiro/httpaf:httpaf-lwt.opam#7c5d991",
"@opam/httpaf-lwt-unix": "anmonteiro/httpaf:httpaf-lwt-unix.opam#7c5d991"
Expand Down
Loading