Skip to content

Commit

Permalink
Allow disabling arches
Browse files Browse the repository at this point in the history
  • Loading branch information
MisterDA committed Mar 13, 2023
1 parent fae7839 commit 2aeb340
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions service/conf.ml
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ let pool_of_arch = function
| `Ppc64le -> "linux-ppc64"
| `Riscv64 -> "linux-riscv64"

let disabled_arches = []

(* Arches supported by [distro] but unsupported by [DD.master_distro]. *)
let supplementary_arches ov master_distro distro =
if List.mem distro (List.map DD.resolve_alias DD.latest_distros) then
Expand Down Expand Up @@ -144,16 +146,17 @@ let platforms ~include_macos opam_version =
let label = DD.latest_tag_of_distro (distro :> DD.t) in
let tag = DD.tag_of_distro (distro :> DD.t) in
let ov = OV.(Releases.latest |> with_just_major_and_minor) in
let filter_disabled =
List.filter_map (fun arch ->
if List.mem arch disabled_arches then None
else Some (v ~arch label tag ov))
in
if distro = master_distro then
v label tag (OV.with_variant ov (Some "flambda"))
:: List.map
(fun arch -> v ~arch label tag ov)
(DD.distro_arches ov (distro :> DD.t))
:: filter_disabled (DD.distro_arches ov (distro :> DD.t))
else
v label tag ov
:: List.map
(fun arch -> v ~arch label tag ov)
(supplementary_arches ov master_distro distro)
:: filter_disabled (supplementary_arches ov master_distro distro)
in
let make_release ?arch ov =
let distro = DD.tag_of_distro (master_distro :> DD.t) in
Expand Down

0 comments on commit 2aeb340

Please sign in to comment.