mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Adding ccache for Android builds (#45662)
Summary: This adds `ccache` on the Android build to speedup the building process. ## Changelog: [INTERNAL] - Adding ccache for Android builds Pull Request resolved: https://github.com/facebook/react-native/pull/45662 Test Plan: CI Reviewed By: cipolleschi Differential Revision: D60229625 Pulled By: cortinico fbshipit-source-id: bc7e416f4ed1b4932159feb672947669bfb498d7
This commit is contained in:
committed by
Facebook GitHub Bot
parent
ea4005bef4
commit
eae2240bfc
@@ -14,10 +14,21 @@ runs:
|
||||
- name: Set React Native Version
|
||||
shell: bash
|
||||
run: node ./scripts/releases/set-rn-artifacts-version.js --build-type ${{ inputs.release-type }}
|
||||
- name: Show ccache stats
|
||||
shell: bash
|
||||
run: ccache -s
|
||||
- name: Setup gradle
|
||||
uses: ./.github/actions/setup-gradle
|
||||
with:
|
||||
cache-read-only: "false"
|
||||
- name: Restore Android ccache
|
||||
uses: actions/cache/restore@v4
|
||||
with:
|
||||
path: .ccache
|
||||
key: v1-ccache-android-${{ github.job }}-${{ github.sha }}
|
||||
restore-keys: |
|
||||
v1-ccache-android-${{ github.job }}-
|
||||
v1-ccache-android-
|
||||
- name: Build and publish all the Android Artifacts to /tmp/maven-local
|
||||
shell: bash
|
||||
run: |
|
||||
@@ -34,6 +45,15 @@ runs:
|
||||
TASKS="publishAllToMavenTempLocal publishAndroidToSonatype build"
|
||||
fi
|
||||
./gradlew $TASKS -PenableWarningsAsErrors=true
|
||||
- name: Save Android ccache
|
||||
if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, '-stable') }}
|
||||
uses: actions/cache/save@v4
|
||||
with:
|
||||
path: .ccache
|
||||
key: v1-ccache-android-${{ github.job }}-${{ github.sha }}
|
||||
- name: Show ccache stats
|
||||
shell: bash
|
||||
run: ccache -s
|
||||
- name: Upload Maven Artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
|
||||
Reference in New Issue
Block a user