Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 42 additions & 22 deletions .drom
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ version:0.9.0

# hash of toml configuration files
# used for generation of all files
cfa41e62814087cf2f340eab496a6542:.
1a7f438a9a5be7f02e5bef42dc8bf870:.
# end context for .

# begin context for .github/workflows/workflow.yml
# file .github/workflows/workflow.yml
533318fb1c01b0861406a644a7d9f39c:.github/workflows/workflow.yml
89b0f9c99502d62badaf5677ea2647e7:.github/workflows/workflow.yml
# end context for .github/workflows/workflow.yml

# begin context for .gitignore
# file .gitignore
33c88a25e8b40f3683f6c03ec26be5db:.gitignore
f7a24abcad0ba9301c03bb64464b1718:.gitignore
# end context for .gitignore

# begin context for .ocamlformat
Expand All @@ -40,17 +40,22 @@ cfa41e62814087cf2f340eab496a6542:.

# begin context for LICENSE.md
# file LICENSE.md
8fc45323c2500fb66e52deb392dda4f2:LICENSE.md
cf4da9c43c0026cec0ba46b9cfe8407e:LICENSE.md
# end context for LICENSE.md

# begin context for Makefile
# file Makefile
9018881cf0682f4f7f262417b0d4f9ff:Makefile
# end context for Makefile

# begin context for Makefile.drom
# file Makefile.drom
2b07c62bfabf8f45733eafbc696c6146:Makefile.drom
# end context for Makefile.drom

# begin context for README.md
# file README.md
616ddd2660258447be65bdb664b9241d:README.md
5d523350230459e853bc57803b729e29:README.md
# end context for README.md

# begin context for docs/README.txt
Expand Down Expand Up @@ -90,7 +95,7 @@ c8281f46ba9a11d0b61bc8ef67eaa357:docs/style.css

# begin context for drom.toml
# file drom.toml
b7b7b8f4a370e3c1b425b7a9316c3e0f:drom.toml
9949d65b87e55480a30122e9e77ae7d3:drom.toml
# end context for drom.toml

# begin context for dune
Expand All @@ -100,22 +105,22 @@ e850a13c004f963e9f5a568eac93c217:dune

# begin context for dune-project
# file dune-project
47416b4e7b7e7febc8da32932cae0d54:dune-project
b5f0d96d72a9cbd9f919146017fd56ce:dune-project
# end context for dune-project

# begin context for opam/drom.opam
# file opam/drom.opam
d3c8882f1742f865c2987dea6c7c83e2:opam/drom.opam
19e1a75cf2fe4fc2efe908b9198dced6:opam/drom.opam
# end context for opam/drom.opam

# begin context for opam/drom_lib.opam
# file opam/drom_lib.opam
8b323689fcc28f9783fa85ca4a4fac55:opam/drom_lib.opam
ba1d14620d3d4d4b8b556ffb4f88689e:opam/drom_lib.opam
# end context for opam/drom_lib.opam

# begin context for opam/drom_toml.opam
# file opam/drom_toml.opam
81116a1889e6414dee5c2e921961aa77:opam/drom_toml.opam
efefcfe94894b254753121a1db1c1a29:opam/drom_toml.opam
# end context for opam/drom_toml.opam

# begin context for scripts/after.sh
Expand All @@ -130,12 +135,12 @@ d3c8882f1742f865c2987dea6c7c83e2:opam/drom.opam

# begin context for scripts/copy-bin.sh
# file scripts/copy-bin.sh
bb3a9d286f0dc64021db4194427263ee:scripts/copy-bin.sh
7fe4ada2a2fc5a0ebf9a2f483679a0ae:scripts/copy-bin.sh
# end context for scripts/copy-bin.sh

# begin context for scripts/static-build.sh
# file scripts/static-build.sh
2a405479b3313d79d421c2e7fc282304:scripts/static-build.sh
cda3f8bad69d9c6e8cbeab1c720d739a:scripts/static-build.sh
# end context for scripts/static-build.sh

# begin context for sphinx/_static/css/fixes.css
Expand Down Expand Up @@ -165,12 +170,12 @@ a44c87f3a364dd95f55427fe40b2c5d1:sphinx/about.rst

# begin context for sphinx/license.rst
# file sphinx/license.rst
8f504f01aea592543c0a662b81169d91:sphinx/license.rst
a02d5245d1626431fbfc4bdb99a413cf:sphinx/license.rst
# end context for sphinx/license.rst

# begin context for src/drom/dune
# file src/drom/dune
efad88968955023a354f16469eb1ae15:src/drom/dune
68aec4169671c0163b98bb38205d2e4d:src/drom/dune
# end context for src/drom/dune

# begin context for src/drom/index.mld
Expand All @@ -180,7 +185,7 @@ efad88968955023a354f16469eb1ae15:src/drom/dune

# begin context for src/drom/linking_flags.sh
# file src/drom/linking_flags.sh
9a3b02ff1d99723e9ee2f3c0e97d7b30:src/drom/linking_flags.sh
9fdfca3cc53df639758ff04fe09d3243:src/drom/linking_flags.sh
# end context for src/drom/linking_flags.sh

# begin context for src/drom/main.ml
Expand All @@ -190,12 +195,12 @@ efad88968955023a354f16469eb1ae15:src/drom/dune

# begin context for src/drom/package.toml
# file src/drom/package.toml
5bdfaa2663247cad045abb018d576a5e:src/drom/package.toml
bb6803d414fd5a5479ed6381914604de:src/drom/package.toml
# end context for src/drom/package.toml

# begin context for src/drom_lib/dune
# file src/drom_lib/dune
a97be0d7328e7c15eb149c454844646a:src/drom_lib/dune
42d9d18b7b63adfd834f4de13c4fd892:src/drom_lib/dune
# end context for src/drom_lib/dune

# begin context for src/drom_lib/index.mld
Expand All @@ -205,17 +210,17 @@ a97be0d7328e7c15eb149c454844646a:src/drom_lib/dune

# begin context for src/drom_lib/package.toml
# file src/drom_lib/package.toml
18ae084348cbfdbb80ca1469113e0e9f:src/drom_lib/package.toml
c4d6597dc5b0966758c213bfffb9d594:src/drom_lib/package.toml
# end context for src/drom_lib/package.toml

# begin context for src/drom_lib/version.mlt
# file src/drom_lib/version.mlt
fc09abbaf032f775d148928fa1398cf9:src/drom_lib/version.mlt
ad0048099dd6df9d2c73875be2ba28e7:src/drom_lib/version.mlt
# end context for src/drom_lib/version.mlt

# begin context for src/toml.7.1.0/dune
# file src/toml.7.1.0/dune
229a5f90ef7f812db6f3560ccb3d131f:src/toml.7.1.0/dune
0841a2e47118b9fcd9b900f84ff66c34:src/toml.7.1.0/dune
# end context for src/toml.7.1.0/dune

# begin context for src/toml.7.1.0/index.mld
Expand All @@ -230,19 +235,24 @@ d1b05207fce876a1b44a8b268bcaf226:src/toml.7.1.0/index.mld

# begin context for src/toml.7.1.0/package.toml
# file src/toml.7.1.0/package.toml
706b170edac8a3051745f05ece52fb62:src/toml.7.1.0/package.toml
16c1103a2b8042862d209fc275b52f65:src/toml.7.1.0/package.toml
# end context for src/toml.7.1.0/package.toml

# begin context for src/toml.7.1.0/version.mlt
# file src/toml.7.1.0/version.mlt
fc09abbaf032f775d148928fa1398cf9:src/toml.7.1.0/version.mlt
ad0048099dd6df9d2c73875be2ba28e7:src/toml.7.1.0/version.mlt
# end context for src/toml.7.1.0/version.mlt

# begin context for test/expect-tests/dune
# file test/expect-tests/dune
d7e2675a767e30edf28d061c94f0ec62:test/expect-tests/dune
# end context for test/expect-tests/dune

# begin context for test/expect-tests/dune.drom
# file test/expect-tests/dune.drom
6d2c689d437f17d4e99e01df3f4515c6:test/expect-tests/dune.drom
# end context for test/expect-tests/dune.drom

# begin context for test/expect-tests/dune_
# file test/expect-tests/dune_
f15fedac6f43c154bcd0348b776ac08c:test/expect-tests/dune_
Expand All @@ -258,6 +268,11 @@ f15fedac6f43c154bcd0348b776ac08c:test/expect-tests/dune_
a0d7baa94246a5122e55a255dcefa9d0:test/inline-tests/dune
# end context for test/inline-tests/dune

# begin context for test/inline-tests/dune.drom
# file test/inline-tests/dune.drom
4cd12cd1258c38ccd44b225323601ff5:test/inline-tests/dune.drom
# end context for test/inline-tests/dune.drom

# begin context for test/inline-tests/dune_
# file test/inline-tests/dune_
75d7504f9c8002ec5ccdd2458f01da09:test/inline-tests/dune_
Expand All @@ -273,6 +288,11 @@ a0d7baa94246a5122e55a255dcefa9d0:test/inline-tests/dune
b5ea41e29d37e997b482b1bf7f5953d7:test/output-tests/dune
# end context for test/output-tests/dune

# begin context for test/output-tests/dune.drom
# file test/output-tests/dune.drom
a3371489c9d6aee62aeba112ecfddcf0:test/output-tests/dune.drom
# end context for test/output-tests/dune.drom

# begin context for test/output-tests/dune_
# file test/output-tests/dune_
28db2068920c1259cbd67a7c322730ed:test/output-tests/dune_
Expand Down
24 changes: 10 additions & 14 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,14 @@ jobs:

include:
- os: ubuntu-latest
ocaml-compiler: 4.07.0
ocaml-compiler: 4.14.0
skip_test: true


# we need permissions to deploy docs
permissions:
contents: write

runs-on: ${{ matrix.os }}

# use fields.github-workflow-env to add something here
Expand All @@ -38,20 +42,19 @@ jobs:
uses: actions/checkout@v2

- name: Retrieve opam cache
uses: actions/cache@v2
uses: actions/cache@v4
id: cache-opam
with:
path: ~/.opam
key: v2-${{ runner.os }}-drom-${{ matrix.ocaml-compiler }}-${{ hashFiles('opam/*.opam') }}
key: v4-${{ runner.os }}-drom-${{ matrix.ocaml-compiler }}-${{ hashFiles('opam/*.opam') }}
# restore-keys: |
# v2-${{ runner.os }}-opam-${{ matrix.ocaml-compiler }}-
# v4-${{ runner.os }}-opam-${{ matrix.ocaml-compiler }}-

- name: Use OCaml ${{ matrix.ocaml-compiler }}
uses: avsm/setup-ocaml@v2
uses: avsm/setup-ocaml@v3
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}
opam-pin: false
opam-depext: false

- name: Set git user
run: |
Expand All @@ -62,14 +65,7 @@ jobs:

- run: opam pin add . -y --no-action

- run: opam depext -y drom drom_lib drom_toml
# if: steps.cache-opam.outputs.cache-hit != 'true'

- run: opam install -y opam/*.opam --deps-only --with-test
# if: steps.cache-opam.outputs.cache-hit != 'true'

# - run: opam upgrade --fixup
# if: steps.cache-opam.outputs.cache-hit == 'true'
- run: opam install -y ./opam/*.opam --deps-only --with-test

# Use fields.build-scripts to add more scripts to convert here
- run: dos2unix scripts/*.sh
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
*~
_build
.merlin
.vscode
/_drom
/_opam
/_build
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2024 OCamlPro SAS
Copyright (c) 2025 OCamlPro SAS

This software is distributed under the terms of the
GNU Lesser General Public License (LGPL) version 2.1 (included below).
Expand Down
83 changes: 83 additions & 0 deletions Makefile.drom
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# Maintained by "drom project"
.PHONY: $(DROMNS)build $(DROMNS)build-deps $(DROMNS)fmt $(DROMNS)fmt-check
.PHONY: $(DROMNS)install $(DROMNS)dev-deps $(DROMNS)test
.PHONY: $(DROMNS)clean $(DROMNS)distclean

DROM_DEV_DEPS := merlin ocamlformat odoc ppx_expect ppx_inline_test $(DEV_DEPS)


SPHINX_TARGET:=_drom/docs/sphinx

ODOC_TARGET:=_drom/docs/doc/.


$(DROMNS)build:
./scripts/before.sh build
opam exec -- dune build @install
./scripts/copy-bin.sh drom drom_lib drom_toml
./scripts/after.sh build

$(DROMNS)build-deps:
if ! [ -e _opam ]; then \
opam switch create . 4.14.1 ; \
fi
opam install ./opam/*.opam --deps-only


.PHONY: $(DROMNS)doc-common $(DROMNS)odoc $(DROMNS)view
.PHONY: $(DROMNS)sphinx
$(DROMNS)doc-common: $(DROMNS)build
mkdir -p _drom/docs
rsync -auv docs/. _drom/docs/.

$(DROMNS)sphinx: $(DROMNS)doc-common
./scripts/before.sh sphinx ${SPHINX_TARGET}
sphinx-build sphinx ${SPHINX_TARGET}
./scripts/after.sh sphinx ${SPHINX_TARGET}

$(DROMNS)odoc: $(DROMNS)doc-common
mkdir -p ${ODOC_TARGET}
./scripts/before.sh odoc ${ODOC_TARGET}
opam exec -- dune build @doc
rsync -auv --delete _build/default/_doc/_html/. ${ODOC_TARGET}
./scripts/after.sh odoc ${ODOC_TARGET}

$(DROMNS)doc: $(DROMNS)doc-common $(DROMNS)odoc $(DROMNS)sphinx

$(DROMNS)view:
xdg-open file://$$(pwd)/_drom/docs/index.html

$(DROMNS)fmt:
opam exec -- dune build @fmt --auto-promote

$(DROMNS)fmt-check:
opam exec -- dune build @fmt

$(DROMNS)install:
opam pin -y --no-action -k path .
opam install -y .

$(DROMNS)opam:
opam pin -k path .

$(DROMNS)uninstall:
opam uninstall .

$(DROMNS)dev-deps:
opam install ./opam/*.opam --deps-only --with-doc --with-test

$(DROMNS)test:
./scripts/before.sh test
opam exec -- dune build @runtest
./scripts/after.sh test

$(DROMNS)clean:
rm -rf _build
rm -f *.exe *~
./scripts/after.sh clean

$(DROMNS)distclean: $(DROMNS)clean
rm -rf _opam _drom
./scripts/after.sh distclean


Loading
Loading