This commit is contained in:
swrup 2025-11-11 02:07:51 +01:00
parent aa2ff7b2f0
commit 2f3113f55d
11742 changed files with 1223940 additions and 0 deletions

View file

@ -0,0 +1,3 @@
(executables
(names foo)
(libraries dune-action-plugin))

View file

@ -0,0 +1,8 @@
open Dune_action_plugin.V1
let action =
read_file ~path:(Path.of_string "some_source")
|> stage ~f:(fun data -> write_file ~path:(Path.of_string "some_copy") ~data)
;;
let () = run action

View file

@ -0,0 +1,3 @@
(cram
(deps
(glob_files bin/*.exe)))

View file

@ -0,0 +1,28 @@
$ cat > dune-project << EOF
> (lang dune 2.0)
> (using action-plugin 0.1)
> EOF
$ cat > dune << EOF
> (rule
> (target some_source)
> (action (with-stdout-to %{target} (echo "Hello there!\n"))))
> \
> (rule
> (target some_copy)
> (action
> (dynamic-run ./foo.exe)))
> \
> (rule
> (alias runtest)
> (action
> (progn
> (cat some_source)
> (cat some_copy))))
> EOF
$ cp ./bin/foo.exe ./
$ dune runtest
Hello there!
Hello there!