test nix build
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 2s
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 2s
This commit is contained in:
23
default.nix
Normal file
23
default.nix
Normal 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
|
||||
'';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user