Added an option to build the project in parallel
with this change we've added some scripts to run the build in parallel. It makes the build ~ 2 times faster fixes #190
This commit is contained in:
33
README.adoc
33
README.adoc
@@ -1639,3 +1639,36 @@ cd spring-cloud-contract-tools/spring-cloud-contract-gradle-plugin
|
||||
./gradlew clean build
|
||||
```
|
||||
|
||||
=== Helpful scripts
|
||||
|
||||
We're providing a couple of helpful scripts to build the project.
|
||||
|
||||
To build the project in parallel (by default uses 4 cores but you can change it)
|
||||
|
||||
```
|
||||
./scripts/parallelBuild.sh
|
||||
```
|
||||
|
||||
and with 8 cores
|
||||
|
||||
```
|
||||
CORES=8 ./scripts/parallelBuild.sh
|
||||
```
|
||||
|
||||
To build the project without any integration tests (by default uses 1 core)
|
||||
|
||||
```
|
||||
./scripts/noIntegration.sh
|
||||
```
|
||||
|
||||
and with 8 cores
|
||||
|
||||
```
|
||||
CORES=8 ./scripts/noIntegration.sh
|
||||
```
|
||||
|
||||
To generate the documentation (both the root one and the maven plugin one)
|
||||
|
||||
```
|
||||
./scripts/generateDocs.sh
|
||||
```
|
||||
|
||||
@@ -51,4 +51,37 @@ cd spring-cloud-contract-tools/spring-cloud-contract-gradle-plugin
|
||||
./gradlew clean build
|
||||
```
|
||||
|
||||
=== Helpful scripts
|
||||
|
||||
We're providing a couple of helpful scripts to build the project.
|
||||
|
||||
To build the project in parallel (by default uses 4 cores but you can change it)
|
||||
|
||||
```
|
||||
./scripts/parallelBuild.sh
|
||||
```
|
||||
|
||||
and with 8 cores
|
||||
|
||||
```
|
||||
CORES=8 ./scripts/parallelBuild.sh
|
||||
```
|
||||
|
||||
To build the project without any integration tests (by default uses 1 core)
|
||||
|
||||
```
|
||||
./scripts/noIntegration.sh
|
||||
```
|
||||
|
||||
and with 8 cores
|
||||
|
||||
```
|
||||
CORES=8 ./scripts/noIntegration.sh
|
||||
```
|
||||
|
||||
To generate the documentation (both the root one and the maven plugin one)
|
||||
|
||||
```
|
||||
./scripts/generateDocs.sh
|
||||
```
|
||||
|
||||
|
||||
10
scripts/noIntegration.sh
Executable file
10
scripts/noIntegration.sh
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
source common.sh || source scripts/common.sh || echo "No common.sh script found..."
|
||||
|
||||
set -e
|
||||
|
||||
[[ -z "${CORES}" ]] && CORES=1
|
||||
echo -e "\n\nRUNNING FAST BUILD (NO INTEGRATION TESTS) WITH [${CORES}] CORES\n\n"
|
||||
|
||||
./mvnw clean install -Pdocs,fast -T ${CORES}
|
||||
10
scripts/parallelBuild.sh
Executable file
10
scripts/parallelBuild.sh
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
source common.sh || source scripts/common.sh || echo "No common.sh script found..."
|
||||
|
||||
set -e
|
||||
|
||||
[[ -z "${CORES}" ]] && CORES=8
|
||||
echo -e "\n\nRUNNING PARALLEL BUILD WITH [${CORES}] CORES\n\n"
|
||||
|
||||
./mvnw clean install -Pintegration,docs -T ${CORES} -Dinvoker.parallelThreads=${CORES}
|
||||
@@ -247,6 +247,7 @@
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-project-info-reports-plugin</artifactId>
|
||||
<version>2.9</version>
|
||||
<reportSets>
|
||||
<reportSet>
|
||||
<reports>
|
||||
|
||||
Reference in New Issue
Block a user