From 9f61f9f233cbf4274b6497cabfda51a6cde0c0c6 Mon Sep 17 00:00:00 2001 From: Leandro Ostera Date: Fri, 29 Dec 2023 21:44:08 +0100 Subject: [PATCH] ci: implement @smorimoto workflow --- .github/workflows/main.yml | 53 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..47a249b --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,53 @@ +name: Build & Test + +on: + pull_request: + push: + schedule: + # Prime the caches every Monday + - cron: 0 1 * * MON + +permissions: read-all + +jobs: + build: + strategy: + fail-fast: false + matrix: + os: + - macos-latest + - ubuntu-latest + ocaml-compiler: + - "5.1" + allow-prerelease-opam: + - true + opam-repositories: + - |- + default: https://github.com/ocaml/opam-repository.git + # include: + # - os: windows-latest + # ocaml-compiler: ocaml-variants.5.1.0+options,ocaml-option-mingw + # allow-prerelease-opam: false + # opam-repositories: |- + # windows-5.0: https://github.com/dra27/opam-repository.git#windows-5.0 + # sunset: https://github.com/ocaml-opam/opam-repository-mingw.git#sunset + # default: https://github.com/ocaml/opam-repository.git + + runs-on: ${{ matrix.os }} + + steps: + - name: Checkout tree + uses: actions/checkout@v4 + + - name: Set-up OCaml + uses: ocaml/setup-ocaml@v2 + with: + ocaml-compiler: ${{ matrix.ocaml-compiler }} + allow-prerelease-opam: ${{ matrix.allow-prerelease-opam }} + opam-repositories: ${{ matrix.opam-repositories }} + + - run: opam install . --deps-only --with-test + + - run: opam exec -- dune build + + - run: opam exec -- dune test