Skip to content

Commit

Permalink
Merge pull request #96 from avsm/multicore-base
Browse files Browse the repository at this point in the history
Multicore base images for 4.10
  • Loading branch information
avsm authored Mar 6, 2021
2 parents dbe9e9b + 6812c1f commit 94592ca
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ocaml-dockerfile
2 changes: 1 addition & 1 deletion ocaml-version
2 changes: 1 addition & 1 deletion src/conf.ml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ let switches ~arch ~distro =
)

(* We can't get the active distros directly, but assume x86_64 is a superset of everything else. *)
let distros = Dockerfile_distro.active_distros `X86_64
let distros = Dockerfile_distro.(active_distros `X86_64 |> List.filter (fun d -> os_family_of_distro d = `Linux))

let arches_for ~distro = Dockerfile_distro.distro_arches Ocaml_version.Releases.latest distro

Expand Down
9 changes: 9 additions & 0 deletions src/pipeline.ml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ let maybe_add_beta switch =
else
empty

let maybe_add_multicore switch =
let open Dockerfile in
let c = Ocaml_version.Configure_options.of_t switch |> Result.get_ok in
if List.mem `Multicore c then
run "opam repo add multicore git://github.com/ocaml-multicore/multicore-opam --set-default"
else
empty

let maybe_install_secondary_compiler ~switch =
let dune_min_native_support = Ocaml_version.Releases.v4_08 in
let open Dockerfile in
Expand All @@ -49,6 +57,7 @@ let install_compiler_df ~arch ~switch opam_image =
from opam_image @@
personality @@
maybe_add_beta switch @@
maybe_add_multicore switch @@
env ["OPAMYES", "1";
"OPAMDEPEXTYES", "1"; (* Remove this when https://github.com/ocaml/opam/pull/4563 is merged *)
"OPAMUNSAFEDEPEXTYES", "1";
Expand Down

0 comments on commit 94592ca

Please sign in to comment.