diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1c0491fda4..933c442501 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,10 +7,8 @@ on: # Enrich gradle.properties for CI/CD env: - CI_GRADLE_ARG_PROPERTIES: > - -Porg.gradle.jvmargs=-Xmx4g - -Porg.gradle.parallel=false - --no-daemon + GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx3072m -Dfile.encoding=UTF-8 -XX:+HeapDumpOnOutOfMemoryError" -Dkotlin.daemon.jvm.options="-Xmx2560m" -Dkotlin.incremental=false + CI_GRADLE_ARG_PROPERTIES: --stacktrace -PpreDexEnable=false --max-workers 2 --no-daemon jobs: debug: @@ -36,7 +34,7 @@ jobs: restore-keys: | ${{ runner.os }}-gradle- - name: Assemble ${{ matrix.target }} debug apk - run: ./gradlew assemble${{ matrix.target }}Debug $CI_GRADLE_ARG_PROPERTIES --stacktrace + run: ./gradlew assemble${{ matrix.target }}Debug $CI_GRADLE_ARG_PROPERTIES - name: Upload ${{ matrix.target }} debug APKs uses: actions/upload-artifact@v3 with: @@ -61,7 +59,7 @@ jobs: restore-keys: | ${{ runner.os }}-gradle- - name: Assemble GPlay unsigned apk - run: ./gradlew clean assembleGplayRelease $CI_GRADLE_ARG_PROPERTIES --stacktrace + run: ./gradlew clean assembleGplayRelease $CI_GRADLE_ARG_PROPERTIES - name: Upload Gplay unsigned APKs uses: actions/upload-artifact@v3 with: diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 36fd225674..51c1b32e82 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -6,10 +6,8 @@ on: - cron: "0 4 * * *" env: - CI_GRADLE_ARG_PROPERTIES: > - -Porg.gradle.jvmargs=-Xmx4g - -Porg.gradle.parallel=false - --no-daemon + GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx3072m -Dfile.encoding=UTF-8 -XX:+HeapDumpOnOutOfMemoryError" -Dkotlin.daemon.jvm.options="-Xmx2560m" -Dkotlin.incremental=false + CI_GRADLE_ARG_PROPERTIES: --stacktrace -PpreDexEnable=false --max-workers 2 --no-daemon jobs: nightly: @@ -40,7 +38,7 @@ jobs: yes n | towncrier build --version nightly - name: Build and upload Gplay Nightly APK run: | - ./gradlew assembleGplayNightly appDistributionUploadGplayNightly $CI_GRADLE_ARG_PROPERTIES --stacktrace + ./gradlew assembleGplayNightly appDistributionUploadGplayNightly $CI_GRADLE_ARG_PROPERTIES env: ELEMENT_ANDROID_NIGHTLY_KEYID: ${{ secrets.ELEMENT_ANDROID_NIGHTLY_KEYID }} ELEMENT_ANDROID_NIGHTLY_KEYPASSWORD: ${{ secrets.ELEMENT_ANDROID_NIGHTLY_KEYPASSWORD }} diff --git a/.github/workflows/post-pr.yml b/.github/workflows/post-pr.yml index a7f1d6f204..5cde95e625 100644 --- a/.github/workflows/post-pr.yml +++ b/.github/workflows/post-pr.yml @@ -10,10 +10,8 @@ on: # Enrich gradle.properties for CI/CD env: - CI_GRADLE_ARG_PROPERTIES: > - -Porg.gradle.jvmargs=-Xmx4g - -Porg.gradle.parallel=false - --no-daemon + GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx3072m -Dfile.encoding=UTF-8 -XX:+HeapDumpOnOutOfMemoryError" -Dkotlin.daemon.jvm.options="-Xmx2560m" -Dkotlin.incremental=false + CI_GRADLE_ARG_PROPERTIES: --stacktrace -PpreDexEnable=false --max-workers 2 --no-daemon jobs: diff --git a/.github/workflows/quality.yml b/.github/workflows/quality.yml index 56a7c8b97b..6e5e2e4d67 100644 --- a/.github/workflows/quality.yml +++ b/.github/workflows/quality.yml @@ -7,10 +7,8 @@ on: # Enrich gradle.properties for CI/CD env: - CI_GRADLE_ARG_PROPERTIES: > - -Porg.gradle.jvmargs=-Xmx4g - -Porg.gradle.parallel=false - --no-daemon + GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx3072m -Dfile.encoding=UTF-8 -XX:+HeapDumpOnOutOfMemoryError" -Dkotlin.daemon.jvm.options="-Xmx2560m" -Dkotlin.incremental=false + CI_GRADLE_ARG_PROPERTIES: --stacktrace -PpreDexEnable=false --max-workers 2 --no-daemon jobs: check: @@ -51,8 +49,8 @@ jobs: - name: Run lint # Not always, if ktlint or detekt fail, avoid running the long lint check. run: | - ./gradlew lintGplayRelease --stacktrace $CI_GRADLE_ARG_PROPERTIES - ./gradlew lintFdroidRelease --stacktrace $CI_GRADLE_ARG_PROPERTIES + ./gradlew lintGplayRelease $CI_GRADLE_ARG_PROPERTIES + ./gradlew lintFdroidRelease $CI_GRADLE_ARG_PROPERTIES - name: Upload reports if: always() uses: actions/upload-artifact@v3 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2b9aa1a851..2a89ed3040 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -7,10 +7,8 @@ on: # Enrich gradle.properties for CI/CD env: - CI_GRADLE_ARG_PROPERTIES: > - -Porg.gradle.jvmargs=-Xmx4g - -Porg.gradle.parallel=false - --no-daemon + GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx3072m -Dfile.encoding=UTF-8 -XX:+HeapDumpOnOutOfMemoryError" -Dkotlin.daemon.jvm.options="-Xmx2560m" -Dkotlin.incremental=false + CI_GRADLE_ARG_PROPERTIES: --stacktrace -PpreDexEnable=false --max-workers 2 --no-daemon jobs: tests: @@ -51,9 +49,9 @@ jobs: disable-animations: true emulator-build: 7425822 script: | - ./gradlew unitTestsWithCoverage --stacktrace $CI_GRADLE_ARG_PROPERTIES - ./gradlew instrumentationTestsWithCoverage --stacktrace $CI_GRADLE_ARG_PROPERTIES - ./gradlew generateCoverageReport --stacktrace $CI_GRADLE_ARG_PROPERTIES + ./gradlew unitTestsWithCoverage $CI_GRADLE_ARG_PROPERTIES + ./gradlew instrumentationTestsWithCoverage $CI_GRADLE_ARG_PROPERTIES + ./gradlew generateCoverageReport $CI_GRADLE_ARG_PROPERTIES # NB: continue-on-error marks steps.tests.conclusion = 'success' but leaves stes.tests.outcome = 'failure' - name: Run all the codecoverage tests at once (retry if emulator failed) uses: reactivecircus/android-emulator-runner@v2 @@ -67,9 +65,9 @@ jobs: disable-animations: true emulator-build: 7425822 script: | - ./gradlew unitTestsWithCoverage --stacktrace $CI_GRADLE_ARG_PROPERTIES - ./gradlew instrumentationTestsWithCoverage --stacktrace $CI_GRADLE_ARG_PROPERTIES - ./gradlew generateCoverageReport --stacktrace $CI_GRADLE_ARG_PROPERTIES + ./gradlew unitTestsWithCoverage $CI_GRADLE_ARG_PROPERTIES + ./gradlew instrumentationTestsWithCoverage $CI_GRADLE_ARG_PROPERTIES + ./gradlew generateCoverageReport $CI_GRADLE_ARG_PROPERTIES - run: ./gradlew sonarqube $CI_GRADLE_ARG_PROPERTIES if: always() # we may have failed a previous step and retried, that's OK env: @@ -114,5 +112,5 @@ jobs: # restore-keys: | # ${{ runner.os }}-gradle- # - name: Build Android Tests -# run: ./gradlew clean assembleAndroidTest $CI_GRADLE_ARG_PROPERTIES --stacktrace +# run: ./gradlew clean assembleAndroidTest $CI_GRADLE_ARG_PROPERTIES diff --git a/docs/nightly_build.md b/docs/nightly_build.md index 91f18214c4..7750e0466a 100644 --- a/docs/nightly_build.md +++ b/docs/nightly_build.md @@ -48,7 +48,7 @@ mv towncrier.toml towncrier.toml.bak sed 's/CHANGES\.md/CHANGES_NIGHTLY\.md/' towncrier.toml.bak > towncrier.toml rm towncrier.toml.bak yes n | towncrier --version nightly -./gradlew assembleGplayNightly appDistributionUploadGplayNightly $CI_GRADLE_ARG_PROPERTIES --stacktrace +./gradlew assembleGplayNightly appDistributionUploadGplayNightly $CI_GRADLE_ARG_PROPERTIES ``` Then you can reset the change on the codebase.