Skip to content

Commit e17c182

Browse files
committed
ci: Fix builds failing with Xcode 12
1 parent 679c6d5 commit e17c182

File tree

5 files changed

+1364
-1203
lines changed

5 files changed

+1364
-1203
lines changed

.circleci/Brewfile.android

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
tap 'homebrew/cask'
2+
cask 'android-sdk'
3+
cask 'intel-haxm'

.circleci/Brewfile.ios

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
tap 'wix/brew'
2+
brew 'applesimutils'

.circleci/config.yml

Lines changed: 10 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ checkout step for each job: &addWorkspace
1818
default config for js: &js_defaults
1919
<<: *defaults
2020
docker:
21-
- image: circleci/node:10
21+
- image: circleci/node:12
2222

2323
default config for macOS: &macos_defaults
2424
<<: *defaults
2525
resource_class: 'medium'
2626
macos:
27-
xcode: '10.1.0'
27+
xcode: '11.7.0'
2828

2929
default config for android apk builds: &android_defaults
3030
<<: *defaults
@@ -41,31 +41,6 @@ default config for android apk builds: &android_defaults
4141
# CACHE CONFIG
4242
# ==============================
4343

44-
# brew
45-
save brew cache: &cache_save_brew
46-
name: Saving Brew cache
47-
paths:
48-
- /usr/local/Homebrew
49-
- ~/Library/Caches/Homebrew
50-
key: legacy-brew-cache-{{ arch }}
51-
52-
restore brew cache: &cache_restore_brew
53-
name: Restoring Brew cache
54-
keys:
55-
- legacy-brew-cache-{{ arch }}
56-
57-
save brew cache for android: &cache_save_brew_android
58-
name: Saving Brew cache for android
59-
paths:
60-
- /usr/local/Homebrew
61-
- ~/Library/Caches/Homebrew
62-
key: legacy-brew-cache-{{ arch }}-android
63-
64-
restore brew cache for android: &cache_restore_brew_android
65-
name: Restoring Brew cache for android
66-
keys:
67-
- legacy-brew-cache-{{ arch }}-android
68-
6944
# yarn
7045
save yarn cache: &cache_save_yarn
7146
name: Saving Yarn cache
@@ -141,16 +116,12 @@ jobs:
141116
<<: *macos_defaults
142117
steps:
143118
- *addWorkspace
144-
- restore-cache: *cache_restore_brew
145119
- run:
146-
name: Configure OSX Environment
120+
name: Configure macOS Environment
147121
command: |
148-
HOMEBREW_NO_AUTO_UPDATE=1 brew install node@8 >/dev/null
149-
HOMEBREW_NO_AUTO_UPDATE=1 brew tap wix/brew >/dev/null
150-
HOMEBREW_NO_AUTO_UPDATE=1 brew install applesimutils >/dev/null
122+
brew bundle --file=.circleci/Brewfile.ios --no-lock
151123
touch .watchmanconfig
152124
node -v
153-
- save-cache: *cache_save_brew
154125
- restore-cache: *cache_restore_yarn
155126
- run:
156127
name: Installing Yarn dependencies
@@ -223,25 +194,20 @@ jobs:
223194
source $BASH_ENV
224195
225196
# Android tools
226-
- restore-cache: *cache_restore_brew_android
227197
- run:
228198
name: Install Android SDK tools
229199
command: |
230-
HOMEBREW_NO_AUTO_UPDATE=1 brew tap homebrew/cask >/dev/null
231-
HOMEBREW_NO_AUTO_UPDATE=1 brew cask install android-sdk >/dev/null
232-
HOMEBREW_NO_AUTO_UPDATE=1 brew cask install intel-haxm >/dev/null
233-
HOMEBREW_NO_AUTO_UPDATE=1 brew install node@8 >/dev/null >/dev/null
234-
- save-cache: *cache_save_brew_android
200+
brew bundle --file=.circleci/Brewfile.android --no-lock
235201
236202
- run:
237203
name: Install Android emulator
238204
shell: /bin/bash -e
239205
command: |
240-
yes | sdkmanager "platform-tools" "tools" >/dev/null
241-
yes | sdkmanager "platforms;android-28" "system-images;android-21;google_apis;x86" >/dev/null
242-
yes | sdkmanager "emulator" --channel=3 >/dev/null
243-
yes | sdkmanager "build-tools;28.0.3" >/dev/null
244-
yes | sdkmanager --licenses >/dev/null
206+
yes | sdkmanager "platform-tools" "tools" 1> /dev/null
207+
yes | sdkmanager "platforms;android-28" "system-images;android-21;google_apis;x86" 1> /dev/null
208+
yes | sdkmanager "emulator" --channel=3 1> /dev/null
209+
yes | sdkmanager "build-tools;28.0.3" 1> /dev/null
210+
yes | sdkmanager --licenses 1> /dev/null
245211
yes | sdkmanager --list
246212
247213
- run:

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,13 @@
6868
"@react-native-community/cli-platform-android": "^3.1.0",
6969
"@react-native-community/cli-platform-ios": "^3.1.0",
7070
"@react-native-community/eslint-config": "^0.0.5",
71-
"babel-jest": "^24.9.0",
71+
"babel-jest": "^26.5.2",
7272
"babel-plugin-module-resolver": "3.1.3",
73-
"detox": "12.6.1",
73+
"detox": "16.7.2",
7474
"eslint": "5.1.0",
7575
"expo": "36.0.2",
7676
"flow-bin": "0.105.2",
77-
"jest": "^24.9.0",
77+
"jest": "^26.5.3",
7878
"metro": "0.56.4",
7979
"metro-react-native-babel-preset": "^0.56.0",
8080
"react": "16.9.0",
@@ -97,9 +97,9 @@
9797
"configurations": {
9898
"ios": {
9999
"binaryPath": "example/ios/build/Build/Products/Release-iphonesimulator/AsyncStorageExample.app",
100-
"build": ".circleci/scripts/run_ios_e2e.sh \"iPhone X\"",
100+
"build": ".circleci/scripts/run_ios_e2e.sh \"iPhone 11\"",
101101
"type": "ios.simulator",
102-
"name": "iPhone X"
102+
"name": "iPhone 11"
103103
},
104104
"android": {
105105
"binaryPath": "example/android/app/build/outputs/apk/release/app-release.apk",

0 commit comments

Comments
 (0)