-
Notifications
You must be signed in to change notification settings - Fork 585
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4908 from realm/iamer/ios-test-ccache
use ccache in test job to speed up test app builds
- Loading branch information
Showing
5 changed files
with
59 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -121,6 +121,8 @@ jobs: | |
run: | | ||
echo "/usr/lib/ccache:/usr/local/opt/ccache/libexec" >> $GITHUB_PATH | ||
# in CI file timestamps change with every run so instead rely on file content hashing | ||
# https://reactnative.dev/docs/build-speed#using-this-approach-on-a-ci | ||
- name: Configure ccache | ||
if: ${{ runner.os != 'Windows' }} | ||
run: ccache --set-config="compiler_check=content" | ||
|
@@ -167,7 +169,7 @@ jobs: | |
MOCHA_REMOTE_EXIT_ON_ERROR: true | ||
SPAWN_LOGCAT: true | ||
# Pin the Xcode version | ||
DEVELOPER_DIR: /Applications/Xcode_12.5.1.app | ||
DEVELOPER_DIR: /Applications/Xcode_13.1.app | ||
runs-on: ${{ matrix.variant.runner }} | ||
strategy: | ||
fail-fast: false | ||
|
@@ -179,12 +181,12 @@ jobs: | |
#- { os: windows, target: test, runner: windows-latest, environment: node} | ||
#- { os: windows, target: "test:main", runner: windows-latest, environment: electron } | ||
#- { os: windows, target: "test:renderer", runner: windows-latest, environment: electron } | ||
- { os: darwin, target: "test:main", runner: macos-11, environment: electron } | ||
- { os: darwin, target: "test:renderer", runner: macos-11, environment: electron } | ||
- { os: darwin, target: test, runner: macos-11, environment: node } | ||
- { os: android, target: "test:android", runner: macos-11, environment: react-native } | ||
- { os: ios, target: "test:ios", runner: macos-11, environment: react-native } | ||
#- { os: ios, target: "test:catalyst", runner: macos-11, environment: react-native } | ||
- { os: darwin, target: "test:main", runner: macos-latest, environment: electron } | ||
- { os: darwin, target: "test:renderer", runner: macos-latest, environment: electron } | ||
- { os: darwin, target: test, runner: macos-latest, environment: node } | ||
- { os: android, target: "test:android", runner: macos-latest, environment: react-native, arch: "armeabi-v7a" } | ||
- { os: ios, target: "test:ios", runner: macos-latest, environment: react-native, arch: "apple" } | ||
#- { os: ios, target: "test:catalyst", runner: macos-latest, environment: react-native, arch: "apple" } | ||
timeout-minutes: 60 | ||
steps: | ||
- name: Generate Cluster Differentiator | ||
|
@@ -240,6 +242,19 @@ jobs: | |
if: ${{ runner.os == 'Windows' }} | ||
uses: ilammy/msvc-dev-cmd@v1 | ||
|
||
- name: ccache | ||
uses: hendrikmuhs/ccache-action@v1 | ||
if: ${{ matrix.variant.environment == 'react-native' }} | ||
with: | ||
key: ${{ runner.os }}-${{ matrix.variant.os }}-${{ matrix.variant.arch }} | ||
max-size: '2.0G' | ||
|
||
# in CI file timestamps change with every run so instead rely on file content hashing | ||
# https://reactnative.dev/docs/build-speed#using-this-approach-on-a-ci | ||
- name: Configure ccache | ||
if: ${{ matrix.variant.environment == 'react-native' }} | ||
run: ccache --set-config="compiler_check=content" | ||
|
||
- name: Install IOS tools | ||
if: ${{ (matrix.variant.os == 'ios') }} | ||
run: | | ||
|
@@ -295,6 +310,17 @@ jobs: | |
timeout-minutes: 45 | ||
run: ${{ env.wrapper }} npm run ${{ matrix.variant.target}} --prefix integration-tests/environments/${{ matrix.variant.environment }} | ||
|
||
- name: Setup Java Gradle cache for android test app | ||
if: ${{ (matrix.variant.os == 'android') }} | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.gradle/caches | ||
~/.gradle/wrapper | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | ||
restore-keys: | | ||
${{ runner.os }}-gradle- | ||
- name: Setup Android Emulator cache | ||
if: ${{ (matrix.variant.os == 'android') }} | ||
uses: actions/[email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters