Skip to content
Snippets Groups Projects
Commit fbb5b4fe authored by Allan Blanchard's avatar Allan Blanchard
Browse files

[ci] build distrib in release mode

parent dda5c03e
No related branches found
No related tags found
No related merge requests found
......@@ -37,7 +37,7 @@
, dos2unix
, doxygen
, python3
, do_autoconf ? true
, release_mode ? false
}:
# We do not use buildDunePackage because Frama-C still uses a Makefile to build
......@@ -51,9 +51,9 @@ stdenvNoCC.mkDerivation rec {
slang = lib.strings.removeSuffix "\n" (builtins.readFile ../VERSION_CODENAME);
src =
if do_autoconf
then gitignoreSource ./..
else ./.. ;
if release_mode
then ./..
else gitignoreSource ./.. ;
nativeBuildInputs = [
autoconf
......@@ -93,16 +93,18 @@ stdenvNoCC.mkDerivation rec {
outputs = [ "out" "build_dir" ];
preConfigure = (if do_autoconf then "autoconf \n" else "") + ''
preConfigure = (if release_mode then "" else "autoconf \n") + ''
patchShebangs src/plugins/value/gen-api.sh
chmod +x src/plugins/value/gen-api.sh
'';
# Do not use default parallel building, but allow 2 cores for Frama-C build
enableParallelBuilding = false;
dune_opt = if release_mode then "--release" else "" ;
buildPhase = ''
make config.sed
dune build -j2 --display short @install
dune build -j2 --display short $release_mode @install
make ptests/ptests.exe
make ptests/wtests.exe
'';
......
......@@ -48,8 +48,8 @@ let
git = pkgs.git ;
};
src-distrib-tests = oself.callPackage ./src-distrib-tests.nix {
frama-c-no-configure = oself.frama-c.override {
do_autoconf = false ;
frama-c-release = oself.frama-c.override {
release_mode = true ;
} ;
};
};
......
{ mk_tests, frama-c-no-configure } :
{ mk_tests, frama-c-release } :
let mk_tests_distrib = mk_tests.override {
frama-c = frama-c-no-configure ;
frama-c = frama-c-release ;
}; in
mk_tests_distrib {
tests-name = "src-distrib-tests";
......
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