Skip to content

Lwt 6 only await and events #1265

Lwt 6 only await and events

Lwt 6 only await and events #1265

Workflow file for this run

name: Builds, tests & co
on:
pull_request:
push:
schedule:
# Prime the caches every Monday
- cron: 0 1 * * MON
jobs:
build-and-test:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
ocaml-compiler:
- "5.1"
- "5.2"
- "5.3"
- "5.4"
libev:
- true
- false
include:
- os: ubuntu-24.04-arm
ocaml-compiler: "5.4"
libev: false
- os: macos-latest
ocaml-compiler: "5.4"
libev: false
- os: windows-latest
ocaml-compiler: "5.4"
libev: false
runs-on: ${{ matrix.os }}
steps:
- name: set version-dependent variables
id: configpkgs
shell: bash
run: |
opampkgs="./lwt.opam ./lwt_react.opam ./lwt_retry.opam ./lwt_ppx.opam"
dunepkgs="lwt,lwt_react,lwt_retry,lwt_ppx"
case ${{ matrix.ocaml-compiler }} in
"4.14"|"5.0")
:
;;
"5.1"|"5.2"|"5.3"|"5.4")
opampkgs="${opampkgs} ./lwt_ppx__ppx_let_tests.opam"
dunepkgs="${dunepkgs},lwt_ppx__ppx_let_tests"
;;
*)
printf "unrecognised version %s\n" "${{ matrix.ocaml-compiler }}";
exit 1
;;
esac
case ${{ matrix.ocaml-compiler }} in
"4.14")
:
;;
"5.0"|"5.1"|"5.2"|"5.3"|"5.4")
opampkgs="${opampkgs} ./lwt_direct.opam"
dunepkgs="${dunepkgs},lwt_direct"
;;
*)
printf "unrecognised version %s\n" "${{ matrix.ocaml-compiler }}";
exit 1
;;
esac
case ${{ matrix.ocaml-compiler }} in
"4.14"|"5.0"|"5.1"|"5.2"|"5.3")
:
;;
"5.4")
opampkgs="${opampkgs} ./lwt_runtime_events.opam"
dunepkgs="${dunepkgs},lwt_runtime_events"
;;
*)
printf "unrecognised version %s\n" "${{ matrix.ocaml-compiler }}";
exit 1
;;
esac
echo "opampkgs=${opampkgs}"
echo "opampkgs=${opampkgs}" >> "$GITHUB_OUTPUT"
echo "dunepkgs=${dunepkgs}"
echo "dunepkgs=${dunepkgs}" >> "$GITHUB_OUTPUT"
- name: Checkout tree
uses: actions/checkout@v5
- name: Set-up OCaml
uses: ocaml/setup-ocaml@v3
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}
- run: opam install conf-libev
if: ${{ matrix.libev == true }}
- run: opam install --deps-only --with-test ${{ steps.configpkgs.outputs.opampkgs }}
- run: opam exec -- dune build --only-packages ${{ steps.configpkgs.outputs.dunepkgs }}
- run: opam exec -- dune runtest --only-packages ${{ steps.configpkgs.outputs.dunepkgs }}
lint-opam:
runs-on: ubuntu-latest
steps:
- name: Checkout tree
uses: actions/checkout@v5
- name: Set-up OCaml
uses: ocaml/setup-ocaml@v3
with:
ocaml-compiler: 5
- uses: ocaml/setup-ocaml/lint-opam@v3