File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 3
3
(* We generate an appropriate dune stanza to avoid Dynarray tests build failures
4
4
on 5.0 and 5.1 with the opam-less CI GitHub action setup *)
5
5
6
- let at_least_52 = Sys.(ocaml_release.major,ocaml_release.minor) >= (5,2)
6
+ (* Use ocaml_version instead of ocaml_release (from 4.14) to support 4.12 opam install *)
7
+ let ocaml_version_pair =
8
+ let (major,minor) = match String.split_on_char '.' Sys.ocaml_version with
9
+ | major::minor::_ -> (major,minor)
10
+ | _ -> failwith "Unable to extract OCaml version" in
11
+ try (int_of_string major, int_of_string minor)
12
+ with Failure _ -> failwith "Failed to parse OCaml version"
7
13
8
14
let dune =
9
- if at_least_52
15
+ if ocaml_version_pair >= (5,2)
10
16
then Printf.sprintf {|
11
17
(test
12
18
(name lin_tests)
You can’t perform that action at this time.
0 commit comments