Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GHA scripts #4

Merged
merged 2 commits into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
2 changes: 2 additions & 0 deletions container-image.opam
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ depends: [
"xdg"
"printbox"
"printbox-text"
"osrelease"
"alcotest" {with-test}
]

Expand All @@ -42,6 +43,7 @@ pin-depends: [
[ "mirage-crypto-rng.0.11.2" "git+https://github.com/dinosaure/mirage-crypto.git#parallel"]
[ "tar.dev" "git+https://github.com/samoht/ocaml-tar.git#eio-0.12"]
[ "tar-eio.dev" "git+https://github.com/samoht/ocaml-tar.git#eio-0.12"]
[ "osrelease.dev" "git+https://github.com/avsm/osrelease#master"]
]

synopsis: "Tools to manage OCI and Docker images"