From c34ed5c1afdf85766b803dd27bde11abd2b784e5 Mon Sep 17 00:00:00 2001 From: Malte Brandy Date: Sat, 9 Jan 2021 05:41:12 +0100 Subject: [PATCH] Fine tuning ci --- nixos/roles/laminar/default.nix | 3 +++ nixos/roles/laminar/nix-jobs.hs | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/nixos/roles/laminar/default.nix b/nixos/roles/laminar/default.nix index dee1675e..8d4d219f 100644 --- a/nixos/roles/laminar/default.nix +++ b/nixos/roles/laminar/default.nix @@ -39,6 +39,7 @@ in { ''; }; after = pkgs.writeShellScript "after-all-jobs-script" '' + if [[ "$JOB$RESULT" != "nix-buildsuccess" ]]; then LAMINAR_URL="https://ci.maralorn.de" exec 100>${stateDir}/matrix-lock ${pkgs.utillinux}/bin/flock -w 10 100 @@ -47,6 +48,7 @@ in { $JOB #$RUN: $RESULT https://ci.m-0.eu/jobs/$JOB/$RUN $(if [[ $RESULT == "failed" ]]; then echo -e 'maralorn'; ${pkgs.curl}/bin/curl -m5 -s $LAMINAR_URL/log/$JOB/$RUN | tail; fi) EOF + fi true ''; contexts = { @@ -70,6 +72,7 @@ in { DynamicUser = false; User = "laminar"; StateDirectory = "laminar"; + LimitNOFILE="10240"; }; after = [ "network.target" ]; preStart = let diff --git a/nixos/roles/laminar/nix-jobs.hs b/nixos/roles/laminar/nix-jobs.hs index 0d2a15df..ca3cce4d 100644 --- a/nixos/roles/laminar/nix-jobs.hs +++ b/nixos/roles/laminar/nix-jobs.hs @@ -8,7 +8,7 @@ {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE FlexibleContexts #-} -{-# OPTIONS_GHC -Wall -Werror -Wno-missing-signatures -Wno-type-defaults -Wno-orphans #-} +{-# OPTIONS_GHC -threaded -Wall -Werror -Wno-missing-signatures -Wno-type-defaults -Wno-orphans #-} import Control.Concurrent ( threadDelay ) import Control.Concurrent.Async ( forConcurrently_