1- name : Builds, tests & co
1+ name : Builds, tests
22
33on :
44 pull_request :
55 push :
6+ branches :
7+ - master
68 schedule :
79 # Prime the caches every Monday
810 - cron : 0 1 * * MON
1517 os :
1618 - ubuntu-latest
1719 ocaml-compiler :
20+ - " 4.14"
21+ - " 5.0"
1822 - " 5.1"
1923 - " 5.2"
2024 - " 5.3"
@@ -32,59 +36,18 @@ jobs:
3236 - os : windows-latest
3337 ocaml-compiler : " 5.4"
3438 libev : false
39+ - os : ubuntu-latest
40+ ocaml-name : " 5.4.0+32bit"
41+ ocaml-compiler : " ocaml-variants.5.4.0+options,ocaml-option-32bit"
42+ libev : false
43+
3544
3645 runs-on : ${{ matrix.os }}
3746
47+ name :
48+ ${{ matrix.ocaml-name != '' && matrix.ocaml-name || matrix.ocaml-compiler}} / ${{ matrix.os }} / libev=${{ matrix.libev}}
49+
3850 steps :
39- - name : set version-dependent variables
40- id : configpkgs
41- shell : bash
42- run : |
43- opampkgs="./lwt.opam ./lwt_react.opam ./lwt_retry.opam ./lwt_ppx.opam"
44- dunepkgs="lwt,lwt_react,lwt_retry,lwt_ppx"
45- case ${{ matrix.ocaml-compiler }} in
46- "4.14"|"5.0")
47- :
48- ;;
49- "5.1"|"5.2"|"5.3"|"5.4")
50- opampkgs="${opampkgs} ./lwt_ppx__ppx_let_tests.opam"
51- dunepkgs="${dunepkgs},lwt_ppx__ppx_let_tests"
52- ;;
53- *)
54- printf "unrecognised version %s\n" "${{ matrix.ocaml-compiler }}";
55- exit 1
56- ;;
57- esac
58- case ${{ matrix.ocaml-compiler }} in
59- "4.14")
60- :
61- ;;
62- "5.0"|"5.1"|"5.2"|"5.3"|"5.4")
63- opampkgs="${opampkgs} ./lwt_direct.opam"
64- dunepkgs="${dunepkgs},lwt_direct"
65- ;;
66- *)
67- printf "unrecognised version %s\n" "${{ matrix.ocaml-compiler }}";
68- exit 1
69- ;;
70- esac
71- case ${{ matrix.ocaml-compiler }} in
72- "4.14"|"5.0"|"5.1"|"5.2"|"5.3")
73- :
74- ;;
75- "5.4")
76- opampkgs="${opampkgs} ./lwt_runtime_events.opam"
77- dunepkgs="${dunepkgs},lwt_runtime_events"
78- ;;
79- *)
80- printf "unrecognised version %s\n" "${{ matrix.ocaml-compiler }}";
81- exit 1
82- ;;
83- esac
84- echo "opampkgs=${opampkgs}"
85- echo "opampkgs=${opampkgs}" >> "$GITHUB_OUTPUT"
86- echo "dunepkgs=${dunepkgs}"
87- echo "dunepkgs=${dunepkgs}" >> "$GITHUB_OUTPUT"
8851
8952 - name : Checkout tree
9053 uses : actions/checkout@v5
@@ -94,22 +57,45 @@ jobs:
9457 with :
9558 ocaml-compiler : ${{ matrix.ocaml-compiler }}
9659
60+ - name : set ppx-related variables
61+ id : configpackages
62+ shell : bash
63+ run : |
64+ opam exec -- ocaml src/util/letppx.ml
65+ opam exec -- ocaml src/util/letppx.ml >> "$GITHUB_OUTPUT"
66+
9767 - run : opam install conf-libev
9868 if : ${{ matrix.libev == true }}
9969
100- - run : opam install --deps-only --with-test ${{ steps.configpkgs.outputs.opampkgs }}
70+ - run : opam install ./lwt.opam ./lwt_react.opam ./lwt_retry.opam ./lwt_ppx.opam --deps-only --with-test
10171
102- - run : opam exec -- dune build --only-packages ${{ steps.configpkgs.outputs.dunepkgs }}
72+ - run : opam install ./lwt_ppx__ppx_let_tests.opam --deps-only --with-test
73+ if : ${{ fromJSON(steps.configpackages.outputs.letppx) }}
10374
104- - run : opam exec -- dune runtest --only-packages ${{ steps.configpkgs.outputs.dunepkgs }}
75+ - run : opam install ./lwt_direct.opam --deps-only --with-test
76+ if : ${{ fromJSON(steps.configpackages.outputs.direct) }}
10577
106- lint-opam :
107- runs-on : ubuntu-latest
108- steps :
109- - name : Checkout tree
110- uses : actions/checkout@v5
111- - name : Set-up OCaml
112- uses : ocaml/setup-ocaml@v3
113- with :
114- ocaml-compiler : 5
115- - uses : ocaml/setup-ocaml/lint-opam@v3
78+ - run : opam install ./lwt_runtime_evetns.opam --deps-only --with-test
79+ if : ${{ fromJSON(steps.configpackages.outputs.runtime_events) }}
80+
81+ - run : opam exec -- dune build --only-packages lwt,lwt_react,lwt_retry
82+
83+ - run : opam exec -- dune build --only-packages lwt,lwt_ppx__ppx_let_tests
84+ if : ${{ fromJSON(steps.configpackages.outputs.letppx) }}
85+
86+ - run : opam exec -- dune build --only-packages lwt,lwt_direct
87+ if : ${{ fromJSON(steps.configpackages.outputs.direct) }}
88+
89+ - run : opam exec -- dune build --only-packages lwt,lwt_runtime_events
90+ if : ${{ fromJSON(steps.configpackages.outputs.runtime_events) }}
91+
92+ - run : opam exec -- dune runtest --only-packages lwt,lwt_react,lwt_retry,lwt_ppx
93+
94+ - run : opam exec -- dune runtest --only-packages lwt,lwt_ppx__ppx_let_tests
95+ if : ${{ fromJSON(steps.configpackages.outputs.letppx) }}
96+
97+ - run : opam exec -- dune runtest --only-packages lwt,lwt_direct
98+ if : ${{ fromJSON(steps.configpackages.outputs.direct) }}
99+
100+ - run : opam exec -- dune runtest --only-packages lwt,lwt_runtime_events
101+ if : ${{ fromJSON(steps.configpackages.outputs.runtime_events) }}
0 commit comments