From 90ddf2ac7a53e88b81c366a1e31bc4f718dd75eb Mon Sep 17 00:00:00 2001 From: Steven Zeck <8315038+stevenzeck@users.noreply.github.com> Date: Mon, 15 Dec 2025 19:28:49 -0600 Subject: [PATCH 1/4] Enable parallel builds --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 9a5934aca7..fd8266a6c4 100644 --- a/gradle.properties +++ b/gradle.properties @@ -18,7 +18,7 @@ org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 # When configured, Gradle will run in incubating parallel mode. # This option should only be used with decoupled projects. More details, visit # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects -# org.gradle.parallel=true + org.gradle.parallel=true # AndroidX package structure to make it clearer which packages are bundled with the # Android operating system, and which are packaged with your app"s APK # https://developer.android.com/topic/libraries/support-library/androidx-rn From 7693d2f0650ed92b0750f0a7bb7b112e87c27d06 Mon Sep 17 00:00:00 2001 From: Steven Zeck <8315038+stevenzeck@users.noreply.github.com> Date: Mon, 15 Dec 2025 19:29:14 -0600 Subject: [PATCH 2/4] Cache gradle dependencies --- .github/workflows/checks.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index e8447e915c..9410b73ae5 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -19,10 +19,15 @@ jobs: with: java-version: '17' distribution: 'adopt' + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v3 + with: + #Read cache in PRs, write to cache after merge to main or develop + cache-read-only: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/develop' }} - name: Build - run: ./gradlew clean build -x test -x ktlintMainSourceSetCheck + run: ./gradlew build -x test -x ktlintMainSourceSetCheck --configuration-cache - name: Test - run: ./gradlew test --continue + run: ./gradlew test --continue --configuration-cache lint-kt: name: Lint Kotlin @@ -67,8 +72,8 @@ jobs: run: pnpm --dir "$scripts" run checkformat - name: Check if bundled scripts are up-to-date run: | - make scripts-legacy - git diff --exit-code --name-only src/main/assets/readium/scripts/*.js + make scripts-legacy + git diff --exit-code --name-only src/main/assets/readium/scripts/*.js lint-new-ts: name: Lint TypeScript runs-on: macos-latest From a863ec90c85a9d112aa0b6d2937790514c63c672 Mon Sep 17 00:00:00 2001 From: Steven Zeck <8315038+stevenzeck@users.noreply.github.com> Date: Tue, 16 Dec 2025 19:08:51 -0600 Subject: [PATCH 3/4] Reduce memory, combine build and test, and only build debug variant --- .github/workflows/checks.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 9410b73ae5..c15f04f753 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -11,6 +11,8 @@ jobs: name: Build and test runs-on: ubuntu-latest if: ${{ !github.event.pull_request.draft }} + env: + GRADLE_OPTS: "-Dorg.gradle.jvmargs=-Xmx3g -XX:+UseParallelGC" steps: - name: Checkout uses: actions/checkout@v4 @@ -24,10 +26,8 @@ jobs: with: #Read cache in PRs, write to cache after merge to main or develop cache-read-only: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/develop' }} - - name: Build - run: ./gradlew build -x test -x ktlintMainSourceSetCheck --configuration-cache - - name: Test - run: ./gradlew test --continue --configuration-cache + - name: Build and Test + run: ./gradlew assembleDebug testDebugUnitTest lintDebug lint-kt: name: Lint Kotlin From fc9f3c7b51def87cd6e336109095c8a4247043e4 Mon Sep 17 00:00:00 2001 From: Steven Zeck <8315038+stevenzeck@users.noreply.github.com> Date: Tue, 16 Dec 2025 19:09:16 -0600 Subject: [PATCH 4/4] Update action versions --- .github/workflows/checks.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index c15f04f753..8561f16631 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -15,16 +15,16 @@ jobs: GRADLE_OPTS: "-Dorg.gradle.jvmargs=-Xmx3g -XX:+UseParallelGC" steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Set up JDK 17 - uses: actions/setup-java@v4 + uses: actions/setup-java@v5 with: java-version: '17' distribution: 'adopt' - name: Setup Gradle - uses: gradle/actions/setup-gradle@v3 + uses: gradle/actions/setup-gradle@v5 with: - #Read cache in PRs, write to cache after merge to main or develop + # Read cache in PRs, write to cache after merge to main or develop cache-read-only: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/develop' }} - name: Build and Test run: ./gradlew assembleDebug testDebugUnitTest lintDebug @@ -35,9 +35,9 @@ jobs: if: ${{ !github.event.pull_request.draft }} steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Set up JDK 17 - uses: actions/setup-java@v4 + uses: actions/setup-java@v5 with: java-version: '17' distribution: 'adopt' @@ -52,14 +52,14 @@ jobs: scripts: ${{ 'readium/navigator/src/main/assets/_scripts' }} steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Install pnpm uses: pnpm/action-setup@v4 with: package_json_file: readium/navigator/src/main/assets/_scripts/package.json run_install: false - name: Setup cache - uses: actions/setup-node@v4 + uses: actions/setup-node@v6 with: node-version: 20 cache: 'pnpm' @@ -82,14 +82,14 @@ jobs: scripts: ${{ 'readium/navigators/web/internals/scripts' }} steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Install pnpm uses: pnpm/action-setup@v4 with: package_json_file: readium/navigators/web/internals/scripts/package.json run_install: false - name: Setup cache - uses: actions/setup-node@v4 + uses: actions/setup-node@v6 with: node-version: 20 cache: 'pnpm'