From 07afb92e69509eafc632f69635ae48772038ba20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis=20Roch=C3=A9?= Date: Wed, 4 Sep 2024 16:00:43 +0200 Subject: [PATCH] ci: initial setup --- .github/dependabot.yml | 6 +++++ .github/workflows/build-test.yml | 39 ++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/build-test.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..7418925 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,6 @@ +version: 2 +updates: + - package-ecosystem: github-actions + directory: / + schedule: + interval: monthly diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml new file mode 100644 index 0000000..8ac199d --- /dev/null +++ b/.github/workflows/build-test.yml @@ -0,0 +1,39 @@ +name: Build and Test + +on: + - push + - pull_request + +jobs: + build-and-test: + strategy: + fail-fast: false + matrix: + os: + - macos-latest + - ubuntu-latest + # - windows-latest + ocaml-version: + - 5.1 + + runs-on: ${{ matrix.os }} + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Use OCaml ${{ matrix.ocaml-version }} + uses: ocaml/setup-ocaml@v2 + with: + ocaml-compiler: ${{ matrix.ocaml-version }} + dune-cache: true + opam-depext-flags: "--with-test" + allow-prerelease-opam: true + + - run: opam install . --deps-only --with-test + + - name: build project + run: opam exec -- dune build + + - name: run test + run: opam exec -- dune runtest