diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 000000000..a465ad02a --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,31 @@ +name: Ocaml CI + +on: + - pull_request + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout tree + uses: actions/checkout@v4 + + # We don't want to init all submodules as some are private. + - name: Init ir-calcul submodule + run: + git submodule init ir-calcul + + git submodule update ir-calcul + + - name: Set-up Ocaml + uses: ocaml/setup-ocaml@v3 + with: + ocaml-compiler: 4.14.2 + opam-pin: false + + - run: opam install . --deps-only + + - run: opam exec -- dune build + + - run: opam exec -- make tests diff --git a/.ocamlformat b/.ocamlformat index 3e17117d7..4c54de3de 100644 --- a/.ocamlformat +++ b/.ocamlformat @@ -1,4 +1,4 @@ profile = default margin = 80 exp-grouping = preserve -version=0.19.0 +module-item-spacing = sparse diff --git a/dune-project b/dune-project index 5e5a380f5..810c65c99 100644 --- a/dune-project +++ b/dune-project @@ -6,8 +6,8 @@ (generate_opam_files true) -(source - (uri git+https://github.com/MLanguage/mlang.git)) +;(source +; (uri git+https://github.com/MLanguage/mlang.git)) (homepage https://github.com/MLanguage/mlang) @@ -67,4 +67,4 @@ (odoc (>= 1.5.3)) (ocamlformat - (= 0.19.0)))) \ No newline at end of file + (= 0.19.0)))) diff --git a/irj_checker.opam b/irj_checker.opam index a69161ade..017c505c2 100644 --- a/irj_checker.opam +++ b/irj_checker.opam @@ -13,7 +13,7 @@ depends: [ "ocaml" {>= "4.11.2"} "dune" {build} "odoc" {>= "1.5.3"} - "ocamlformat" {= "0.19.0"} + "ocamlformat" {<= "0.20.0"} ] build: [ ["dune" "subst"] {pinned} diff --git a/mlang.opam b/mlang.opam index 6bc3b41c4..1edd97d16 100644 --- a/mlang.opam +++ b/mlang.opam @@ -25,7 +25,7 @@ depends: [ "dune-build-info" {= "2.5.1"} "num" {>= "1.3"} "mlgmpidl" {>= "1.2.12"} - "ocamlformat" {= "0.19.0"} + "ocamlformat" {<= "0.20.0"} "parmap" {= "1.2.3"} ] build: [