From 42ff2e4b9d80bd70f03d1869dbf15fa3801bb7be Mon Sep 17 00:00:00 2001 From: Konstantin Olkhovskiy Date: Mon, 11 Nov 2024 12:38:24 +0400 Subject: [PATCH] Add CI --- .github/workflows/ocaml.yml | 42 +++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/ocaml.yml diff --git a/.github/workflows/ocaml.yml b/.github/workflows/ocaml.yml new file mode 100644 index 0000000..5ac52e2 --- /dev/null +++ b/.github/workflows/ocaml.yml @@ -0,0 +1,42 @@ +name: Rust tests + +on: + push: + branches: [main] + pull_request: + branches: [main] + workflow_dispatch: + +jobs: + run: + name: Build + runs-on: ${{ matrix.os }} + timeout-minutes: 30 + strategy: + fail-fast: true + matrix: + os: [macos-latest, ubuntu-latest] + ocaml-compiler: + [ + "4.14.1", + ] + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: OCaml/Opam cache + id: ocaml-rs-opam-cache + uses: actions/cache@v4 + with: + path: "~/.opam" + key: ocaml-rs-opam-${{ matrix.ocaml-compiler }}-${{ matrix.os }} + + - name: Use OCaml ${{ matrix.ocaml-compiler }} + uses: ocaml/setup-ocaml@v2 + with: + ocaml-compiler: ${{ matrix.ocaml-compiler }} + + - run: opam install . --deps-only --with-test + - run: opam exec -- dune build + - run: opam exec -- dune runtest