mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-14 21:07:04 +05:30
fix(ci): manually cache Android SDK build-tools
This is necessary to avoid the extremely slow re-download on each run
This commit is contained in:
parent
c91a34aae5
commit
4764698583
4 changed files with 76 additions and 21 deletions
38
.github/workflows/ci.yml
vendored
38
.github/workflows/ci.yml
vendored
|
@ -22,16 +22,27 @@ jobs:
|
|||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Accept all SDK licenses
|
||||
shell: bash
|
||||
run: printf 'y\ny\ny\ny\ny\ny\n' | $ANDROID_HOME/tools/bin/sdkmanager --licenses
|
||||
|
||||
- name: Get build-tools directory
|
||||
id: build-tools-path
|
||||
shell: bash
|
||||
run: echo "dir=${ANDROID_HOME}/build-tools/34.0.0-rc3" >> "${GITHUB_OUTPUT}"
|
||||
|
||||
- name: Cache build-tools
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ${{ steps.build-tools-path.outputs.dir }}
|
||||
key: ${{ runner.os }}-34.0.0-rc3
|
||||
|
||||
- name: Set up JDK
|
||||
uses: actions/setup-java@5ffc13f4174014e2d4d4572b3d74c3fa61aeb2c2 # v3.11.0
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: 18
|
||||
|
||||
- name: Accept all SDK licenses
|
||||
shell: bash
|
||||
run: printf 'y\ny\ny\ny\ny\n' | $ANDROID_HOME/tools/bin/sdkmanager --licenses
|
||||
|
||||
- name: Run unit tests
|
||||
uses: gradle/gradle-build-action@749f47bda3e44aa060e82d7b3ef7e40d953bd629 # v2.4.2
|
||||
with:
|
||||
|
@ -54,16 +65,27 @@ jobs:
|
|||
- name: Checkout repository
|
||||
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
|
||||
|
||||
- name: Accept all SDK licenses
|
||||
shell: bash
|
||||
run: printf 'y\ny\ny\ny\ny\ny\n' | $ANDROID_HOME/tools/bin/sdkmanager --licenses
|
||||
|
||||
- name: Get build-tools directory
|
||||
id: build-tools-path
|
||||
shell: bash
|
||||
run: echo "dir=${ANDROID_HOME}/build-tools/34.0.0-rc3" >> "${GITHUB_OUTPUT}"
|
||||
|
||||
- name: Cache build-tools
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ${{ steps.build-tools-path.outputs.dir }}
|
||||
key: ${{ runner.os }}-34.0.0-rc3
|
||||
|
||||
- name: Set up JDK
|
||||
uses: actions/setup-java@5ffc13f4174014e2d4d4572b3d74c3fa61aeb2c2 # v3.11.0
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: 18
|
||||
|
||||
- name: Accept all SDK licenses
|
||||
shell: bash
|
||||
run: printf 'y\ny\ny\ny\ny\n' | $ANDROID_HOME/tools/bin/sdkmanager --licenses
|
||||
|
||||
- name: Decrypt secrets
|
||||
run: |
|
||||
./scripts/setup-age.sh
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue