43
43
runs-on : ${{ matrix.os }}
44
44
45
45
steps :
46
+ - name : set ppx-related variables
47
+ id : configppx
48
+ shell : bash
49
+ run : |
50
+ case ${{ matrix.ocaml-compiler }} in
51
+ "4.08"|"4.09"|"4.10"|"4.11"|"4.12"|"4.13"|"4.14"|"5.0") echo "ppx=false" >> "$GITHUB_OUTPUT" ;;
52
+ "5.1"|"5.2"|"5.3") echo "ppx=true" >> "$GITHUB_OUTPUT" ;;
53
+ *)
54
+ printf "unrecognised version %s\n" "${{ matrix.ocaml-compiler }}";
55
+ exit 1
56
+ ;;
57
+ esac
58
+
46
59
- name : Checkout tree
47
60
uses : actions/checkout@v5
48
61
@@ -57,17 +70,17 @@ jobs:
57
70
- run : opam install ./lwt.opam ./lwt_react.opam ./lwt_retry.opam --deps-only --with-test
58
71
59
72
- run : opam install ./lwt_ppx.opam --deps-only --with-test
60
- if : ${{ contains(fromJSON('["5.1","5.2","5.3"]'), matrix.ocaml-compiler) }}
73
+ if : ${{ steps.configppx.outputs.ppx }}
61
74
62
- - run : opam exec -- dune build -p lwt,lwt_react,lwt_retry
75
+ - run : opam exec -- dune build --only-packages lwt,lwt_react,lwt_retry
63
76
64
- - run : opam exec -- dune build -p lwt_ppx
65
- if : ${{ contains(fromJSON('["5.1","5.2","5.3"]'), matrix.ocaml-compiler) }}
77
+ - run : opam exec -- dune build --only-packages lwt_ppx
78
+ if : ${{ steps.configppx.outputs.ppx }}
66
79
67
- - run : opam exec -- dune runtest -p lwt,lwt_react,lwt_retry
80
+ - run : opam exec -- dune runtest --only-packages lwt,lwt_react,lwt_retry
68
81
69
- - run : opam exec -- dune runtest -p lwt_ppx
70
- if : ${{ contains(fromJSON('["5.1","5.2","5.3"]'), matrix.ocaml-compiler) }}
82
+ - run : opam exec -- dune runtest --only-packages lwt_ppx
83
+ if : ${{ steps.configppx.outputs.ppx }}
71
84
72
85
lint-opam :
73
86
runs-on : ubuntu-latest
0 commit comments