-
Notifications
You must be signed in to change notification settings - Fork 592
/
config.yml
136 lines (130 loc) · 4.04 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
version: 2.1
jobs:
test-multi-arch:
parameters:
platform:
type: string
environment:
_JAVA_OPTIONS: "-Xms512m -Xmx1g"
DOCKER_CLI_EXPERIMENTAL: "enabled"
working_directory: ~/workspace
machine:
image: ubuntu-2004:202107-02
steps:
- checkout
- run: |
# install required qemu libraries
docker run --rm --privileged tonistiigi/binfmt:latest --install all
# run docker container with qemu emulation
docker run --rm \
--platform << parameters.platform >> \
--name qemu-cross-<< parameters.platform >> \
--mount type=bind,source=${PWD},target=/github_workspace \
--workdir /github_workspace \
<< parameters.platform >>/eclipse-temurin:11-jdk-focal uname -a; ./gradlew --no-daemon -PmaxParallelForks=1 build
- run:
command: mkdir ~/test-results
- run:
command: find ~/workspace -type f -regex ".*/test-results/.*xml" -exec ln {} ~/test-results/ \;
- store_test_results:
path: ~/test-results
- store_artifacts:
path: ~/test-results
build:
environment:
_JAVA_OPTIONS: "-Xms512m -Xmx1g"
working_directory: ~/workspace
docker:
- image: cimg/openjdk:11.0
steps:
- checkout
- restore_cache:
key: dependency-cache-{{ checksum "build.gradle" }}
- run:
command: ./gradlew --no-daemon clean javadoc
- run:
# run static analysis tasks standalone to avoid OOME in CircleCI
command: ./gradlew --max-workers=1 --no-daemon analyze
- run:
no_output_timeout: 15m
command: ./gradlew --no-daemon -PmaxParallelForks=1 build
- save_cache:
key: dependency-cache-{{ checksum "build.gradle" }}
paths:
- ~/.gradle
- run:
command: mkdir ~/test-results
- run:
command: find ~/workspace -type f -regex ".*/test-results/.*xml" -exec ln {} ~/test-results/ \;
- store_test_results:
path: ~/test-results
- store_artifacts:
path: ~/test-results
- store_artifacts:
path: build/libs
integration-test:
environment:
_JAVA_OPTIONS: "-Xms512m -Xmx1g"
working_directory: ~/workspace
docker:
- image: cimg/openjdk:11.0
steps:
- checkout
- restore_cache:
key: dependency-cache-{{ checksum "build.gradle" }}
- run:
command: ./gradlew --no-daemon -PmaxParallelForks=1 clean integrationTest
- save_cache:
key: dependency-cache-{{ checksum "build.gradle" }}
paths:
- ~/.gradle
- run:
command: mkdir ~/test-results
- run:
command: find ~/workspace -type f -regex ".*/test-results/.*xml" -exec ln {} ~/test-results/ \;
- store_test_results:
path: ~/test-results
- store_artifacts:
path: ~/test-results
publish:
working_directory: ~/workspace
docker:
- image: cimg/openjdk:11.0
steps:
- checkout
- restore_cache:
key: dependency-cache-{{ checksum "build.gradle" }}
- run:
command: ./gradlew :artifactoryPublish :cruise-control:artifactoryPublish :cruise-control-core:artifactoryPublish :cruise-control-metrics-reporter:artifactoryPublish
workflows:
version: 2.1
build-and-publish:
jobs:
- test-multi-arch:
matrix:
parameters:
platform: ["s390x"]
filters:
tags:
only: /.*/
- build:
filters:
tags:
only: /.*/
- integration-test:
requires:
- build
- test-multi-arch
filters:
branches:
ignore: /.*/
tags:
only: /^[0-9]+\.[0-9]+\.[0-9]+(?:-[a-zA-Z0-9_]+)?$/
- publish:
requires:
- integration-test
filters:
branches:
ignore: /.*/
tags:
only: /^[0-9]+\.[0-9]+\.[0-9]+(?:-[a-zA-Z0-9_]+)?$/