diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index c2064ca380..e4cffab7bb 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -236,3 +236,10 @@ jobs: - uses: actions/checkout@v3 - name: "nix-tools build" run: cd ./nix-tools && .buildkite/nix-tools-build.sh + + nixprof: + runs-on: [self-hosted, linux] + steps: + - uses: actions/checkout@v3 + - name: "Run tests with ghc8107: Profile flakes development shell ..." + run: nix shell github:yvan-sraka/nixprof -c ./test/tests.sh ghc8107 nixprof diff --git a/test/tests.sh b/test/tests.sh index 8667c40a9c..407f7a8894 100755 --- a/test/tests.sh +++ b/test/tests.sh @@ -223,4 +223,18 @@ if [ "$TESTS" == "docs" ] || [ "$TESTS" == "all" ]; then popd fi +if [ "$TESTS" == "nixprof" ]; then + printf "*** Profile flakes development shell ...\n" >& 2 + nixprof record nix build $NIX_BUILD_ARGS \ + --accept-flake-config \ + -I . -I .. \ + --option restrict-eval true \ + --option allowed-uris "https://github.com/NixOS https://github.com/input-output-hk" \ + --no-link --keep-going -f default.nix \ + --argstr compiler-nix-name $GHC \ + --arg CADerivationsEnabled $NIX_CA_DERIVATIONS + nixprof report + echo >& 2 +fi + printf "\n*** Finished successfully\n" >& 2