Browse Source

Use the gradle plugin (same usage as in element-android) to standardise caching.

This may or may not speed up build times.
misc/jme/add-logging-to-state-machine
Michael Kaye 2 years ago
parent
commit
7e0a284669
  1. 4
      .github/workflows/build.yml
  2. 8
      .github/workflows/quality.yml
  3. 4
      .github/workflows/tests.yml

4
.github/workflows/build.yml

@ -28,6 +28,10 @@ jobs:
# Ensure we are building the branch and not the branch after being merged on develop # Ensure we are building the branch and not the branch after being merged on develop
# https://github.com/actions/checkout/issues/881 # https://github.com/actions/checkout/issues/881
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.ref }} ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.ref }}
- name: Configure gradle
uses: gradle/gradle-build-action@v2
with:
cache-read-only: ${{ github.ref != 'refs/heads/develop' }}
- name: Assemble debug APK - name: Assemble debug APK
run: ./gradlew assembleDebug $CI_GRADLE_ARG_PROPERTIES run: ./gradlew assembleDebug $CI_GRADLE_ARG_PROPERTIES
- name: Upload debug APKs - name: Upload debug APKs

8
.github/workflows/quality.yml

@ -21,6 +21,10 @@ jobs:
cancel-in-progress: true cancel-in-progress: true
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Configure gradle
uses: gradle/gradle-build-action@v2
with:
cache-read-only: ${{ github.ref != 'refs/heads/develop' }}
- name: Run code quality check suite - name: Run code quality check suite
run: ./gradlew runQualityChecks $CI_GRADLE_ARG_PROPERTIES run: ./gradlew runQualityChecks $CI_GRADLE_ARG_PROPERTIES
- name: Upload reports - name: Upload reports
@ -56,6 +60,10 @@ jobs:
cancel-in-progress: true cancel-in-progress: true
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Configure gradle
uses: gradle/gradle-build-action@v2
with:
cache-read-only: ${{ github.ref != 'refs/heads/develop' }}
- name: Dependency analysis - name: Dependency analysis
run: ./gradlew dependencyCheckAnalyze $CI_GRADLE_ARG_PROPERTIES run: ./gradlew dependencyCheckAnalyze $CI_GRADLE_ARG_PROPERTIES
- name: Upload dependency analysis - name: Upload dependency analysis

4
.github/workflows/tests.yml

@ -25,6 +25,10 @@ jobs:
uses: actions/checkout@v3 uses: actions/checkout@v3
with: with:
lfs: 'true' lfs: 'true'
- name: Configure gradle
uses: gradle/gradle-build-action@v2
with:
cache-read-only: ${{ github.ref != 'refs/heads/develop' }}
- name: Run unit & screenshot tests, generate kover report - name: Run unit & screenshot tests, generate kover report
run: ./gradlew koverMergedReport $CI_GRADLE_ARG_PROPERTIES -Pci-build=true run: ./gradlew koverMergedReport $CI_GRADLE_ARG_PROPERTIES -Pci-build=true

Loading…
Cancel
Save