Skip to content

some options moved from gradle.properties to GRADLE_OPTS #1470 #1472

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 19 commits into from
Jan 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
6979c65
some options moved from gradle.properties to GRADLE_OPTS #1470
bissquit Dec 7, 2022
bdc7538
comments added
bissquit Dec 8, 2022
fc77fdf
Merge branch 'main' of https://github.com/UnitTestBot/UTBotJava into …
bissquit Dec 8, 2022
64b6d89
Merge branch 'main' of https://github.com/UnitTestBot/UTBotJava into …
bissquit Dec 26, 2022
e5cfa9e
redundant gradle_opts removed
bissquit Dec 26, 2022
28d1fde
description of each user parameters in gradle.properties
bissquit Dec 26, 2022
d5c6a7c
GRADLE_OPTS completely removed from workflows
bissquit Dec 26, 2022
279cbba
test wit -Xmx6g
bissquit Dec 26, 2022
812fbd4
test with -Dkotlin.daemon.jvm.options=-Xmx512m
bissquit Dec 27, 2022
a3a0f4c
revert back kotlin.daemon.jvm.options
bissquit Dec 27, 2022
87c9ae5
Merge branch 'main' of https://github.com/UnitTestBot/UTBotJava into …
bissquit Dec 27, 2022
57f1514
remove backup comments
bissquit Dec 28, 2022
3c72f58
Merge branch 'main' of https://github.com/UnitTestBot/UTBotJava into …
bissquit Jan 10, 2023
cda5c89
Merge branch 'main' of https://github.com/UnitTestBot/UTBotJava into …
bissquit Jan 13, 2023
1e425dc
typo fixed
bissquit Jan 13, 2023
9dfd6a7
Merge branch 'main' of https://github.com/UnitTestBot/UTBotJava into …
bissquit Jan 17, 2023
92a3212
Merge branch 'main' of https://github.com/UnitTestBot/UTBotJava into …
bissquit Jan 23, 2023
12d9179
Merge branch 'main' of https://github.com/UnitTestBot/UTBotJava into …
bissquit Jan 24, 2023
c70eeb5
Merge branch 'main' of https://github.com/UnitTestBot/UTBotJava into …
bissquit Jan 26, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 21 additions & 5 deletions .github/workflows/build-and-run-tests-from-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,23 @@ env:
IMAGE_NAME: utbot_java_cli
DOCKERFILE_PATH: docker/Dockerfile_java_cli
# Environment variable setting gradle options.
GRADLE_OPTS: "-XX:MaxHeapSize=2048m -Dorg.gradle.jvmargs='-XX:MaxHeapSize=2048m -XX:MaxPermSize=512m -Dorg.gradle.daemon=false' -Dorg.gradle.daemon=false"
#
# When configuring Gradle behavior you can use these methods,
# listed in order of highest to lowest precedence (first one wins):
# - Command-line flags such as --build-cache.
# These have precedence over properties and environment variables.
# - System properties such as systemProp.http.proxyHost=somehost.org
# stored in a gradle.properties file in a root project directory.
# - Gradle properties such as org.gradle.caching=true that are
# typically stored in a gradle.properties file in a project
# directory or in the GRADLE_USER_HOME.
# - Environment variables such as GRADLE_OPTS sourced by the
# environment that executes Gradle.
#
# read more at: https://docs.gradle.org/current/userguide/build_environment.html
#
# example of GRADLE_OPTS:
# GRADLE_OPTS: "-XX:MaxHeapSize=2048m -Dorg.gradle.daemon=false -Dorg.gradle.parallel=false -Dkotlin.compiler.execution.strategy=in-process"
PUSHGATEWAY_HOSTNAME: monitoring.utbot.org
ELK_HOSTNAME: logs.utbot.org
FILEBEAT_DIR: /tmp/filebeat
Expand Down Expand Up @@ -115,7 +131,7 @@ jobs:
restore-keys: ${{ runner.os }}-gradle-framework
- name: Run tests
run: |
gradle --build-cache --no-daemon :utbot-framework-test:test ${{ matrix.project.TESTS_TO_RUN }}
gradle --no-daemon --build-cache --no-parallel -Dorg.gradle.jvmargs=-Xmx6g -Dkotlin.daemon.jvm.options=-Xmx4g :utbot-framework-test:test ${{ matrix.project.TESTS_TO_RUN }}

- name: Upload logs
if: ${{ always() }}
Expand Down Expand Up @@ -191,13 +207,13 @@ jobs:
id: first-project
run: |
cd ${{ matrix.projects.first }}
gradle build --build-cache --no-daemon
gradle build --no-daemon --build-cache --no-parallel -Dorg.gradle.jvmargs=-Xmx6g -Dkotlin.daemon.jvm.options=-Xmx4g

- name: Build project ${{ matrix.projects.second }}
if: ${{ steps.first-project.outcome != 'cancelled' && steps.first-project.outcome != 'skipped' }}
run: |
cd ${{ matrix.projects.second }}
gradle build --build-cache --no-daemon
gradle build --no-daemon --build-cache --no-parallel -Dorg.gradle.jvmargs=-Xmx6g -Dkotlin.daemon.jvm.options=-Xmx4g

- name: Upload test report if tests have failed
if: ${{ failure() }}
Expand Down Expand Up @@ -266,7 +282,7 @@ jobs:
- name: Run tests
run: |
cd ${{ matrix.project }}
gradle build --build-cache --no-daemon
gradle build --no-daemon --build-cache --no-parallel -Dorg.gradle.jvmargs=-Xmx6g -Dkotlin.daemon.jvm.options=-Xmx4g

- name: Upload test report if tests have failed
if: ${{ failure() }}
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/build-and-run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ env:
REGISTRY: ghcr.io
IMAGE_NAME: utbot_java_cli
DOCKERFILE_PATH: docker/Dockerfile_java_cli
# Environment variable setting gradle options.
GRADLE_OPTS: "-XX:MaxHeapSize=2048m -Dorg.gradle.jvmargs='-XX:MaxHeapSize=2048m -XX:MaxPermSize=512m -Dorg.gradle.daemon=false' -Dorg.gradle.daemon=false"

jobs:
build-and-run-tests:
Expand Down Expand Up @@ -43,7 +41,7 @@ jobs:
- name: Build UTBot Java CLI
run: |
cd utbot-cli
gradle build --no-daemon -x test -PsemVer=${{ env.VERSION }}
gradle build --no-daemon --build-cache --no-parallel -Dorg.gradle.jvmargs=-Xmx2g -Dkotlin.daemon.jvm.options=-Xmx4g -x test -PsemVer=${{ env.VERSION }}
- name: Set docker tag
run:
# "You can make an environment variable available to any subsequent steps in a workflow job by
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/public-rider-plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ on:
- alpha
- beta

env:
# Environment variable setting gradle options.
GRADLE_OPTS: "-XX:MaxHeapSize=2048m -Dorg.gradle.jvmargs='-XX:MaxHeapSize=2048m -XX:MaxPermSize=512m -Dorg.gradle.daemon=false' -Dorg.gradle.daemon=false"

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "greet"
Expand Down Expand Up @@ -75,7 +71,7 @@ jobs:

- name: Build UTBot Rider plugin
run: |
gradle clean :utbot-rider:buildPlugin --no-daemon -PsemVer=${{ env.VERSION }} -PincludeRiderInBuild=true
gradle clean :utbot-rider:buildPlugin --no-daemon --build-cache --no-parallel -Dorg.gradle.jvmargs=-Xmx2g -Dkotlin.daemon.jvm.options=-Xmx4g -PsemVer=${{ env.VERSION }} -PincludeRiderInBuild=true
cd utbot-rider/build/distributions
unzip utbot-rider-${{ env.VERSION }}.zip
rm utbot-rider-${{ env.VERSION }}.zip
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/publish-on-github-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ on:
type: string
required: true
description: "commit SHA: e.g. cab4799c"

env:
# Environment variable setting gradle options.
GRADLE_OPTS: "-XX:MaxHeapSize=2048m -Dorg.gradle.jvmargs='-XX:MaxHeapSize=2048m -XX:MaxPermSize=512m -Dorg.gradle.daemon=false' -Dorg.gradle.daemon=false"

jobs:
build-and-run-tests:
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/publish-plugin-and-cli-from-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@ on:
- alpha
- beta

env:
# Environment variable setting gradle options.
GRADLE_OPTS: "-XX:MaxHeapSize=2048m -Dorg.gradle.jvmargs='-XX:MaxHeapSize=2048m -XX:MaxPermSize=512m -Dorg.gradle.daemon=false' -Dorg.gradle.daemon=false"

jobs:
publish_plugin_and_cli:
runs-on: ubuntu-20.04
Expand Down Expand Up @@ -79,7 +75,7 @@ jobs:

- name: Build UTBot IntelliJ IDEA plugin
run: |
gradle clean buildPlugin --no-daemon -PsemVer=${{ env.VERSION }}
gradle clean buildPlugin --no-daemon --build-cache --no-parallel -Dorg.gradle.jvmargs=-Xmx2g -Dkotlin.daemon.jvm.options=-Xmx4g -PsemVer=${{ env.VERSION }}
cd utbot-intellij/build/distributions
unzip utbot-intellij-${{ env.VERSION }}.zip
rm utbot-intellij-${{ env.VERSION }}.zip
Expand All @@ -93,7 +89,7 @@ jobs:
- name: Build UTBot CLI
run: |
cd utbot-cli
gradle clean build --no-daemon -PsemVer=${{ env.VERSION }}
gradle clean build --no-daemon --build-cache --no-parallel -Dorg.gradle.jvmargs=-Xmx2g -Dkotlin.daemon.jvm.options=-Xmx4g -PsemVer=${{ env.VERSION }}

- name: Archive UTBot CLI
uses: actions/upload-artifact@v3
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/run-chosen-tests-from-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ on:
description: "{package-name}.{class-name-optional}.{test-name-optional}"

env:
# Environment variable setting gradle options.
GRADLE_OPTS: "-XX:MaxHeapSize=2048m -Dorg.gradle.jvmargs='-XX:MaxHeapSize=2048m -XX:MaxPermSize=512m -Dorg.gradle.daemon=false' -Dorg.gradle.daemon=false"
PUSHGATEWAY_HOSTNAME: monitoring.utbot.org

jobs:
Expand All @@ -51,7 +49,7 @@ jobs:

- name: Run chosen tests
run: |
gradle :${{ github.event.inputs.project-name }}:test --no-daemon --tests ${{ github.event.inputs.tests-bunch-name }}
gradle :${{ github.event.inputs.project-name }}:test --no-daemon --build-cache --no-parallel -Dorg.gradle.jvmargs=-Xmx2g -Dkotlin.daemon.jvm.options=-Xmx4g --tests ${{ github.event.inputs.tests-bunch-name }}

- name: Upload ${{ github.event.inputs.project-name }} tests report if tests have failed
if: ${{ failure() }}
Expand Down
30 changes: 19 additions & 11 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -75,16 +75,24 @@ openblasVersion=0.3.10-1.5.4
arpackNgVersion=3.7.0-1.5.4

# configuration for build server
org.gradle.daemon=false
org.gradle.parallel=false
org.gradle.jvmargs="-XX:MaxHeapSize=6144m"
kotlin.compiler.execution.strategy=in-process
org.gradle.caching=false
#
# the following options are passed to gradle command explicitly (see appropriate workflow):
# --build-cache (the same as org.gradle.caching=true)
# --no-daemon (the same as org.gradle.daemon=false)
#
# read about options precedence at: https://docs.gradle.org/current/userguide/build_environment.html
org.gradle.jvmargs="-Xmx6g"

# configuration for local compilation - much faster
#org.gradle.daemon=true
#kotlin.daemon.jvm.options=-Xmx4g
#org.gradle.parallel=true
#org.gradle.caching=true
#org.gradle.workers.max=8
#org.gradle.jvmargs="-XX:MaxHeapSize=6144m"
# overriden by some parameters in CI, read below about each option
#
# overrided by --no-daemon
org.gradle.daemon=true
# overrided by -Dkotlin.daemon.jvm.options=-Xmx4g
kotlin.daemon.jvm.options=-Xmx4g
# overrided by --no-parallel
org.gradle.parallel=true
# not overrided, we use cache in CI as well
org.gradle.caching=true
# there is no need to override the option below because parallel execution is disabled by --no-parallel
org.gradle.workers.max=8