summaryrefslogtreecommitdiff
path: root/2024/ocaml/Taskfile.yml
diff options
context:
space:
mode:
authorDJ O'Leary <dijitol@proton.me>2025-11-29 20:23:02 +0100
committerDJ O'Leary <dijitol@proton.me>2025-11-29 20:23:02 +0100
commit4c3a50166bf0f78ce89459c352cc1c6536a8b96d (patch)
tree02e4b66a1435680ef1e92bf82576747b27f16447 /2024/ocaml/Taskfile.yml
parentbe2f8528b3829f8263507da301812d852297c168 (diff)
chore: make language folders snake_case
Diffstat (limited to '2024/ocaml/Taskfile.yml')
-rw-r--r--2024/ocaml/Taskfile.yml56
1 files changed, 56 insertions, 0 deletions
diff --git a/2024/ocaml/Taskfile.yml b/2024/ocaml/Taskfile.yml
new file mode 100644
index 0000000..1d8a89e
--- /dev/null
+++ b/2024/ocaml/Taskfile.yml
@@ -0,0 +1,56 @@
+# https://taskfile.dev
+
+version: "3"
+vars:
+ PROJECT_NAME: AoC_2024
+tasks:
+ default:
+ desc: Prints this message
+ cmds:
+ - cmd: task --list-all
+ build:doc:
+ desc: Builds documentation using ocamldoc
+ preconditions:
+ - which ocamldoc
+ cmds:
+ - cmd: ocamldoc -html -d docs bin/main.ml
+ silent: true
+ build:
+ desc: Builds the project
+ preconditions:
+ - which dune
+ cmds:
+ - cmd: dune build
+ test:
+ desc: Runs the tests in the 'tests' directory
+ ignore_error: true
+ env:
+ OUNIT_CI: true
+ preconditions:
+ - which dune
+ deps:
+ - task: build
+ cmds:
+ - cmd: dune test {{.CLI_ARGS}}
+ test:watch:
+ desc: Continuously runs the tests in the 'tests' directory
+ ignore_error: true
+ sources:
+ - lib/**/*.ml
+ - test/**/*.ml
+ env:
+ OUNIT_CI: true
+ preconditions:
+ - which dune
+ deps:
+ - task: build
+ cmds:
+ - cmd: dune test --watch {{.CLI_ARGS}}
+ run:
+ desc: Runs the project
+ preconditions:
+ - which dune
+ deps:
+ - task: build
+ cmds:
+ - cmd: dune exec {{.PROJECT_NAME}}