From efe4d30cc351c3f651554c06a20de7b464702f49 Mon Sep 17 00:00:00 2001
From: Allan Blanchard <allan.blanchard@cea.fr>
Date: Thu, 13 Jul 2023 16:22:41 +0200
Subject: [PATCH] [nix] coverage: compress output

---
 nix/mk_tests.nix | 3 ++-
 nix/ts-api.nix   | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/nix/mk_tests.nix b/nix/mk_tests.nix
index 458ef9320ac..94b36bd5ab0 100644
--- a/nix/mk_tests.nix
+++ b/nix/mk_tests.nix
@@ -90,6 +90,7 @@ stdenvNoCC.mkDerivation {
     if cover
     then ''
       bisect-ppx-report cobertura --coverage-path=coverage coverage.xml
+      tar cfJ coverage.tar.xz coverage.xml
     ''
     else "" ;
 
@@ -103,6 +104,6 @@ stdenvNoCC.mkDerivation {
   # No installation required
   installPhase = ''
     mkdir $out
-    cp -r coverage.xml $out
+    cp -r coverage.tar.xz $out
   '';
 }
diff --git a/nix/ts-api.nix b/nix/ts-api.nix
index 064a4207d09..7662fdbcb2a 100644
--- a/nix/ts-api.nix
+++ b/nix/ts-api.nix
@@ -32,11 +32,12 @@ stdenv.mkDerivation rec {
     export BISECT_FILE="$(pwd)/coverage/bisect-"
     make -C ivette check-api
     bisect-ppx-report cobertura --coverage-path=coverage coverage.xml
+    tar cfJ coverage.tar.xz coverage.xml
   '';
 
   # No installation required
   installPhase = ''
     mkdir $out
-    cp -r coverage.xml $out
+    cp -r coverage.tar.xz $out
   '';
 }
-- 
GitLab