mirror of
https://github.com/bitfireAT/davx5-ose
synced 2024-10-15 15:59:18 +00:00
Cache app/build to speed up builds
This commit is contained in:
parent
ee637e4f6d
commit
90c72ec013
8
.github/workflows/codeql.yml
vendored
8
.github/workflows/codeql.yml
vendored
|
@ -35,6 +35,14 @@ jobs:
|
||||||
java-version: 17
|
java-version: 17
|
||||||
- uses: gradle/gradle-build-action@v2
|
- uses: gradle/gradle-build-action@v2
|
||||||
|
|
||||||
|
- name: Use app/build and gradle configuration cache
|
||||||
|
uses: actions/cache/restore@v3
|
||||||
|
with:
|
||||||
|
key: app_build-tests-without-emulator
|
||||||
|
path: |
|
||||||
|
.gradle/configuration-cache
|
||||||
|
app/build
|
||||||
|
|
||||||
# Initializes the CodeQL tools for scanning.
|
# Initializes the CodeQL tools for scanning.
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
uses: github/codeql-action/init@v2
|
uses: github/codeql-action/init@v2
|
||||||
|
|
36
.github/workflows/test-dev.yml
vendored
36
.github/workflows/test-dev.yml
vendored
|
@ -16,6 +16,15 @@ jobs:
|
||||||
java-version: 17
|
java-version: 17
|
||||||
- uses: gradle/gradle-build-action@v2
|
- uses: gradle/gradle-build-action@v2
|
||||||
|
|
||||||
|
- name: Use app/build and gradle configuration cache
|
||||||
|
if: ${{ github.ref != 'refs/heads/dev-ose' }}
|
||||||
|
uses: actions/cache/restore@v3
|
||||||
|
with:
|
||||||
|
key: app_build-tests-without-emulator
|
||||||
|
path: |
|
||||||
|
.gradle/configuration-cache
|
||||||
|
app/build
|
||||||
|
|
||||||
- name: Run lint and unit tests
|
- name: Run lint and unit tests
|
||||||
run: ./gradlew app:check
|
run: ./gradlew app:check
|
||||||
- name: Archive results
|
- name: Archive results
|
||||||
|
@ -26,6 +35,15 @@ jobs:
|
||||||
app/build/outputs/lint*
|
app/build/outputs/lint*
|
||||||
app/build/reports
|
app/build/reports
|
||||||
|
|
||||||
|
- name: Cache app/build and gradle configuration
|
||||||
|
if: ${{ github.ref == 'refs/heads/dev-ose' }}
|
||||||
|
uses: actions/cache/save@v3
|
||||||
|
with:
|
||||||
|
key: app_build-tests-without-emulator
|
||||||
|
path: |
|
||||||
|
.gradle/configuration-cache
|
||||||
|
app/build
|
||||||
|
|
||||||
test_on_emulator:
|
test_on_emulator:
|
||||||
name: Tests with emulator
|
name: Tests with emulator
|
||||||
runs-on: ubuntu-latest-4-cores
|
runs-on: ubuntu-latest-4-cores
|
||||||
|
@ -40,6 +58,15 @@ jobs:
|
||||||
java-version: 17
|
java-version: 17
|
||||||
- uses: gradle/gradle-build-action@v2
|
- uses: gradle/gradle-build-action@v2
|
||||||
|
|
||||||
|
- name: Use app/build and gradle configuration cache
|
||||||
|
if: ${{ github.ref != 'refs/heads/dev-ose' }}
|
||||||
|
uses: actions/cache/restore@v3
|
||||||
|
with:
|
||||||
|
key: app_build-tests-with-emulator
|
||||||
|
path: |
|
||||||
|
.gradle/configuration-cache
|
||||||
|
app/build
|
||||||
|
|
||||||
- name: Enable KVM group perms
|
- name: Enable KVM group perms
|
||||||
run: |
|
run: |
|
||||||
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
|
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
|
||||||
|
@ -76,6 +103,15 @@ jobs:
|
||||||
disable-animations: true
|
disable-animations: true
|
||||||
script: ./gradlew app:connectedCheck
|
script: ./gradlew app:connectedCheck
|
||||||
|
|
||||||
|
- name: Cache app/build and gradle configuration
|
||||||
|
if: ${{ github.ref == 'refs/heads/dev-ose' }}
|
||||||
|
uses: actions/cache/save@v3
|
||||||
|
with:
|
||||||
|
key: app_build-tests-with-emulator
|
||||||
|
path: |
|
||||||
|
.gradle/configuration-cache
|
||||||
|
app/build
|
||||||
|
|
||||||
- name: Archive results
|
- name: Archive results
|
||||||
if: always()
|
if: always()
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
# [https://developer.android.com/build/optimize-your-build#optimize]
|
# https://developer.android.com/build/optimize-your-build
|
||||||
org.gradle.daemon=true
|
org.gradle.daemon=true
|
||||||
org.gradle.jvmargs=-Xmx4g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -XX:+UseParallelGC -XX:MaxMetaspaceSize=512m
|
org.gradle.jvmargs=-Xmx4g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -XX:+UseParallelGC -XX:MaxMetaspaceSize=512m
|
||||||
org.gradle.parallel=true
|
org.gradle.parallel=true
|
||||||
|
|
||||||
# configuration cache [https://developer.android.com/build/optimize-your-build#use-the-configuration-cache-experimental]
|
org.gradle.configuration-cache=true
|
||||||
org.gradle.unsafe.configuration-cache=true
|
org.gradle.configuration-cache.problems=warn
|
||||||
org.gradle.unsafe.configuration-cache-problems=warn
|
|
||||||
|
# https://docs.gradle.org/current/userguide/build_cache.html
|
||||||
|
org.gradle.caching=true
|
||||||
|
|
||||||
# Android
|
# Android
|
||||||
android.useAndroidX=true
|
android.useAndroidX=true
|
||||||
|
|
Loading…
Reference in a new issue