Skip to content

Camel Quarkus LTS CI - 3.33.x #19

Camel Quarkus LTS CI - 3.33.x

Camel Quarkus LTS CI - 3.33.x #19

#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
name: Camel Quarkus LTS CI
run-name: Camel Quarkus LTS CI - ${{ github.event.inputs.branch }}.x
on:
workflow_dispatch:
inputs:
branch:
type: choice
description: "The Quarkus maintenance branch to test"
options:
- "3.33"
- "3.27"
- "3.20"
required: true
permissions:
contents: read
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
env:
LANG: en_US.UTF-8
MAVEN_OPTS: -Xmx3000m
CQ_MAVEN_ARGS: -V -ntp -e -Daether.connector.http.connectionMaxTtl=120
TESTCONTAINERS_RYUK_DISABLED: true
jobs:
initial-mvn-install:
if: github.repository == 'apache/camel-quarkus'
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-native-matrix.outputs.matrix }}
examples-matrix: ${{ steps.set-examples-matrix.outputs.examples-matrix }}
cache-key: ${{ steps.maven-cache.outputs.cache-key }}
env:
MAVEN_OPTS: -Xmx4600m
steps:
- name: Check free space on disk
run: |
df -h /
- name: Set up JDK 17
uses: actions/setup-java@ad2b38190b15e4d6bdf0c97fb4fca8412226d287 # v5.3.0
with:
distribution: 'temurin'
java-version: '17'
- name: Build Quarkus
run: |
git clone --depth 1 --branch ${{github.event.inputs.branch}} https://github.com/quarkusio/quarkus.git \
&& cd quarkus \
&& echo "Current Quarkus commit:" $(git rev-parse HEAD) \
&& sed -i '/<module>integration-tests<\/module>/d' pom.xml \
&& ./mvnw ${CQ_MAVEN_ARGS} clean install -Dquickly -Prelocations -T1C
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
ref: ${{ github.event.inputs.branch }}.x
fetch-depth: 0
- name: Setup Maven Cache
id: maven-cache
uses: ./.github/actions/setup-maven-cache
with:
maven-properties: |
jira-rest-client.version
quarkiverse-cxf.version
- name: Set Quarkus SNAPSHOT Version
run: |
sed -i 's/<quarkus.version>.*<\/quarkus.version>/<quarkus.version>${{github.event.inputs.branch}}.999-SNAPSHOT<\/quarkus.version>/' pom.xml
- name: Update extension metadata
run: |
./mvnw -N cq:update-quarkus-metadata ${CQ_MAVEN_ARGS}
- name: mvn clean install -DskipTests
run: |
eval ./mvnw ${CQ_MAVEN_ARGS} ${BRANCH_OPTIONS} clean install -DskipTests -Dquarkus.build.skip -Pformat
- name: Sync Maven properties
run: |
./mvnw cq:sync-versions ${CQ_MAVEN_ARGS} -N
- name: Fail if there are uncommitted changes
shell: bash
run: |
[[ -z $(git status --porcelain | grep -v antora.yml) ]] || { echo 'There are uncommitted changes'; git status; git diff; }
- name: Tar Maven Repo
shell: bash
run: |
tar -I 'zstd -T0' -cf ${{ runner.temp }}/maven-repo.tar.zst -C ~ .m2/repository
ls -lh ${{ runner.temp }}/maven-repo.tar.zst
df -h /
- name: Persist Maven Repo
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: maven-repo
path: ${{ runner.temp }}/maven-repo.tar.zst
retention-days: 1
- name: Save Maven Cache
uses: ./.github/actions/setup-maven-cache
if: always()
with:
action: save
cache-key: ${{ steps.maven-cache.outputs.cache-key }}
- name: Setup Native Test Matrix
id: set-native-matrix
run: |
CATEGORIES=$(yq -M -N -I 0 -o=json e 'keys' tooling/scripts/test-categories.yaml | tr '"' "'")
echo "matrix={'category': ${CATEGORIES}}" >> $GITHUB_OUTPUT
- name: Setup Examples Matrix
id: set-examples-matrix
run: |
EXAMPLES_BRANCH="${{ github.event.inputs.branch }}.x"
sudo apt install groovy -y --no-install-recommends
EXAMPLES_MATRIX=$(groovy -DEXAMPLES_BRANCH=${EXAMPLES_BRANCH} tooling/scripts/generate-examples-matrix.groovy)
echo "examples-matrix=${EXAMPLES_MATRIX}" >> $GITHUB_OUTPUT
native-tests:
name: Native Tests - ${{matrix.category}}
needs: initial-mvn-install
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.initial-mvn-install.outputs.matrix) }}
steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
ref: ${{ github.event.inputs.branch }}.x
fetch-depth: 0
- name: Set Quarkus SNAPSHOT Version
run: |
sed -i 's/<quarkus.version>.*<\/quarkus.version>/<quarkus.version>${{github.event.inputs.branch}}.999-SNAPSHOT<\/quarkus.version>/' pom.xml
- name: Reclaim Disk Space
run: .github/reclaim-disk-space.sh
- name: Set up JDK 17
uses: actions/setup-java@ad2b38190b15e4d6bdf0c97fb4fca8412226d287 # v5.3.0
with:
distribution: 'temurin'
java-version: '17'
- name: Setup Maven Cache
uses: ./.github/actions/setup-maven-cache
with:
cache-key: ${{ needs.initial-mvn-install.outputs.cache-key }}
download-maven-repo: 'true'
- name: Integration Tests
run: |
for MODULE in $(yq -M -N e ".${{ matrix.category }}" tooling/scripts/test-categories.yaml | grep -vE '^\s*#' | cut -f2 -d' '); do
if [[ "${MODULE}" == "null" ]]; then
continue
fi
MODULE="integration-tests/$(echo ${MODULE} | sed 's/^[ \t]*//;s/[ \t]*$//')"
if [[ "x$(./mvnw org.apache.maven.plugins:maven-help-plugin:3.2.0:evaluate -Dexpression=ci.native.tests.skip -DforceStdout -q -f ${MODULE})" == "xtrue" ]]; then
JVM_MODULES+=("${MODULE}")
else
NATIVE_MODULES+=("${MODULE}")
fi
done
if [[ ${#JVM_MODULES[@]} -eq 0 ]] && [[ ${#NATIVE_MODULES[@]} -eq 0 ]]; then
echo "No test modules were found for category ${{ matrix.category }}"
exit 1
fi
IFS=,
if [[ ${JVM_MODULES[@]} ]]; then
eval ./mvnw ${CQ_MAVEN_ARGS} ${BRANCH_OPTIONS} clean test \
-Dformatter.skip -Dimpsort.skip -Denforcer.skip \
-Pdocker,ci \
-pl "${JVM_MODULES[*]}"
fi
if [[ ${NATIVE_MODULES[@]} ]]; then
eval ./mvnw ${CQ_MAVEN_ARGS} ${BRANCH_OPTIONS} clean verify \
-Dformatter.skip -Dimpsort.skip -Denforcer.skip \
-Dquarkus.native.builder-image.pull=missing \
-Pnative,docker,ci \
--fail-at-end \
-pl "${NATIVE_MODULES[*]}"
fi
- name: Report test failures
uses: ./.github/actions/test-summary-report
if: ${{ failure() }}
with:
test-report-xml-base-dir: integration-tests
- name: Fail if there are uncommitted changes
shell: bash
run: |
[[ -z $(git status --porcelain) ]] || { echo 'There are uncommitted changes'; git status; git diff; }
functional-extension-tests:
runs-on: ubuntu-latest
needs: initial-mvn-install
env:
MAVEN_OPTS: -Xmx3000m
steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
ref: ${{ github.event.inputs.branch }}.x
fetch-depth: 0
- name: Set Quarkus SNAPSHOT Version
run: |
sed -i 's/<quarkus.version>.*<\/quarkus.version>/<quarkus.version>${{github.event.inputs.branch}}.999-SNAPSHOT<\/quarkus.version>/' pom.xml
- name: Set up JDK 17
uses: actions/setup-java@ad2b38190b15e4d6bdf0c97fb4fca8412226d287 # v5.3.0
with:
distribution: 'temurin'
java-version: '17'
- name: Setup Maven Cache
uses: ./.github/actions/setup-maven-cache
with:
cache-key: ${{ needs.initial-mvn-install.outputs.cache-key }}
download-maven-repo: 'true'
- name: cd extensions-core && mvn test
run: |
cd extensions-core
../mvnw ${CQ_MAVEN_ARGS} ${BRANCH_OPTIONS} \
-Dformatter.skip -Dimpsort.skip -Denforcer.skip -Dcamel-quarkus.update-extension-doc-page.skip \
--fail-at-end \
test
- name: Report test failures
uses: ./.github/actions/test-summary-report
if: ${{ failure() }}
with:
test-report-xml-base-dir: extensions-core
- name: cd extensions && mvn test
run: |
cd extensions
../mvnw ${CQ_MAVEN_ARGS} ${BRANCH_OPTIONS} \
-Dformatter.skip -Dimpsort.skip -Denforcer.skip -Dcamel-quarkus.update-extension-doc-page.skip \
--fail-at-end \
test
- name: Report test failures
uses: ./.github/actions/test-summary-report
if: ${{ failure() }}
with:
test-report-xml-base-dir: extensions
- name: cd test-framework && mvn test
run: |
cd test-framework
../mvnw ${CQ_MAVEN_ARGS} ${BRANCH_OPTIONS} \
-Dformatter.skip -Dimpsort.skip -Denforcer.skip -Dcamel-quarkus.update-extension-doc-page.skip \
--fail-at-end \
test
- name: Report test failures
uses: ./.github/actions/test-summary-report
if: ${{ failure() }}
with:
test-report-xml-base-dir: test-framework
- name: cd tooling && mvn verify
run: |
cd tooling
../mvnw ${CQ_MAVEN_ARGS} ${BRANCH_OPTIONS} \
-Dformatter.skip -Dimpsort.skip -Denforcer.skip \
--fail-at-end \
verify
- name: Report test failures
uses: ./.github/actions/test-summary-report
if: ${{ failure() }}
with:
test-report-xml-base-dir: tooling
- name: cd catalog && mvn test
run: |
cd catalog
../mvnw ${CQ_MAVEN_ARGS} ${BRANCH_OPTIONS} \
-Dformatter.skip -Dimpsort.skip -Denforcer.skip \
test
- name: Report test failures
uses: ./.github/actions/test-summary-report
if: ${{ failure() }}
with:
test-report-xml-base-dir: catalog
integration-tests-jvm:
runs-on: ubuntu-latest
needs: initial-mvn-install
env:
MAVEN_OPTS: -Xmx3000m
steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
ref: ${{ github.event.inputs.branch }}.x
fetch-depth: 0
- name: Set Quarkus SNAPSHOT Version
run: |
sed -i 's/<quarkus.version>.*<\/quarkus.version>/<quarkus.version>${{github.event.inputs.branch}}.999-SNAPSHOT<\/quarkus.version>/' pom.xml
- name: Set up JDK 17
uses: actions/setup-java@ad2b38190b15e4d6bdf0c97fb4fca8412226d287 # v5.3.0
with:
distribution: 'temurin'
java-version: '17'
- name: Setup Maven Cache
uses: ./.github/actions/setup-maven-cache
with:
cache-key: ${{ needs.initial-mvn-install.outputs.cache-key }}
download-maven-repo: 'true'
- name: cd integration-tests-jvm && mvn clean test
run: |
cd integration-tests-jvm
../mvnw ${CQ_MAVEN_ARGS} ${BRANCH_OPTIONS} \
-Dformatter.skip -Dimpsort.skip -Denforcer.skip \
--fail-at-end \
clean test
- name: Report test failures
uses: ./.github/actions/test-summary-report
if: ${{ failure() }}
with:
test-report-xml-base-dir: integration-tests-jvm
integration-tests-alternative-platform:
runs-on: ${{ matrix.os }}
needs: initial-mvn-install
strategy:
fail-fast: false
matrix:
os: [ 'windows-latest' ]
env:
MAVEN_OPTS: -Xmx3000m
steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
ref: ${{ github.event.inputs.branch }}.x
fetch-depth: 0
- name: Set Quarkus SNAPSHOT Version
shell: bash
run: |
sed -i 's/<quarkus.version>.*<\/quarkus.version>/<quarkus.version>${{github.event.inputs.branch}}.999-SNAPSHOT<\/quarkus.version>/' pom.xml
- name: Set up JDK 17
uses: actions/setup-java@ad2b38190b15e4d6bdf0c97fb4fca8412226d287 # v5.3.0
with:
distribution: 'temurin'
java-version: '17'
- name: Setup Maven Cache
uses: ./.github/actions/setup-maven-cache
with:
cache-key: ${{ needs.initial-mvn-install.outputs.cache-key }}
download-maven-repo: 'true'
- name: cd integration-tests && mvn clean verify
shell: bash
run: |
cd integration-tests
../mvnw ${CQ_MAVEN_ARGS} ${BRANCH_OPTIONS} \
-Dskip-testcontainers-tests -Dformatter.skip -Dimpsort.skip -Denforcer.skip \
--fail-at-end \
clean verify
- name: Report test failures
uses: ./.github/actions/test-summary-report
if: ${{ failure() }}
with:
test-report-xml-base-dir: integration-tests
examples-tests:
name: Examples Tests - ${{matrix.name}}
needs: initial-mvn-install
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.initial-mvn-install.outputs.examples-matrix) }}
steps:
- name: Set up JDK 17
uses: actions/setup-java@ad2b38190b15e4d6bdf0c97fb4fca8412226d287 # v5.3.0
with:
distribution: 'temurin'
java-version: '17'
- name: Setup Maven Cache
uses: ./.github/actions/setup-maven-cache
with:
cache-key: ${{ needs.initial-mvn-install.outputs.cache-key }}
download-maven-repo: 'true'
- name: set CQ_VERSION
run: echo "CQ_VERSION=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout -N)" >> $GITHUB_ENV
- name: clone and verify examples
env:
EXAMPLE_MODULES: ${{matrix.examples}}
shell: '/usr/bin/bash {0}'
run: |
EXAMPLES_BRANCH="${{ github.event.inputs.branch }}.x"
git clone --depth 1 --branch ${EXAMPLES_BRANCH} https://github.com/apache/camel-quarkus-examples.git \
&& cd camel-quarkus-examples \
&& echo "Current Examples commit:" $(git rev-parse HEAD) \
&& ./mvnw ${CQ_MAVEN_ARGS} ${BRANCH_OPTIONS} org.l2x6.cq:cq-maven-plugin:2.10.0:examples-set-platform -Dcq.camel-quarkus.version=${CQ_VERSION}
BUILD_FAILURES=()
for MODULE in ${EXAMPLE_MODULES//,/ }; do
cd ${MODULE}
../mvnw ${CQ_MAVEN_ARGS} clean verify \
-Dformatter.skip -Dimpsort.skip \
-Dquarkus.native.builder-image.pull=missing \
-Pnative,docker,ci
if [[ $? -ne 0 ]]; then
BUILD_FAILURES[${#BUILD_FAILURES[@]}]=${MODULE}
fi
cd -
done
if [[ ${#BUILD_FAILURES[@]} -gt 0 ]]; then
echo -e "\nBuild errors were encountered in the following projects:\n"
for FAILURE in ${BUILD_FAILURES[@]}; do
echo "* ${FAILURE}"
done
echo -e "\nCheck build logs for further information."
exit 1
fi
- name: Report test failures
uses: ./.github/actions/test-summary-report
if: ${{ failure() }}