Something went wrong. Try again.
My own corner of monopam
Something went wrong. Try again.
5.4 kB · 196 lines
at main
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197(executable (name cram_witness) (modules cram_witness) (libraries eio eio_main eio-fs.unix fmt fpath nox-json))
(rule (aliases runtest cram-execution) (deps cram-witness-test.sh cram-env.inc rerun-env-strip.sh git-env-strip.sh proxy-env-strip.sh git-fixture-env.sh console-clock.sh ../ocaml-merge-queue/test/cram/helpers.sh) (action (run sh %{dep:cram-witness-test.sh} %{dep:cram-env.inc} %{dep:rerun-env-strip.sh} %{exe:cram_witness.exe} %{env:TMPDIR=/tmp} %{dep:../ocaml-merge-queue/test/cram/helpers.sh})))
; mq-with-opam.sh finds the switch of a linked worktree, an mq check's, in; the repository's main working tree.
(rule (aliases runtest mq-with-opam) (action (run sh %{dep:check-mq-with-opam.sh} %{dep:mq-with-opam.sh})))
(rule (aliases runtest cram-lock) (deps cram-lock-test.py) (action (run python3 %{dep:cram-lock-test.py} %{exe:cram_witness.exe} %{env:TMPDIR=/tmp})))
; build-lock.py runs a command that moves or removes build directories only; while it holds dune's own lock on each. The page holds a real dune build; open on a rule that waits for the page's word.
(cram (applies_to build-lock) (deps build-lock.py))
; cache-storage.t holds the shared cache's storage mode: a restore is a copy,; in this workspace and in a dune that one of its actions starts. The fixture; carries the workspace file itself.
(cram (applies_to cache-storage) (deps ../dune-workspace))
; mq-dune.sh ends a dune that has stopped making progress, with a refusal; naming the free space, and leaves a working dune to finish.
(rule (alias runtest) (deps build-lock.py (glob_files mq-dune-*.py)) (action (run bash %{dep:check-mq-dune-stall.sh} %{dep:mq-dune.sh})))
; console-clock.t draws a task whose work takes 0.2 s of the real clock: the; cram environment's console-clock.sh must make it read 0.0s.
(executable (name console_clock) (modules console_clock) (libraries console console-eio eio eio_main))
(cram (applies_to console-clock) (deps console_clock.exe))
; areas_json writes the area table areas.json from the vocabulary under; vocabulary/: ACM CCS 2012 as SKOS (acm-ccs-2012.xml, the file the capability; atlas pins, from github.com/cli99/acm-ccs at commit; 48644c2ed653833115515c5e59bf2cb2452f1830), and the capability atlas's grafts; (grafts.csv) and crates.io map (crates.csv). areas-json.t holds what it; writes and refuses. runtest-areas fails when the root's areas.json differs; from a fresh generation; `dune build @runtest-areas --auto-promote`; regenerates it.
(executable (name areas_json) (modules areas_json) (libraries fmt nox-csv nox-json nox-xml))
(cram (applies_to areas-json) (deps areas_json.exe))
(rule (with-stdout-to areas.json.gen (run %{exe:areas_json.exe} %{dep:vocabulary/acm-ccs-2012.xml} %{dep:vocabulary/grafts.csv} %{dep:vocabulary/crates.csv})))
(rule (aliases runtest runtest-areas) (action (diff ../areas.json areas.json.gen)))
; area_tags is the area check: every package one directory below the root; carries its capability, and at most one domain, as opam tags naming nodes of; areas.json on their axis. area-tags.t holds what it refuses; the root's; runtest-areas runs it on the tree.
(executable (name area_tags) (modules area_tags) (libraries fmt nox-json nox-opam))
(cram (applies_to area-tags) (deps area_tags.exe))
; Every package one directory below the root carries its capability as an; area: tag naming a node of areas.json, or is listed in areas.pending awaiting; a ruling.; The rule sits here rather than in the root's dune file, whose packages'; dependencies are the root package's.
(rule (aliases runtest runtest-areas) (deps ../areas.json ../areas.pending (glob_files_rec ../*.opam)) (action (chdir %{workspace_root} (run %{exe:area_tags.exe} %{deps}))))
; switch_pins is the pin check: an opam switch builds from the sources the pin; list of an opam file names. switch-pins.t holds what it names; the; switch-pins alias (release-flags.inc) runs it on demand and at a release.
(executable (name switch_pins) (modules switch_pins) ; A plain link in every profile: the check needs none of the release flags. (link_flags (:include %{workspace_root}/link-flags.sexp)) (libraries eio eio_main fmt nox-opam))
(cram (applies_to switch-pins) (deps switch_pins.exe))
; release-flags.t holds what a release build depends on: the release-flags.inc; rules, loaded into a fixture workspace.
(cram (applies_to release-flags) (deps release-flags.inc))
; dune-workspace.release is the root's dune-workspace and the release context; release-context.inc declares, the workspace a release or benchmark build; names. runtest-release-context fails when the root's copy differs from a; fresh one; `dune build @runtest-release-context --auto-promote` writes it.
(rule (with-stdout-to dune-workspace.release.gen (progn (cat %{dep:../dune-workspace}) (cat %{dep:release-context.inc}))))
(rule (aliases runtest runtest-release-context) (action (diff ../dune-workspace.release dune-workspace.release.gen)))
; release-context.t holds the release context: a build in it links with; -use-lto in the worktree's _build, and leaves the default context as it was.
(cram (applies_to release-context) (deps ../dune-workspace ../dune-workspace.release release-flags.inc macos-ocamlopt-link))