Skip to content

Commit

Permalink
ci tentative
Browse files Browse the repository at this point in the history
  • Loading branch information
adelaett committed Feb 17, 2025
1 parent e606e6a commit eef3c7e
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 21 deletions.
31 changes: 10 additions & 21 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,30 +10,19 @@ permissions: read-all

jobs:
build:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
ocaml-compiler:
- "4.14.0"

runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest
container:
image: ghcr.io/catalalang/catala-coq-ci

steps:
- name: Check Coq installation
run: coqc --version

- name: Checkout tree
uses: actions/checkout@v4

- name: Set-up OCaml ${{ matrix.ocaml-compiler }}
uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}
opam-repositories: |
default: https://github.com/ocaml/opam-repository.git
coq-released: https://coq.inria.fr/opam/released
- run: opam install . --deps-only --with-test

- run: opam exec -- dune build
- name: Build project
run: dune build

- run: opam exec -- dune runtest
- name: Run tests
run: dune runtest
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ _opam
catala.dpd
.ipynb_checkpoints
.venv

result
6 changes: 6 additions & 0 deletions docker.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{ dockerTools, coqPackages, coq, dune_3, github-runner, name}:
dockerTools.buildLayeredImage {
name = name;
tag = "latest";
contents = [ coq coqPackages.autosubst dune_3 github-runner ];
}
27 changes: 27 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
description = "docker image";

inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
};

outputs = { self, nixpkgs }: {
packages.x86_64-linux.default = nixpkgs.legacyPackages.x86_64-linux.callPackage ./docker.nix {name = "ghcr.io/CatalaLang/catala-coq-ci";};
};
}

0 comments on commit eef3c7e

Please sign in to comment.