Skip to content

Commit

Permalink
Merge pull request #5876 from edwintorok/private/edvint/maintenance2
Browse files Browse the repository at this point in the history
Reduce build/test times
  • Loading branch information
edwintorok authored Jul 24, 2024
2 parents 1d0aae5 + a6406ea commit bc549cd
Show file tree
Hide file tree
Showing 155 changed files with 628 additions and 478 deletions.
2 changes: 1 addition & 1 deletion clock.opam
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license: "LGPL-2.1-only WITH OCaml-LGPL-linking-exception"
homepage: "https://xapi-project.github.io/"
bug-reports: "https://github.com/xapi-project/xen-api/issues"
depends: [
"dune" {>= "3.0"}
"dune" {>= "3.15"}
"ocaml" {>= "4.12"}
"alcotest" {with-test}
"astring"
Expand Down
2 changes: 1 addition & 1 deletion dune
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
(ocamlopt_flags (:standard -g -p -w -39))
(flags (:standard -w -39))
)
(dev (flags (:standard -g -w -39)))
(dev (flags (:standard -g -w -39 -warn-error -69)))
(release
(flags (:standard -w -39-6@5))
(env-vars (ALCOTEST_COMPACT 1))
Expand Down
7 changes: 4 additions & 3 deletions dune-project
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
(lang dune 3.0)
(lang dune 3.15)

(formatting (enabled_for ocaml))
(using menhir 2.0)

Expand Down Expand Up @@ -66,7 +67,7 @@
(synopsis "Xen-API client library for remotely-controlling a xapi host")
(authors "David Scott" "Anil Madhavapeddy" "Jerome Maloberti" "John Else" "Jon Ludlam" "Thomas Sanders" "Mike McClurg")
(depends
dune-build-info

(alcotest :with-test)
astring
(cohttp (>= "0.22.0"))
Expand Down Expand Up @@ -187,7 +188,7 @@
(description "This daemon monitors 'datasources' i.e. time-varying values such as performance counters and records the samples in RRD archives. These archives can be used to examine historical performance trends.")
(depends
(ocaml (>= "4.02.0"))
dune-build-info

(alcotest :with-test)
astring
(gzip (= :version))
Expand Down
2 changes: 1 addition & 1 deletion forkexec.opam
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ license: "LGPL-2.1-only WITH OCaml-LGPL-linking-exception"
homepage: "https://xapi-project.github.io/"
bug-reports: "https://github.com/xapi-project/xen-api/issues"
depends: [
"dune" {>= "3.0"}
"dune" {>= "3.15"}
"base-threads"
"fd-send-recv" {>= "2.0.0"}
"ppx_deriving_rpc"
Expand Down
2 changes: 1 addition & 1 deletion http-lib.opam
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ license: "LGPL-2.1-only WITH OCaml-LGPL-linking-exception"
homepage: "https://xapi-project.github.io/"
bug-reports: "https://github.com/xapi-project/xen-api/issues"
depends: [
"dune" {>= "3.0"}
"dune" {>= "3.15"}
"alcotest" {with-test}
"astring"
"base64" {>= "3.1.0"}
Expand Down
2 changes: 1 addition & 1 deletion message-switch-core.opam
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ license: "LGPL-2.1-only WITH OCaml-LGPL-linking-exception"
homepage: "https://xapi-project.github.io/"
bug-reports: "https://github.com/xapi-project/xen-api/issues"
depends: [
"dune" {>= "3.0"}
"dune" {>= "3.15"}
"astring"
"cohttp" {>= "0.21.1"}
"ppx_deriving_rpc"
Expand Down
2 changes: 1 addition & 1 deletion message-switch-unix.opam
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ license: "LGPL-2.1-only WITH OCaml-LGPL-linking-exception"
homepage: "https://xapi-project.github.io/"
bug-reports: "https://github.com/xapi-project/xen-api/issues"
depends: [
"dune" {>= "3.0"}
"dune" {>= "3.15"}
"base-threads"
"cohttp"
"message-switch-core" {= version}
Expand Down
1 change: 1 addition & 0 deletions message-switch.opam
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ depends: [
"ppx_sexp_conv"
"sexplib"
"shared-block-ring" {>= "2.3.0"}
"xapi-stdext-unix"
]
synopsis: "A simple store-and-forward message switch"
description: """
Expand Down
1 change: 1 addition & 0 deletions message-switch.opam.template
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ depends: [
"ppx_sexp_conv"
"sexplib"
"shared-block-ring" {>= "2.3.0"}
"xapi-stdext-unix"
]
synopsis: "A simple store-and-forward message switch"
description: """
Expand Down
3 changes: 2 additions & 1 deletion ocaml/alerts/certificate/dune
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
(library
(name certificate_check)
(modules certificate_check)
(modes best)
(libraries
astring
xapi-expiry-alerts
Expand All @@ -19,7 +20,7 @@
(modules certificate_check_main)
(libraries
certificate_check
dune-build-info

http_lib
xapi-client
xapi-types
Expand Down
2 changes: 0 additions & 2 deletions ocaml/alerts/dune
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
(name expiry_alert)
(public_name xapi-expiry-alerts)
(libraries
astring
xapi-client
xapi-consts
xapi-types
xapi-stdext-date
)
Expand Down
1 change: 1 addition & 0 deletions ocaml/auth/dune
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
(library
(modes best)
(foreign_stubs
(language c)
(names xa_auth xa_auth_stubs)
Expand Down
18 changes: 8 additions & 10 deletions ocaml/database/dune
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,12 @@
db_names db_exn schema string_marshall_helper string_unmarshall_helper
test_schemas)
(libraries
ppx_sexp_conv.runtime-lib
sexplib0
sexpr
xapi-log
xapi-stdext-encodings
)
(wrapped false)
(preprocess (pps ppx_sexp_conv))
(preprocess (per_module ((pps ppx_sexp_conv) Schema)))
)

(library
Expand Down Expand Up @@ -50,7 +48,10 @@
xml-light2
xmlm
)
(preprocess (pps ppx_deriving_rpc))
(preprocess
(per_module
((pps ppx_deriving_rpc)
Db_cache_types Db_filter_types Db_rpc_common_v2 Db_secret_string)))
)

(executable
Expand All @@ -60,7 +61,7 @@
(package xapi)
(modules block_device_io)
(libraries
dune-build-info

xapi_database
xapi-log
xapi-stdext-pervasives
Expand All @@ -74,7 +75,7 @@
(modes exe)
(modules database_server_main)
(libraries
dune-build-info

http_lib
httpsvr
threads.posix
Expand All @@ -90,10 +91,8 @@
(package xapi)
(modules db_cache_test unit_test_marshall)
(libraries
alcotest
dune-build-info
alcotest
http_lib
ppx_sexp_conv.runtime-lib
rpclib.xml
sexplib
sexplib0
Expand All @@ -112,7 +111,6 @@
)
(libraries
alcotest
dune-build-info
xapi_database
xml-light2
)
Expand Down
2 changes: 1 addition & 1 deletion ocaml/db_process/dune
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
(public_name xapi-db-process)
(package xapi)
(libraries
dune-build-info

unix
xapi-inventory
xapi_database
Expand Down
4 changes: 1 addition & 3 deletions ocaml/doc/dune
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
(executable
(modes exe)
(name jsapi)
(libraries
dune-build-info
gzip
(libraries
mustache
rpclib.core
rpclib.json
Expand Down
1 change: 0 additions & 1 deletion ocaml/events/dune
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
(public_name event_listen)
(package xapi)
(libraries
dune-build-info
http_lib
xapi-client
xapi-types
Expand Down
3 changes: 1 addition & 2 deletions ocaml/forkexecd/lib/dune
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,4 @@
xapi-stdext-unix
xapi-tracing
)
(preprocess
(pps ppx_deriving_rpc)))
(preprocess (per_module ((pps ppx_deriving_rpc) Fe))))
3 changes: 1 addition & 2 deletions ocaml/gencert/dune
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
(name gencertlib)
(wrapped true)
(modules lib selfcert pem)
(modes best)
(libraries
angstrom
astring
Expand Down Expand Up @@ -31,7 +32,6 @@
(modules gencert)
(libraries
astring
dune-build-info
gencertlib
x509
xapi-inventory
Expand All @@ -48,7 +48,6 @@
(libraries
alcotest
cstruct
dune-build-info
fmt
gencertlib
mirage-crypto
Expand Down
2 changes: 1 addition & 1 deletion ocaml/idl/autogen/dune
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
(deps
(source_tree .)
)
)
)
9 changes: 2 additions & 7 deletions ocaml/idl/dune
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
datamodel_diagnostics datamodel_repository datamodel_lifecycle
datamodel_vtpm datamodel_observer datamodel_vm_group)
(libraries
ppx_sexp_conv.runtime-lib
rpclib.core
sexplib0
sexpr
Expand All @@ -18,18 +17,16 @@
xapi-schema
xapi-stdext-date
xapi-stdext-std
xapi-stdext-unix
)
(wrapped false)
(preprocess (pps ppx_deriving_rpc))
(preprocess (per_module ((pps ppx_deriving_rpc) Datamodel_types)))
)

(executable
(modes exe)
(name datamodel_main)
(modules datamodel_main dot_backend dtd_backend markdown_backend)
(libraries
dune-build-info
mustache
xapi-datamodel
xapi-stdext-std
Expand All @@ -53,7 +50,6 @@
(modes exe)
(modules schematest)
(libraries
dune-build-info
rpclib.core
rpclib.json
xapi_datamodel
Expand All @@ -67,8 +63,7 @@
(public_name gen_lifecycle)
(package xapi-datamodel)
(modules gen_lifecycle)
(libraries
dune-build-info
(libraries
xapi-datamodel
xapi-consts.xapi_version
)
Expand Down
3 changes: 1 addition & 2 deletions ocaml/idl/json_backend/dune
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
(executable
(modes exe)
(name gen_json)
(libraries
dune-build-info
(libraries
fmt
xapi-datamodel
xapi-consts
Expand Down
7 changes: 2 additions & 5 deletions ocaml/idl/ocaml_backend/dune
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
(executable
(modes exe)
(modes byte)
(name gen_api_main)
(libraries
astring
dune-build-info
sexpr
uuid
uuidm
xapi-consts
xapi-datamodel
xapi-log
xapi-stdext-pervasives
xapi-stdext-std
)
)
Expand Down
1 change: 0 additions & 1 deletion ocaml/idl/ocaml_backend/gen_api.ml
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,6 @@ let gen_client_types highapi =
; gen_record_type ~with_module:true highapi
(toposort_types highapi all_types)
; gen_enum_helpers all_types
; O.Signature.strings_of (Gen_client.gen_signature highapi)
]
)

Expand Down
2 changes: 1 addition & 1 deletion ocaml/idl/ocaml_backend/gen_rbac.ml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ let writer_csv static_permissions_roles =

let hash2uuid str =
let h = Digest.string str in
Option.map Uuidx.to_string (Uuidx.of_bytes h)
Option.map Uuidm.to_string (Uuidm.of_bytes h)

let replace_char str c1 c2 =
let buf = Bytes.of_string str in
Expand Down
1 change: 0 additions & 1 deletion ocaml/libs/clock/dune
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
(public_name clock)
(modules date timer)
(libraries
astring
fmt
(re_export mtime)
mtime.clock.os
Expand Down
6 changes: 3 additions & 3 deletions ocaml/libs/http-lib/dune
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
(modules http_test radix_tree_test)
(libraries
alcotest
dune-build-info

fmt
http_lib
)
Expand Down Expand Up @@ -97,7 +97,7 @@
(name test_client)
(modules test_client)
(libraries
dune-build-info

http_lib
safe-resources
stunnel
Expand All @@ -112,7 +112,7 @@
(name test_server)
(modules test_server)
(libraries
dune-build-info

http_lib
httpsvr
safe-resources
Expand Down
1 change: 0 additions & 1 deletion ocaml/libs/log/dune
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
logs
threads.posix
xapi-backtrace
xapi-stdext-pervasives
)
(wrapped false)
)
Loading

0 comments on commit bc549cd

Please sign in to comment.