diff --git a/.github/workflows/core.yml b/.github/workflows/core.yml index 5097ffbd..3b0b806b 100644 --- a/.github/workflows/core.yml +++ b/.github/workflows/core.yml @@ -36,31 +36,27 @@ jobs: uses: actions/setup-java@v1 with: java-version: 11 - - name: Cache Gradle - uses: actions/cache@v2 - with: - path: | - ~/.gradle/caches - ~/.gradle/wrapper - key: gradle-core-${{ hashFiles('**/*.gradle.kts') }} - restore-keys: | - gradle-manager-${{ hashFiles('**/*.gradle.kts') }} - gradle-core - gradle- - name: Cache Cmake uses: actions/cache@v2 with: path: ~/.ccache - key: ccache-${{ hashFiles('core/src/main/cpp') }} - restore-keys: ccache- + key: ccache-${{ github.sha }} + restore-keys: ccache - name: Install ccache run: sudo apt-get install -y ccache - - name: Build with Gradle - run: | - echo 'org.gradle.caching=true' >> gradle.properties - echo 'org.gradle.parallel=true' >> gradle.properties - echo 'org.gradle.vfs.watch=true' >> gradle.properties - ./gradlew zipRelease zipDebug + - uses: burrunan/gradle-cache-action@v1 + name: Build with Gradle + with: + job-id: core + arguments: | + zipRelease + zipDebug + gradle-version: wrapper + concurrent: true + properties: | + org.gradle.caching=true + org.gradle.parallel=true + org.gradle.vfs.watch=true - name: Prepare artifact if: success() id: prepareArtifact diff --git a/.github/workflows/manager.yml b/.github/workflows/manager.yml index 2489dbac..37a113c2 100644 --- a/.github/workflows/manager.yml +++ b/.github/workflows/manager.yml @@ -35,24 +35,20 @@ jobs: echo androidKeyPassword='${{ secrets.KEY_PASSWORD }}' >> gradle.properties echo androidStoreFile='key.jks' >> gradle.properties echo ${{ secrets.KEY_STORE }} | base64 --decode > key.jks - - name: Cache Gradle - uses: actions/cache@v2 + - uses: burrunan/gradle-cache-action@v1 + name: Build with Gradle with: - path: | - ~/.gradle/caches - ~/.gradle/wrapper - key: gradle-manager-${{ hashFiles('**/*.gradle.kts') }} - restore-keys: | - gradle-core-${{ hashFiles('**/*.gradle.kts') }} - gradle-manager - gradle- + job-id: manager + arguments: ":app:assembleRelease" + gradle-version: wrapper + concurrent: true + properties: | + org.gradle.caching=true + org.gradle.parallel=true + org.gradle.vfs.watch=true - name: Build with Gradle id: buildRelease run: | - echo 'org.gradle.caching=true' >> gradle.properties - echo 'org.gradle.parallel=true' >> gradle.properties - echo 'org.gradle.vfs.watch=true' >> gradle.properties - ./gradlew :app:assembleRelease echo "::set-output name=releaseName::`ls app/build/outputs/apk/release/LSPosed*-v*-release.apk | awk -F '(/|.apk)' '{print $6}'`" - name: Upload apk if: success()