Skip to content
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
1 change: 1 addition & 0 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
branches:
- main

jobs:
format:
name: format
strategy:
Expand Down
36 changes: 0 additions & 36 deletions .github/workflows/gh-pages.yml

This file was deleted.

18 changes: 16 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,15 @@ jobs:

- run: opam install ./tiny_httpd.opam ./tiny_httpd_camlzip.opam --deps-only --with-test

- run: opam exec -- dune build @install -p tiny_httpd,tiny_httpd_camlzip
- name: Build (OCaml 4.x)
run: opam exec -- dune build @install -p tiny_httpd,tiny_httpd_camlzip
if: ${{ !startsWith(matrix.ocaml-compiler, '5.') }}

- name: Build (OCaml 5.x, includes eio)
run: |
opam install ./tiny_httpd.opam ./tiny_httpd_eio.opam --deps-only --with-test
opam exec -- dune build @install -p tiny_httpd,tiny_httpd_camlzip,tiny_httpd_eio
if: ${{ startsWith(matrix.ocaml-compiler, '5.') }}

- run: opam exec -- dune build @src/runtest @examples/runtest @tests/runtest -p tiny_httpd
if: ${{ matrix.os == 'ubuntu-latest' }}
Expand All @@ -50,4 +58,10 @@ jobs:

- run: opam install logs magic-mime -y

- run: opam exec -- dune build @install -p tiny_httpd,tiny_httpd_camlzip
- name: Final build (OCaml 4.x)
run: opam exec -- dune build @install -p tiny_httpd,tiny_httpd_camlzip
if: ${{ !startsWith(matrix.ocaml-compiler, '5.') }}

- name: Final build (OCaml 5.x, includes eio)
run: opam exec -- dune build @install -p tiny_httpd,tiny_httpd_camlzip,tiny_httpd_eio
if: ${{ startsWith(matrix.ocaml-compiler, '5.') }}
12 changes: 11 additions & 1 deletion dune-project
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
(logs :with-test)
(conf-libcurl :with-test)
(ptime :with-test)
(qcheck-core (and (>= 0.9) :with-test))))
(qcheck-core (and (>= 0.91) :with-test))))

(package
(name tiny_httpd_camlzip)
Expand All @@ -39,3 +39,13 @@
(iostream-camlzip (>= 0.2.1))
(logs :with-test)
(odoc :with-doc)))

(package
(name tiny_httpd_eio)
(synopsis "Use eio for tiny_httpd")
(depends
(tiny_httpd (= :version))
(eio (and (>= 1.0) (< 2.0)))
base-unix
(logs :with-test)
(odoc :with-doc)))
2 changes: 2 additions & 0 deletions echo_eio.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
exec dune exec --display=quiet --profile=release "examples/echo_eio.exe" -- $@
25 changes: 24 additions & 1 deletion examples/dune
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,27 @@
(executable
(name echo)
(flags :standard -warn-error -a+8)
(modules echo vfs)
(modules echo)
(libraries
tiny_httpd
logs
echo_vfs
tiny_httpd_camlzip
tiny_httpd.multipart-form-data))

(executable
(name echo_eio)
(flags :standard -warn-error -a+8)
(modules echo_eio)
(libraries
tiny_httpd
tiny_httpd_eio
eio
eio_main
logs
echo_vfs
trace.core
trace-tef
tiny_httpd_camlzip
tiny_httpd.multipart-form-data))

Expand Down Expand Up @@ -55,6 +72,12 @@

; produce an embedded FS

(library
(name echo_vfs)
(modules vfs)
(wrapped false)
(libraries tiny_httpd))

(rule
(targets vfs.ml)
(deps
Expand Down
Loading
Loading