test.yml 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. name: build
  2. on:
  3. - push
  4. - pull_request
  5. jobs:
  6. builds:
  7. name: Earliest Supported Version
  8. strategy:
  9. fail-fast: false
  10. matrix:
  11. os:
  12. - ubuntu-latest
  13. ocaml-version:
  14. - 4.04.0
  15. runs-on: ${{ matrix.os }}
  16. steps:
  17. - name: Checkout code
  18. uses: actions/checkout@v2
  19. - name: Use OCaml ${{ matrix.ocaml-version }}
  20. uses: avsm/setup-ocaml@v1
  21. with:
  22. ocaml-version: ${{ matrix.ocaml-version }}
  23. - name: Deps
  24. run: |
  25. opam pin add -n angstrom .
  26. opam install --deps-only angstrom
  27. - name: Build
  28. run: opam exec -- dune build -p angstrom
  29. tests:
  30. name: Tests
  31. strategy:
  32. fail-fast: false
  33. matrix:
  34. os:
  35. - ubuntu-latest
  36. ocaml-version:
  37. - 4.08.1
  38. - 4.10.2
  39. - 4.11.2
  40. - 4.12.0
  41. runs-on: ${{ matrix.os }}
  42. steps:
  43. - name: Checkout code
  44. uses: actions/checkout@v2
  45. - name: Use OCaml ${{ matrix.ocaml-version }}
  46. uses: avsm/setup-ocaml@v1
  47. with:
  48. ocaml-version: ${{ matrix.ocaml-version }}
  49. - name: Deps
  50. run: |
  51. opam pin add -n angstrom .
  52. opam pin add -n angstrom-async .
  53. opam pin add -n angstrom-lwt-unix .
  54. opam install -t --deps-only .
  55. - name: Build
  56. run: opam exec -- dune build
  57. - name: Test
  58. run: opam exec -- dune runtest
  59. - name: Examples
  60. run: |
  61. opam install -t angstrom-async angstrom-lwt-unix
  62. opam exec -- make examples