forked from facebook/litho
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcircle.yml
50 lines (47 loc) · 1.57 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
machine:
environment:
TERM: 'dumb'
PATH: "/home/ubuntu/buck/bin:$PATH"
ANDROID_HOME: '/home/ubuntu/android-sdk'
ANDROID_NDK_REPOSITORY: "/home/ubuntu/android-ndk"
GRADLE_OPTS: '-Dorg.gradle.jvmargs="-Xms512m -Xmx1024m -XX:+HeapDumpOnOutOfMemoryError"'
_JAVA_OPTIONS: '-Xms512m -Xmx1024m'
java:
version: 'oraclejdk8'
dependencies:
pre:
- "[ -n \"$KEY\" ] && openssl aes-256-cbc -d -in scripts/setup-keys.enc -k $KEY >> gradle.properties || true"
# Manually override key to limit exposure
- export KEY="<unset>"
override:
# Buck and Android
- if [[ ! -e /home/ubuntu/buck ]]; then git clone https://github.com/facebook/buck.git /home/ubuntu/buck; fi
- cd /home/ubuntu/buck && ant
- buck --version
- source scripts/circle-ci-android-setup.sh && installAndroidSDK
- buck fetch //...
cache_directories:
- "/home/ubuntu/buck"
- "/home/ubuntu/android-sdk"
test:
override:
# Build the samples first
- buck build sample
- buck build sample-barebones
- buck build sample-codelab
# Run the tests with Buck
- buck test litho-it/src/test/... --config build.threads=1
- buck test litho-it-powermock/src/test/... --config build.threads=1
# Run the tests with Gradle
- ./gradlew test
post:
# Collect the JUnit reports
- mkdir -p $CIRCLE_TEST_REPORTS/junit/
- find . -type f -regex ".*/build/test-results/.*xml" -exec cp {} $CIRCLE_TEST_REPORTS/junit/ \;
# Publish snapshot
- scripts/circle-ci-publish-snapshot.sh
experimental:
notify:
branches:
only:
- master