diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..ca79ca5 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,6 @@ +version: 2 +updates: + - package-ecosystem: github-actions + directory: / + schedule: + interval: weekly diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..1db5b78 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,44 @@ +name: Build & Tests + +on: + - push + - pull_request + +permissions: read-all + +jobs: + build: + strategy: + fail-fast: true + matrix: + os: [ubuntu-latest] + runs-on: ${{ matrix.os }} + steps: + - name: Checkout tree + uses: actions/checkout@v4 + - name: Set-up OCaml + uses: ocaml/setup-ocaml@v3 + with: + ocaml-compiler: 5.1 + dune-cache: true + - run: opam list + - name: Restore opam cache + id: restore-cache + uses: actions/cache/restore@v4 + with: + path: _opam + key: ${{ runner.os }}-opam-${{ hashFiles('container-image.opam') }} + restore-keys: | + ${{ runner.os }}-opam- + - run: opam list + - run: sudo apt-get install -qq -yy libev-dev libonig-dev + - name: Build dependencies + run: opam install . --deps-only --with-test + - name: Save opam cache + if: steps.restore-cache.outputs.cache-hit != 'true' + uses: actions/cache/save@v4 + with: + path: _opam + key: ${{ steps.restore-cache.outputs.cache-primary-key }} + - run: opam exec -- dune build + - run: opam exec -- dune runtest