forked from spinnaker/clouddriver
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.yml
69 lines (60 loc) · 1.98 KB
/
config.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
59
60
61
62
63
64
65
66
67
#CircleCI config schema is versioned.
version: 2.1
# orbs are config packages to include.
orbs:
gradle: circleci/[email protected]
slack: circleci/[email protected]
workflows:
build_and_test:
jobs:
- build
jobs:
build:
machine: true
parallelism: 12
resource_class: xlarge
steps:
- checkout
- run:
name: Open permissions on cache dir
command: sudo chmod -R a+rwx /root
- run:
name: Generate Cache Checksum
command: find . -name 'build.gradle' | sort | xargs cat | shasum | awk '{print
$1}' > /tmp/gradle_cache_seed
- restore_cache:
keys:
- gradle-{{ checksum "/tmp/gradle_cache_seed" }}
- gradle-
- run:
name: Install
command: |
GRADLE="./gradlew -PenablePublishing=true --no-daemon --max-workers=12"
export GRADLE_OPTS="-Xmx16g -Xms16g"
if [ "x$CIRCLE_PULL_REQUEST" != "x" ]; then
echo -e "Assemble Pull Request #$CIRCLE_PULL_REQUEST => Branch [$CIRCLE_BRANCH]"
$GRADLE assemble
else
echo -e 'WARN: Only building on CircleCI'
$GRADLE assemble
fi
- run:
name: Build
command: |
GRADLE="./gradlew -PenablePublishing=true --no-daemon --max-workers=12"
#export GRADLE_OPTS="-XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap"
export GRADLE_OPTS="-Xmx16g -Xms16g"
if [ "x$CIRCLE_PULL_REQUEST" != "x" ]; then
echo -e "Build Pull Request #$CIRCLE_PULL_REQUEST => Branch [$CIRCLE_BRANCH]"
$GRADLE build javadoc
else
echo -e 'WARN: Only building on CircleCI'
$GRADLE build
fi
- save_cache:
when: always
paths:
- ~/.gradle/caches
- ~/.gradle/wrapper
key: gradle-{{ checksum "/tmp/gradle_cache_seed" }}
#- slack/notify