forked from keybase/client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
circle.yml
58 lines (58 loc) · 2.5 KB
/
circle.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
machine:
xcode:
version: 7.2
node:
version: 5.7.0
environment:
GOPATH: $HOME/go-path
PATH: $GOROOT/bin:$PATH
# Limit memory usage of gradle
_JAVA_OPTIONS: "-Xms512m -Xmx1024m"
GRADLE_OPTS: '-Dorg.gradle.jvmargs="-Xmx1024m -XX:+HeapDumpOnOutOfMemoryError"'
REACT_NATIVE_MAX_WORKERS: 1
# Some node dependencies break without this
CXX: g++-4.8
general:
build_dir: react-native
dependencies:
pre:
- sudo rm -rf $HOME/go* # Remove old go installation
- sudo rm -rf /usr/local/go* # Remove old go installation
- wget https://storage.googleapis.com/golang/go1.6.linux-amd64.tar.gz -O $HOME/go.tar.gz
- mkdir $HOME/go-path
- (cd $HOME; tar -xzvf go.tar.gz)
- sudo mv $HOME/go /usr/local
- go get golang.org/x/mobile/cmd/gomobile
- if ! $(grep -q "Revision=24.4.1" $ANDROID_HOME/tools/source.properties); then echo y | android update sdk -u -a -t "tools"; fi
- if [ ! -e $ANDROID_HOME/build-tools/23.0.2 ]; then echo y | android update sdk -u -a -t "build-tools-23.0.2"; fi
cache_directories:
- /usr/local/android-sdk-linux/tools
- /usr/local/android-sdk-linux/build-tools/23.0.2
override:
# TODO(mm): use the emulator when we figure out a consistent way of getting this working
# - emulator -avd circleci-android22 -no-audio -no-window:
# background: true
# parallel: true
- npm install
- npm install -g react-native-cli
- $GOPATH/bin/gomobile init
- mkdir -p $GOPATH/src/github.com/keybase
- ln -s $HOME/client $GOPATH/src/github.com/keybase/client
- npm run gobuild-android
- npm run sync
test:
override:
# TODO(mm) uncomment these device tests (see todo above)
# wait for it to have booted
# - circle-android wait-for-boot
# run tests against the emulator.
# - (cd android && ./gradlew connectedAndroidTest)
# copy the build outputs to artifacts
# - cp -r android/app/build/outputs $CIRCLE_ARTIFACTS
# copy the test results to the test results directory.
# - cp -r android/app/build/outputs/androidTest-results/* $CIRCLE_TEST_REPORTS
# Build a debug version of the app
- (cd android && ./gradlew assembleReleaseUnsigned)
# Upload it to appetize
# And grep so we only reveal the public url in the CI logs
- PLATFORM=android PLATFORM_BUILD_PATH="android/app/build/outputs/apk/app-releaseUnsigned.apk" S3_URL="s3://kb-appbuilds/" BUILD_URL="https://s3-us-west-2.amazonaws.com/kb-appbuilds/" ./uploadApp.sh | grep -Eo "\"publicURL\":\"[^\"]*\"|APK_URL:.*$"