This is an automated email from the ASF dual-hosted git repository.
apupier pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new f434910d690e CAMEL-24318 - improve regen.sh
f434910d690e is described below
commit f434910d690e8e76835c7db4a600072ca1fe70e4
Author: Aurélien Pupier <[email protected]>
AuthorDate: Thu Jul 30 16:32:09 2026 +0200
CAMEL-24318 - improve regen.sh
* use multithreads for Maven to improve performance. locally with 22
cores, it divided the time by 2. On GitHub CI, it won't be that much as
there is only 4 Cores currently
* remove x option from git clean to avoid removing the files which are
part of .gitignore, for instance all IDE related files
* renamed the build log to avoid overriding the first one and to be able
to keep both of them
Signed-off-by: Aurélien Pupier <[email protected]>
---
.github/workflows/main-build.yml | 4 +++-
.github/workflows/pr-build-main.yml | 5 ++++-
etc/scripts/regen.sh | 14 +++++++-------
3 files changed, 14 insertions(+), 9 deletions(-)
diff --git a/.github/workflows/main-build.yml b/.github/workflows/main-build.yml
index 74a0b9a6cdef..63eb7006b23d 100644
--- a/.github/workflows/main-build.yml
+++ b/.github/workflows/main-build.yml
@@ -70,7 +70,9 @@ jobs:
if: always()
with:
name: main-build-${{ matrix.java }}.log
- path: build.log
+ path: |
+ build-regen.log
+ build-regen-catalog.log
- name: Save Atlassian Maven Cache
uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 #
v6.1.0
if: always()
diff --git a/.github/workflows/pr-build-main.yml
b/.github/workflows/pr-build-main.yml
index 5f03ef0aa6ba..35245294967d 100644
--- a/.github/workflows/pr-build-main.yml
+++ b/.github/workflows/pr-build-main.yml
@@ -145,7 +145,10 @@ jobs:
if: always()
with:
name: build-${{ matrix.java }}.log
- path: build.log
+ path: |
+ build.log
+ build-regen.log
+ build-regen-catalog.log
- name: Save Atlassian Maven Cache
uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 #
v6.1.0
if: always()
diff --git a/etc/scripts/regen.sh b/etc/scripts/regen.sh
index 5f4b75f2a69b..6e99507207fd 100755
--- a/etc/scripts/regen.sh
+++ b/etc/scripts/regen.sh
@@ -22,23 +22,23 @@ set -e
cd `dirname "$0"`/../..
# Force clean
-git clean -fdx
+git clean -fd
rm -Rf **/src/generated/
# Regenerate everything
-if ./mvnw --batch-mode -Pregen -DskipTests ${MAVEN_EXTRA_ARGS} install >>
build.log 2>&1; then
+if ./mvnw -T1C --batch-mode -Pregen -DskipTests ${MAVEN_EXTRA_ARGS} install >
build-regen.log 2>&1; then
echo "✅ mvn -Pregen succeeded."
else
- echo "❌ mvn -Pregen failed. Last 50 lines of build.log:"
- tail -n 50 build.log
+ echo "❌ mvn -Pregen failed. Last 50 lines of build-regen.log:"
+ tail -n 50 build-regen.log
exit 1
fi
# One additional pass to get the info for the 'others' jars
-if ./mvnw --batch-mode ${MAVEN_EXTRA_ARGS} install -f catalog/camel-catalog >>
build.log 2>&1; then
+if ./mvnw --batch-mode ${MAVEN_EXTRA_ARGS} install -f catalog/camel-catalog >
build-regen-catalog.log 2>&1; then
echo "✅ mvn install for camel-catalog succeeded."
else
- echo "❌ mvn install for camel-catalog failed. Last 50 lines of build.log:"
- tail -n 50 build.log
+ echo "❌ mvn install for camel-catalog failed. Last 50 lines of
build-regen-catalog.log:"
+ tail -n 50 build-regen-catalog.log
exit 1
fi