Skip to content
Snippets Groups Projects
Commit 428b5996 authored by Julien Girard-Satabin's avatar Julien Girard-Satabin
Browse files

[build][ci] Relaxed constraint on Base, and added new CI targets for ocaml 5.

parent 85496e45
No related branches found
No related tags found
No related merge requests found
...@@ -17,6 +17,16 @@ build: ...@@ -17,6 +17,16 @@ build:
script: script:
- nix --extra-experimental-features "nix-command flakes" develop --command make - nix --extra-experimental-features "nix-command flakes" develop --command make
build_ocaml4:
stage: build
script:
- nix --extra-experimental-features "nix-command flakes" build .#caisar4
build_ocaml5:
stage: build
script:
- nix --extra-experimental-features "nix-command flakes" build .#caisar5
# Optional and manual full rebuild using a clean docker image # Optional and manual full rebuild using a clean docker image
full_rebuild_and_test: full_rebuild_and_test:
stage: build stage: build
......
...@@ -15,7 +15,7 @@ depends: [ ...@@ -15,7 +15,7 @@ depends: [
"dune-site" {>= "2.9.0"} "dune-site" {>= "2.9.0"}
"zarith" {>= "1.7"} "zarith" {>= "1.7"}
"ocplib-endian" {>= "1.0"} "ocplib-endian" {>= "1.0"}
"base" {>= "v0.16.0"} "base" {>= "v0.15.0"}
"stdio" {>= "v0.14.0"} "stdio" {>= "v0.14.0"}
"cmdliner" {>= "1.1.1"} "cmdliner" {>= "1.1.1"}
"fmt" {>= "0.8.9"} "fmt" {>= "0.8.9"}
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
(dune-site (>= 2.9.0)) (dune-site (>= 2.9.0))
(zarith (>= 1.7)) (zarith (>= 1.7))
(ocplib-endian (>= 1.0)) (ocplib-endian (>= 1.0))
(base (>= v0.16.0) ) (base (>= v0.15.0) )
(stdio (>= v0.14.0)) (stdio (>= v0.14.0))
(cmdliner (>= 1.1.1)) (cmdliner (>= 1.1.1))
(fmt (>= 0.8.9)) (fmt (>= 0.8.9))
......
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
flake-utils.lib.eachDefaultSystem (system: flake-utils.lib.eachDefaultSystem (system:
let let
pkgs = nixpkgs.legacyPackages.${system}; pkgs = nixpkgs.legacyPackages.${system};
ocamlPkgs = pkgs.ocaml-ng.ocamlPackages_5_1;
lib = pkgs.lib; lib = pkgs.lib;
sources = { sources = {
ocaml = nix-filter.lib { ocaml = nix-filter.lib {
...@@ -35,53 +34,58 @@ ...@@ -35,53 +34,58 @@
]; ];
}; };
}; };
buildCaisarWith = p: p.buildDunePackage {
pname = "caisar";
version = "2.0.0";
duneVersion = "3";
minimalOCamlVersion = "4.13";
installTargets = "all doc";
src = sources.ocaml;
nativeBuildInputs = [
p.ocaml-protoc-plugin
pkgs.protobuf
# For documentation
pkgs.sphinxHook
pkgs.which
];
sphinxBuilders = [
"html"
"latex"
# TODO: generate pdf automatically
];
buildInputs = with p;
[
csv
ocplib-endian
zarith
ocamlgraph
ppx_deriving
ppx_deriving_yojson
ppx_inline_test
ocaml-protoc-plugin
re
fpath
dune-site
fmt
logs
cmdliner
yaml
(pkgs.why3.override
(oldAttrs: {
ocamlPackages = p;
}))
];
};
in in
rec { rec {
packages = rec { packages =
default = self.packages.${system}.caisar; rec {
# CAISAR package; includes binary and documentation default = self.packages.${system}.caisar;
caisar = ocamlPkgs.buildDunePackage # CAISAR package; includes binary and documentation
{ caisar = buildCaisarWith pkgs.ocaml-ng.ocamlPackages;
pname = "caisar"; caisar4 = buildCaisarWith pkgs.ocaml-ng.ocamlPackages_4_14;
version = "2.0.0"; caisar5 = buildCaisarWith pkgs.ocaml-ng.ocamlPackages_5_1;
duneVersion = "3"; };
minimalOCamlVersion = "4.13";
installTargets = "all doc";
src = sources.ocaml;
nativeBuildInputs = [
ocamlPkgs.ocaml-protoc-plugin
pkgs.protobuf
# For documentation
pkgs.sphinxHook
pkgs.which
];
sphinxBuilders = [
"html"
"latex"
# TODO: generate pdf automatically
];
buildInputs = with ocamlPkgs;
[
csv
ocplib-endian
zarith
ocamlgraph
ppx_deriving
ppx_deriving_yojson
ppx_inline_test
ocaml-protoc-plugin
re
fpath
dune-site
fmt
logs
cmdliner
yaml
pkgs.why3
];
};
};
checks = { checks = {
default = default =
self.packages.${system}.default.overrideAttrs self.packages.${system}.default.overrideAttrs
...@@ -92,7 +96,7 @@ ...@@ -92,7 +96,7 @@
doCheck = true; doCheck = true;
checkPhase = "make test-ci"; checkPhase = "make test-ci";
buildInputs = oldAttrs.buildInputs ++ buildInputs = oldAttrs.buildInputs ++
[ pkgs.python3Packages.onnx]; [ pkgs.python3Packages.onnx ];
}); });
}; };
apps = rec { apps = rec {
...@@ -106,7 +110,8 @@ ...@@ -106,7 +110,8 @@
default = pkgs.mkShell { default = pkgs.mkShell {
name = "CAISAR development shell environment."; name = "CAISAR development shell environment.";
inputsFrom = [ self.packages.${system}.caisar ]; inputsFrom = [ self.packages.${system}.caisar ];
packages = with ocamlPkgs; [ ocamlformat_0_25_1 ocaml-lsp ]; packages = with pkgs.ocaml-ng.ocamlPackages;
[ ocamlformat_0_25_1 ocaml-lsp ];
shellHook = '' shellHook = ''
echo "Welcome in the development shell for CAISAR." echo "Welcome in the development shell for CAISAR."
''; '';
...@@ -114,4 +119,3 @@ ...@@ -114,4 +119,3 @@
}; };
}); });
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment