Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit daac0a28 authored by Romain Hunault's avatar Romain Hunault 🚴🏻
Browse files

Define memory used by yJack on each server

parent dd6b0d11
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -313,6 +313,7 @@ for branch in ${BRANCH_NAME//,/ }; do
        # Start the build
        echo ">> [$(date)] Starting build for $codename, $branch branch" | tee -a "$DEBUG_LOG"
        build_successful=false
        echo "ANDROID_JACK_VM_ARGS=${ANDROID_JACK_VM_ARGS}"
        if brunch $codename &>> "$DEBUG_LOG"; then
          currentdate=$(date +%Y%m%d)
          if [ "$builddate" != "$currentdate" ]; then
+10 −1
Original line number Diff line number Diff line
@@ -57,6 +57,15 @@ if [ "$SIGN_BUILDS" = true ]; then
  done
fi

# Define memory to use for jack (depending of runner tag)
jack_memory=$(echo ${CI_RUNNER_TAGS} | grep GB | sed 's/.* \([0-9]*GB\).*/\1/')
if [ -n ${jack_memory} ]
then
  ANDROID_JACK_VM_ARGS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx"${jack_memory}
  export ANDROID_JACK_VM_ARGS
  echo "ANDROID_JACK_VM_ARGS set to ${ANDROID_JACK_VM_ARGS}"
fi

if [ "$CRONTAB_TIME" = "now" ]; then
  /root/build.sh
else