forked from mapbox/mapbox-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcircle.yml
More file actions
88 lines (86 loc) · 2.43 KB
/
circle.yml
File metadata and controls
88 lines (86 loc) · 2.43 KB
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
version: 2
workflows:
version: 2
default:
jobs:
- build
- release:
filters:
tags:
only: /v.*/
jobs:
build:
working_directory: ~/code
docker:
- image: mbgl/android-ndk-r19:8e91a7ebab
environment:
JVM_OPTS: -Xmx3200m
BUILDTYPE: Debug
IS_LOCAL_DEVELOPMENT: false
steps:
- checkout
- restore_cache:
key: jars-{{ checksum "build.gradle" }}
- save_cache:
paths:
- ~/.gradle
key: jars-{{ checksum "build.gradle" }}
- run:
name: Check Java code style
command: make checkstyle
- run:
name: Jacoco test report
command: ./gradlew jacocoTestReport
- run:
name: Run unit-test for all modules
command: make test
- store_artifacts:
path: mapbox/app/build/reports
destination: reports
- store_test_results:
path: mapbox/app/build/test-results
- run:
name: Post code coverage report to Codecov.io
command: |
bash <(curl -s https://codecov.io/bash)
# ------------------------------------------------------------------------------
release:
branch:
only:
- master
docker:
- image: mbgl/android-ndk-r19:8e91a7ebab
working_directory: ~/code
environment:
BUILDTYPE: Release
IS_LOCAL_DEVELOPMENT: false
steps:
- checkout
- run:
name: Generate Maven credentials
command: |
if [ -n "${BINTRAY_USER}" ]; then
echo "BINTRAY_USER=$BINTRAY_USER
BINTRAY_API_KEY=$BINTRAY_API_KEY
GPG_PASSPHRASE=$GPG_PASSPHRASE"
fi
- run:
name: Update version name
command: |
if [[ $CIRCLE_TAG == v* ]]; then
sed -i -e "s/^VERSION_NAME=.*/VERSION_NAME=${CIRCLE_TAG:1}/" gradle.properties
fi
- run:
name: Build Java libraries
command: make build-release
- deploy:
name: Publish Java libraries to Bintray
command: |
if [[ $CIRCLE_BRANCH == master ]] || [[ $CIRCLE_TAG == v* ]]; then
version=$(cat gradle.properties | grep "VERSION_NAME")
if [[ $version != *"SNAPSHOT"* ]]; then
make publish-to-bintray
else
make publish-snapshot
fi
fi