From da369bc54760a0e05a05cfebf708f82f86603eb5 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 21 May 2018 11:40:59 +0900 Subject: [PATCH] use --jobs 2 for nightly and --jobs 1 for lts lts (and/or ghc-8.2) seems more resource hungry --- automated/build.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/automated/build.sh b/automated/build.sh index fcb32b89..4c747ce6 100755 --- a/automated/build.sh +++ b/automated/build.sh @@ -119,10 +119,15 @@ fi # * Do a single unpack to create the package index cache (again due to directory perms) docker run $ARGS_PREBUILD $IMAGE /bin/bash -c "stackage-curator check --plan-file $PLAN_FILE && stackage-curator fetch --plan-file $PLAN_FILE && cd /tmp && exec stack unpack random" +case $SHORTNAME in + lts) JOBS=1 ;; + nightly) JOBS=2 ;; +esac + # Now do the actual build. We need to first set the owner of the home directory # correctly, so we run the command as root, change owner, and then use sudo to # switch back to the current user -docker run $ARGS_BUILD $IMAGE nice -n 15 /bin/bash -c "chown $USER $HOME && exec sudo -E -u $USER env \"HOME=$HOME\" \"PATH=\$PATH\" stackage-curator make-bundle --jobs 2 --plan-file $PLAN_FILE --docmap-file $DOCMAP_FILE --bundle-file $BUNDLE_FILE --target $TARGET" +docker run $ARGS_BUILD $IMAGE nice -n 15 /bin/bash -c "chown $USER $HOME && exec sudo -E -u $USER env \"HOME=$HOME\" \"PATH=\$PATH\" stackage-curator make-bundle --jobs $JOBS --plan-file $PLAN_FILE --docmap-file $DOCMAP_FILE --bundle-file $BUNDLE_FILE --target $TARGET" # Make sure we actually need this snapshot. We used to perform this check # exclusively before building. Now we perform it after as well for the case of