From f94b99221e4f87bc318c6d2db5a81fbbca3a16a1 Mon Sep 17 00:00:00 2001 From: Thomas Gazagnaire Date: Fri, 8 Nov 2024 09:38:44 +0100 Subject: [PATCH 1/2] Add GHA scripts --- .github/dependabot.yml | 6 +++++ .github/workflows/build.yml | 44 +++++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/build.yml 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 From bb56c96b5a0fb2d628794a5276820789c6116235 Mon Sep 17 00:00:00 2001 From: Thomas Gazagnaire Date: Fri, 8 Nov 2024 10:22:22 +0100 Subject: [PATCH 2/2] Add mising opam dependency --- container-image.opam | 2 ++ 1 file changed, 2 insertions(+) diff --git a/container-image.opam b/container-image.opam index d3523ef..a2d179f 100644 --- a/container-image.opam +++ b/container-image.opam @@ -32,6 +32,7 @@ depends: [ "xdg" "printbox" "printbox-text" + "osrelease" "alcotest" {with-test} ] @@ -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"