test nix build
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 2s

This commit is contained in:
Arne Weiss
2024-05-26 16:33:15 +02:00
parent 0c47105040
commit f6ff3579b7
5 changed files with 64 additions and 0 deletions

23
default.nix Normal file
View File

@@ -0,0 +1,23 @@
{ stdenv, stress-ng, coreutils }:
stdenv.mkDerivation {
name = "cpu-intensive-task";
src = ./.;
buildInputs = [ stress-ng coreutils ];
buildPhase = ''
echo "Starting CPU intensive task..."
# Utilize all CPU cores for 2 minutes
stress-ng --cpu 0 --timeout 120s
echo "Task completed!"
'';
installPhase = ''
mkdir -p $out
echo "Task completed!" > $out/result.txt
'';
}