Skip to content

Commit

Permalink
Add GHA scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
samoht committed Nov 8, 2024
1 parent ddb240a commit 17bb6c0
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
44 changes: 44 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 17bb6c0

Please sign in to comment.