[GitHub Actions] Tune thread count for Maven and surefire plugin forks. Increase runners with 10% more than requested.

This commit is contained in:
Corneil du Plessis
2022-11-17 21:53:41 +02:00
parent f06b8e8162
commit ad5445e25e
7 changed files with 27 additions and 51 deletions

View File

@@ -16,5 +16,6 @@ runs:
shell: bash
run: |
source ./scripts/kubeconfig-runners.sh
./scripts/increase-runners.sh ${{ inputs.inc }} ${{ inputs.max }}
echo "::notice ::Increased runners with ${{ inputs.inc }}"
INC=$((11 * ${{ inputs.inc }} / 10))
./scripts/increase-runners.sh $INC ${{ inputs.max }}
echo "::notice ::Increased runners with $INC"

View File

@@ -82,8 +82,9 @@ runs:
echo "::notice ::Scaling stream-apps-gh-runners to ${{ inputs.max_parallel }} pods"
source ./scripts/kubeconfig-runners.sh
IDLE=$(./scripts/count-runners-idle.sh runners-stream-ci)
if ((IDLE < ${{ inputs.max_parallel }})); then
REQUEST=$((${{ inputs.max_parallel }} - IDLE))
INC=$((11 * ${{ inputs.max_parallel }} / 10))
if ((IDLE < INC)); then
REQUEST=$((INC - IDLE))
echo "::info Requesting $REQUEST runners with $IDLE idle"
./scripts/scale-cluster-pods.sh stream-apps-gh-runners $REQUEST --add 1
else

View File

@@ -53,7 +53,7 @@ jobs:
VERBOSE: ${{ github.debug && 'true' || '' }}
run: |
BUILD_DIR=$(realpath $MAIN_PATH)
MAVEN_OPT="-U -B -T 1C -s $ROOT_DIR/.settings.xml ${{ inputs.verbose && '--debug' || '' }}"
MAVEN_OPT="-U -B -T 0.3C -s $ROOT_DIR/.settings.xml ${{ inputs.verbose && '--debug' || '' }}"
echo "::notice ::building - stream-applications-build"
set +e
$BUILD_DIR/build-folder.sh stream-applications-build install -DskipTests

View File

@@ -203,7 +203,7 @@ jobs:
CI_DEPLOY_PASSWORD: ${{ secrets.CI_DEPLOY_PASSWORD }}
run: |
ROOT_DIR=$(realpath $PWD)
MAVEN_OPT="-U -B -T 1C -s $ROOT_DIR/.settings.xml ${{ inputs.verbose && '--debug' || '' }}"
MAVEN_OPT="-U -B -T 0.3C -s $ROOT_DIR/.settings.xml ${{ inputs.verbose && '--debug' || '' }}"
pushd stream-applications > /dev/null
echo "::notice ::building - stream-applications-build,functions,applications/stream-applications-core"
set -e