Skip to content

Commit f5357af

Browse files
committed
split up in multiple (parallel) build modules
1 parent eefdfd2 commit f5357af

5 files changed

Lines changed: 103 additions & 58 deletions

File tree

.github/workflows/ci.yml

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,25 @@ name: CI
33
on: [push]
44

55
jobs:
6+
67
build:
8+
79
runs-on: ubuntu-latest
10+
strategy:
11+
matrix:
12+
# The MODULE environment variable is evaluated in build-all.sh to run a subset
13+
# of the builds. This way, multiple modules can be built in parallel.
14+
module:
15+
- module1
16+
- module2
17+
- module3
18+
- module4
19+
820
steps:
21+
922
- name: "Checkout sources"
1023
uses: actions/checkout@v1
24+
1125
- name: "Setup Java"
1226
uses: actions/setup-java@v1
1327
env:
@@ -18,5 +32,9 @@ jobs:
1832
AWS_REGION: ${{ secrets.AWSREGION }}
1933
with:
2034
java-version: 13
21-
- name: "Build all modules"
22-
run: chmod 755 build-all.sh && ./build-all.sh
35+
36+
- name: "Build module ${{ matrix.module }}"
37+
with:
38+
MODULE: ${{ matrix.module }}
39+
run: |
40+
chmod 755 build-all.sh && ./build-all.sh

build-all.sh

Lines changed: 81 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -81,58 +81,85 @@ build_maven_module() {
8181
}
8282
}
8383

84-
build_maven_module "spring-boot/spring-boot-kafka"
85-
build_maven_module "resilience4j/retry"
86-
build_maven_module "solid/lsp"
87-
run_gradle_task "spring-boot/thymeleaf-vue" "npmInstall"
88-
build_gradle_module "spring-boot/thymeleaf-vue"
89-
build_gradle_module "spring-boot/spring-boot-springdoc"
90-
build_maven_module "spring-boot/dependency-injection"
91-
build_maven_module "spring-boot/spring-boot-openapi"
92-
build_maven_module "spring-boot/data-migration/liquibase"
93-
build_gradle_module "spring-boot/boundaries"
94-
build_gradle_module "spring-boot/argumentresolver"
95-
build_gradle_module "spring-data/spring-data-jdbc-converter"
96-
build_gradle_module "solid"
97-
build_gradle_module "spring-boot/data-migration/flyway"
98-
build_gradle_module "reactive"
99-
build_gradle_module "junit/assumptions"
100-
build_gradle_module "logging"
101-
build_gradle_module "pact/pact-feign-consumer"
102-
# currently disabled since the consumer build won't run
103-
# build_gradle_module "pact/pact-message-consumer"
104-
# build_gradle_module "pact/pact-message-producer"
105-
build_gradle_module "pact/pact-spring-provider"
106-
build_gradle_module "patterns"
107-
build_gradle_module "spring-boot/conditionals"
108-
build_gradle_module "spring-boot/configuration"
109-
build_gradle_module "spring-boot/mocking"
110-
build_gradle_module "spring-boot/modular"
111-
build_gradle_module "spring-boot/paging"
112-
build_gradle_module "spring-boot/rabbitmq-event-brokering"
113-
build_gradle_module "spring-boot/spring-boot-logging"
114-
build_gradle_module "spring-boot/spring-boot-testing"
115-
build_gradle_module "spring-boot/starter"
116-
build_gradle_module "spring-boot/startup"
117-
build_gradle_module "spring-boot/static"
118-
build_gradle_module "spring-boot/validation"
119-
build_gradle_module "spring-boot/profiles"
120-
build_gradle_module "spring-boot/password-encoding"
121-
build_gradle_module "spring-boot/testcontainers"
122-
build_gradle_module "spring-boot/hazelcast/hazelcast-embedded-cache"
123-
build_gradle_module "spring-boot/hazelcast/hazelcast-client-server"
124-
build_gradle_module "spring-boot/cache"
125-
build_gradle_module "spring-cloud/feign-with-spring-data-rest"
126-
build_gradle_module "spring-cloud/sleuth-downstream-service"
127-
build_gradle_module "spring-cloud/sleuth-upstream-service"
128-
build_gradle_module "spring-cloud/spring-cloud-contract-consumer"
129-
build_gradle_module "spring-cloud/spring-cloud-contract-provider"
130-
build_gradle_module "spring-data/spring-data-rest-associations"
131-
build_gradle_module "spring-data/spring-data-rest-springfox"
132-
build_gradle_module "tools/jacoco"
133-
build_maven_module "aws/localstack"
84+
if [[ "$MODULE" == "module1" ]]
85+
then
86+
build_maven_module "spring-boot/spring-boot-kafka"
87+
build_gradle_module "spring-boot/thymeleaf-vue"
88+
build_gradle_module "spring-boot/spring-boot-springdoc"
89+
build_maven_module "spring-boot/dependency-injection"
90+
build_maven_module "spring-boot/spring-boot-openapi"
91+
build_maven_module "spring-boot/data-migration/liquibase"
92+
build_gradle_module "spring-boot/boundaries"
93+
build_gradle_module "spring-boot/argumentresolver"
94+
build_gradle_module "spring-boot/data-migration/flyway"
95+
run_gradle_task "spring-boot/thymeleaf-vue" "npmInstall"
96+
build_gradle_module "spring-boot/conditionals"
97+
build_gradle_module "spring-boot/configuration"
13498

135-
echo ""
136-
echo "+++"
137-
echo "+++ ALL MODULES SUCCESSFUL"
138-
echo "+++"
99+
echo ""
100+
echo "+++"
101+
echo "+++ MODULE 1 SUCCESSFUL"
102+
echo "+++"
103+
fi
104+
105+
if [[ "$MODULE" == "module2" ]]
106+
then
107+
build_maven_module "resilience4j/retry"
108+
build_maven_module "solid/lsp"
109+
build_gradle_module "spring-data/spring-data-jdbc-converter"
110+
build_gradle_module "solid"
111+
build_gradle_module "reactive"
112+
build_gradle_module "junit/assumptions"
113+
build_gradle_module "logging"
114+
build_gradle_module "pact/pact-feign-consumer"
115+
116+
echo ""
117+
echo "+++"
118+
echo "+++ MODULE 2 SUCCESSFUL"
119+
echo "+++"
120+
fi
121+
122+
if [[ "$MODULE" == "module3" ]]
123+
then
124+
build_gradle_module "pact/pact-spring-provider"
125+
build_gradle_module "patterns"
126+
build_gradle_module "spring-cloud/feign-with-spring-data-rest"
127+
build_gradle_module "spring-cloud/sleuth-downstream-service"
128+
build_gradle_module "spring-cloud/sleuth-upstream-service"
129+
build_gradle_module "spring-cloud/spring-cloud-contract-consumer"
130+
build_gradle_module "spring-cloud/spring-cloud-contract-provider"
131+
build_gradle_module "spring-data/spring-data-rest-associations"
132+
build_gradle_module "spring-data/spring-data-rest-springfox"
133+
build_gradle_module "tools/jacoco"
134+
build_maven_module "aws/localstack"
135+
136+
echo ""
137+
echo "+++"
138+
echo "+++ MODULE 3 SUCCESSFUL"
139+
echo "+++"
140+
fi
141+
142+
if [[ "$MODULE" == "module4" ]]
143+
then
144+
build_gradle_module "spring-boot/mocking"
145+
build_gradle_module "spring-boot/modular"
146+
build_gradle_module "spring-boot/paging"
147+
build_gradle_module "spring-boot/rabbitmq-event-brokering"
148+
build_gradle_module "spring-boot/spring-boot-logging"
149+
build_gradle_module "spring-boot/spring-boot-testing"
150+
build_gradle_module "spring-boot/starter"
151+
build_gradle_module "spring-boot/startup"
152+
build_gradle_module "spring-boot/static"
153+
build_gradle_module "spring-boot/validation"
154+
build_gradle_module "spring-boot/profiles"
155+
build_gradle_module "spring-boot/password-encoding"
156+
build_gradle_module "spring-boot/testcontainers"
157+
build_gradle_module "spring-boot/hazelcast/hazelcast-embedded-cache"
158+
build_gradle_module "spring-boot/hazelcast/hazelcast-client-server"
159+
build_gradle_module "spring-boot/cache"
160+
161+
echo ""
162+
echo "+++"
163+
echo "+++ MODULE 4 SUCCESSFUL"
164+
echo "+++"
165+
fi

patterns/gradlew

100644100755
File mode changed.

spring-boot/starter/application/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ plugins {
66

77
group = 'io.reflectoring'
88
version = '0.0.1-SNAPSHOT'
9-
sourceCompatibility = '13'
9+
sourceCompatibility = '11'
1010

1111
repositories {
1212
mavenCentral()

spring-boot/starter/event-starter/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ plugins {
55

66
group = 'io.reflectoring'
77
version = '0.0.1-SNAPSHOT'
8-
sourceCompatibility = '13'
8+
sourceCompatibility = '11'
99

1010
repositories {
1111
mavenCentral()

0 commit comments

Comments
 (0)