mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-14 22:17:03 +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
19
.github/workflows/baseline-profile.yml
vendored
19
.github/workflows/baseline-profile.yml
vendored
|
@ -20,16 +20,27 @@ jobs:
|
||||||
token: ${{ secrets.POST_RELEASE_GH_TOKEN }}
|
token: ${{ secrets.POST_RELEASE_GH_TOKEN }}
|
||||||
fetch-depth: 0
|
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
|
- name: Set up JDK
|
||||||
uses: actions/setup-java@5ffc13f4174014e2d4d4572b3d74c3fa61aeb2c2 # v3.11.0
|
uses: actions/setup-java@5ffc13f4174014e2d4d4572b3d74c3fa61aeb2c2 # v3.11.0
|
||||||
with:
|
with:
|
||||||
distribution: temurin
|
distribution: temurin
|
||||||
java-version: 18
|
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: Set up Git author
|
- name: Set up Git author
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
|
38
.github/workflows/ci.yml
vendored
38
.github/workflows/ci.yml
vendored
|
@ -22,16 +22,27 @@ jobs:
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
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
|
- name: Set up JDK
|
||||||
uses: actions/setup-java@5ffc13f4174014e2d4d4572b3d74c3fa61aeb2c2 # v3.11.0
|
uses: actions/setup-java@5ffc13f4174014e2d4d4572b3d74c3fa61aeb2c2 # v3.11.0
|
||||||
with:
|
with:
|
||||||
distribution: temurin
|
distribution: temurin
|
||||||
java-version: 18
|
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
|
- name: Run unit tests
|
||||||
uses: gradle/gradle-build-action@749f47bda3e44aa060e82d7b3ef7e40d953bd629 # v2.4.2
|
uses: gradle/gradle-build-action@749f47bda3e44aa060e82d7b3ef7e40d953bd629 # v2.4.2
|
||||||
with:
|
with:
|
||||||
|
@ -54,16 +65,27 @@ jobs:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
|
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
|
- name: Set up JDK
|
||||||
uses: actions/setup-java@5ffc13f4174014e2d4d4572b3d74c3fa61aeb2c2 # v3.11.0
|
uses: actions/setup-java@5ffc13f4174014e2d4d4572b3d74c3fa61aeb2c2 # v3.11.0
|
||||||
with:
|
with:
|
||||||
distribution: temurin
|
distribution: temurin
|
||||||
java-version: 18
|
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
|
- name: Decrypt secrets
|
||||||
run: |
|
run: |
|
||||||
./scripts/setup-age.sh
|
./scripts/setup-age.sh
|
||||||
|
|
21
.github/workflows/codeql_analysis.yml
vendored
21
.github/workflows/codeql_analysis.yml
vendored
|
@ -1,4 +1,4 @@
|
||||||
name: "CodeQL"
|
name: CodeQL
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
@ -18,16 +18,27 @@ jobs:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
|
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
|
- name: Set up JDK
|
||||||
uses: actions/setup-java@5ffc13f4174014e2d4d4572b3d74c3fa61aeb2c2 # v3.11.0
|
uses: actions/setup-java@5ffc13f4174014e2d4d4572b3d74c3fa61aeb2c2 # v3.11.0
|
||||||
with:
|
with:
|
||||||
distribution: temurin
|
distribution: temurin
|
||||||
java-version: 18
|
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: Setup Gradle caching
|
- name: Setup Gradle caching
|
||||||
uses: gradle/gradle-build-action@749f47bda3e44aa060e82d7b3ef7e40d953bd629 # v2.4.2
|
uses: gradle/gradle-build-action@749f47bda3e44aa060e82d7b3ef7e40d953bd629 # v2.4.2
|
||||||
with:
|
with:
|
||||||
|
|
19
.github/workflows/release.yml
vendored
19
.github/workflows/release.yml
vendored
|
@ -12,16 +12,27 @@ jobs:
|
||||||
token: ${{ secrets.POST_RELEASE_GH_TOKEN }}
|
token: ${{ secrets.POST_RELEASE_GH_TOKEN }}
|
||||||
fetch-depth: 0
|
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
|
- name: Set up JDK
|
||||||
uses: actions/setup-java@5ffc13f4174014e2d4d4572b3d74c3fa61aeb2c2 # v3.11.0
|
uses: actions/setup-java@5ffc13f4174014e2d4d4572b3d74c3fa61aeb2c2 # v3.11.0
|
||||||
with:
|
with:
|
||||||
distribution: temurin
|
distribution: temurin
|
||||||
java-version: 18
|
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: Set up Git author
|
- name: Set up Git author
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue