From b4beaf4f9432f12668d6ba6146aee5ac290719fb Mon Sep 17 00:00:00 2001 From: andy Date: Tue, 4 Mar 2025 22:37:45 +0500 Subject: [PATCH 1/9] CI/CD time optimization attempt --- .gitea/workflows/build.yaml | 12 +++++++++--- gradle.properties | 4 +++- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index d0594b5..0174b18 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -4,6 +4,7 @@ on: push: branches: - main + - pipeline-test jobs: Build: @@ -18,12 +19,17 @@ jobs: distribution: 'temurin' - name: Set up Android SDK uses: android-actions/setup-android@v3 + - name: Cache Gradle packages + uses: actions/cache@v3 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} - name: Grant execute permission for gradlew run: chmod +x gradlew - name: Build with Gradle - uses: gradle/gradle-build-action@v2 - with: - arguments: assembleDebug + run: ./gradlew --no-daemon assembleDebug - name: Upload .apk Artifact uses: actions/upload-artifact@v3 with: diff --git a/gradle.properties b/gradle.properties index 20e2a01..0ebaa7d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -20,4 +20,6 @@ kotlin.code.style=official # Enables namespacing of each library's R class so that its R class includes only the # resources declared in the library itself and none from the library's dependencies, # thereby reducing the size of the R class for that library -android.nonTransitiveRClass=true \ No newline at end of file +android.nonTransitiveRClass=true +org.gradle.caching=true +org.gradle.parallel=true \ No newline at end of file -- 2.47.2 From 3b196de1d87591e7879c2e9375af2c2707c9851e Mon Sep 17 00:00:00 2001 From: andy Date: Tue, 4 Mar 2025 22:43:32 +0500 Subject: [PATCH 2/9] CI/CD time optimization attempt 2 --- .gitea/workflows/build.yaml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 0174b18..ede375f 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -17,8 +17,6 @@ jobs: with: java-version: '23' distribution: 'temurin' - - name: Set up Android SDK - uses: android-actions/setup-android@v3 - name: Cache Gradle packages uses: actions/cache@v3 with: @@ -26,10 +24,14 @@ jobs: ~/.gradle/caches ~/.gradle/wrapper key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} + - name: Set up Android SDK + uses: android-actions/setup-android@v3 - name: Grant execute permission for gradlew run: chmod +x gradlew - name: Build with Gradle - run: ./gradlew --no-daemon assembleDebug + uses: gradle/gradle-build-action@v2 + with: + arguments: assembleDebug - name: Upload .apk Artifact uses: actions/upload-artifact@v3 with: -- 2.47.2 From 91a8b0380b0ccf53363e849ae38e414cc5e8e2a2 Mon Sep 17 00:00:00 2001 From: andy Date: Tue, 4 Mar 2025 23:15:46 +0500 Subject: [PATCH 3/9] CI/CD time optimization attempt 3 --- gradle.properties | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/gradle.properties b/gradle.properties index 0ebaa7d..20e2a01 100644 --- a/gradle.properties +++ b/gradle.properties @@ -20,6 +20,4 @@ kotlin.code.style=official # Enables namespacing of each library's R class so that its R class includes only the # resources declared in the library itself and none from the library's dependencies, # thereby reducing the size of the R class for that library -android.nonTransitiveRClass=true -org.gradle.caching=true -org.gradle.parallel=true \ No newline at end of file +android.nonTransitiveRClass=true \ No newline at end of file -- 2.47.2 From f05f4fbbadcb1aeaafb9501e2215c04c364d1893 Mon Sep 17 00:00:00 2001 From: andy Date: Tue, 4 Mar 2025 23:18:04 +0500 Subject: [PATCH 4/9] CI/CD time optimization attempt 4 --- .gitea/workflows/build.yaml | 7 ------- gradle.properties | 4 +++- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index ede375f..9bacd38 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -17,13 +17,6 @@ jobs: with: java-version: '23' distribution: 'temurin' - - name: Cache Gradle packages - uses: actions/cache@v3 - with: - path: | - ~/.gradle/caches - ~/.gradle/wrapper - key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} - name: Set up Android SDK uses: android-actions/setup-android@v3 - name: Grant execute permission for gradlew diff --git a/gradle.properties b/gradle.properties index 20e2a01..0ebaa7d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -20,4 +20,6 @@ kotlin.code.style=official # Enables namespacing of each library's R class so that its R class includes only the # resources declared in the library itself and none from the library's dependencies, # thereby reducing the size of the R class for that library -android.nonTransitiveRClass=true \ No newline at end of file +android.nonTransitiveRClass=true +org.gradle.caching=true +org.gradle.parallel=true \ No newline at end of file -- 2.47.2 From da80ba3abd102cdb0735f7e90c4e910e86ee3424 Mon Sep 17 00:00:00 2001 From: andy Date: Tue, 4 Mar 2025 23:27:17 +0500 Subject: [PATCH 5/9] CI/CD time optimization attempt 5 --- .gitea/workflows/build.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 9bacd38..5ce1bef 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -21,6 +21,13 @@ jobs: uses: android-actions/setup-android@v3 - name: Grant execute permission for gradlew run: chmod +x gradlew + - name: Cache Gradle packages + uses: actions/cache@v3 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} - name: Build with Gradle uses: gradle/gradle-build-action@v2 with: -- 2.47.2 From 3e6e44c4b3a6ec0a7c49409ca674f1f0ef3a8ef5 Mon Sep 17 00:00:00 2001 From: andy Date: Tue, 4 Mar 2025 23:32:49 +0500 Subject: [PATCH 6/9] CI/CD time optimization attempt 5 --- .gitea/workflows/build.yaml | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 5ce1bef..e1838ff 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -13,21 +13,22 @@ jobs: - name: Checkout the repo uses: actions/checkout@v4 - name: Set up JDK 23 - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: java-version: '23' distribution: 'temurin' - - name: Set up Android SDK - uses: android-actions/setup-android@v3 + cache: 'gradle' +# - name: Set up Android SDK +# uses: android-actions/setup-android@v3 - name: Grant execute permission for gradlew run: chmod +x gradlew - - name: Cache Gradle packages - uses: actions/cache@v3 - with: - path: | - ~/.gradle/caches - ~/.gradle/wrapper - key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} +# - name: Cache Gradle packages +# uses: actions/cache@v3 +# with: +# path: | +# ~/.gradle/caches +# ~/.gradle/wrapper +# key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} - name: Build with Gradle uses: gradle/gradle-build-action@v2 with: -- 2.47.2 From 186f1e693cafc64b54f535d5bfe804a5c0c16dcc Mon Sep 17 00:00:00 2001 From: andy Date: Tue, 4 Mar 2025 23:36:03 +0500 Subject: [PATCH 7/9] CI/CD time optimization attempt 5 --- .gitea/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index e1838ff..ca99c65 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -16,7 +16,7 @@ jobs: uses: actions/setup-java@v4 with: java-version: '23' - distribution: 'temurin' + distribution: 'zulu' cache: 'gradle' # - name: Set up Android SDK # uses: android-actions/setup-android@v3 -- 2.47.2 From 9c184c08a820d6691027ed3b04cb81980e597d28 Mon Sep 17 00:00:00 2001 From: andy Date: Tue, 4 Mar 2025 23:40:39 +0500 Subject: [PATCH 8/9] CI/CD time optimization attempt 6 --- .gitea/workflows/build.yaml | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index ca99c65..11c32a8 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -16,25 +16,24 @@ jobs: uses: actions/setup-java@v4 with: java-version: '23' - distribution: 'zulu' - cache: 'gradle' -# - name: Set up Android SDK -# uses: android-actions/setup-android@v3 + distribution: 'temurin' + - name: Set up Android SDK + uses: android-actions/setup-android@v3 - name: Grant execute permission for gradlew run: chmod +x gradlew -# - name: Cache Gradle packages -# uses: actions/cache@v3 -# with: -# path: | -# ~/.gradle/caches -# ~/.gradle/wrapper -# key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} + - name: Cache Gradle packages + uses: actions/cache@v3 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} - name: Build with Gradle uses: gradle/gradle-build-action@v2 with: arguments: assembleDebug - name: Upload .apk Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: android-app-apk path: app/build/outputs/apk/debug/*.apk -- 2.47.2 From d1bc545a073058a6bd1ae035ed07de453e76f8db Mon Sep 17 00:00:00 2001 From: andy Date: Tue, 4 Mar 2025 23:44:32 +0500 Subject: [PATCH 9/9] CI/CD time optimization attempt 6 --- .gitea/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 11c32a8..ac4c3df 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -33,7 +33,7 @@ jobs: with: arguments: assembleDebug - name: Upload .apk Artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v3 with: name: android-app-apk path: app/build/outputs/apk/debug/*.apk -- 2.47.2