Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating PR CI to run full native if no changes in modules are detected #1910

Merged
merged 2 commits into from
Aug 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 17 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ jobs:
echo "MODULES_ARG=$MODULES_ARG" >> $GITHUB_OUTPUT
outputs:
MODULES_ARG: ${{ steps.detect-changes.outputs.MODULES_ARG }}
prepare-jvm-latest-modules-mvn-param:
name: Prepare Maven Params For Linux JVM Build
prepare-jvm-native-latest-modules-mvn-param:
name: Prepare Maven Params For Linux JVM and native Build
runs-on: ubuntu-latest
needs: [ detect-test-suite-modules ]
env:
Expand All @@ -103,21 +103,27 @@ jobs:
run: |
if [[ -n ${MODULES_ARG} ]]; then
echo "Running modules: ${MODULES_ARG}"
echo "MODULES_MAVEN_PARAM=[\" -pl ${MODULES_ARG} -Dall-modules\"]" >> $GITHUB_OUTPUT
echo "JVM_MODULES_MAVEN_PARAM=[\" -pl ${MODULES_ARG} -Dall-modules\"]" >> $GITHUB_OUTPUT
echo "NATIVE_MODULES_MAVEN_PARAM=[\" -pl ${MODULES_ARG} -Dall-modules\"]" >> $GITHUB_OUTPUT
else
echo "MODULES_MAVEN_PARAM=[' -P root-modules,cache-modules,spring-modules,http-modules,test-tooling-modules,messaging-modules,monitoring-modules', ' -P security-modules,sql-db-modules,websockets-modules']" >> $GITHUB_OUTPUT
echo "JVM_MODULES_MAVEN_PARAM=[' -P root-modules,cache-modules,spring-modules,http-modules,test-tooling-modules,messaging-modules,monitoring-modules', ' -P security-modules,sql-db-modules,websockets-modules']" >> $GITHUB_OUTPUT
echo "NATIVE_MODULES_MAVEN_PARAM=[' -P root-modules,websockets-modules,test-tooling-modules,nosql-db-modules', ' -P http-modules,cache-modules', ' -P security-modules,spring-modules',
' -P sql-db-modules -pl env-info,sql-db/hibernate,sql-db/sql-app,sql-db/sql-app-compatibility,sql-db/multiple-pus,sql-db/panache-flyway,sql-db/hibernate-reactive',
' -P sql-db-modules -pl env-info,sql-db/reactive-rest-data-panache,sql-db/vertx-sql,sql-db/reactive-vanilla,sql-db/hibernate-fulltext-search,sql-db/narayana-transactions',
' -P messaging-modules,monitoring-modules']" | tr -d -s '\n' ' ' >> $GITHUB_OUTPUT
fi
outputs:
MODULES_MAVEN_PARAM: ${{ steps.prepare-modules-mvn-param.outputs.MODULES_MAVEN_PARAM }}
JVM_MODULES_MAVEN_PARAM: ${{ steps.prepare-modules-mvn-param.outputs.JVM_MODULES_MAVEN_PARAM }}
NATIVE_MODULES_MAVEN_PARAM: ${{ steps.prepare-modules-mvn-param.outputs.NATIVE_MODULES_MAVEN_PARAM }}
linux-build-jvm-latest:
name: PR - Linux - JVM build - Latest Version
runs-on: ubuntu-latest
timeout-minutes: 240
needs: prepare-jvm-latest-modules-mvn-param
needs: prepare-jvm-native-latest-modules-mvn-param
strategy:
matrix:
java: [ 17 ]
module-mvn-args: ${{ fromJSON(needs.prepare-jvm-latest-modules-mvn-param.outputs.MODULES_MAVEN_PARAM) }}
module-mvn-args: ${{ fromJSON(needs.prepare-jvm-native-latest-modules-mvn-param.outputs.JVM_MODULES_MAVEN_PARAM) }}
outputs:
has-flaky-tests: ${{steps.flaky-test-detector.outputs.has-flaky-tests}}
steps:
Expand Down Expand Up @@ -167,12 +173,11 @@ jobs:
linux-build-native-latest:
name: PR - Linux - Native build - Latest Version
runs-on: ubuntu-latest
needs: detect-test-suite-modules
env:
MODULES_ARG: ${{ needs.detect-test-suite-modules.outputs.MODULES_ARG }}
needs: prepare-jvm-native-latest-modules-mvn-param
strategy:
matrix:
java: [ 17 ]
module-mvn-args: ${{ fromJSON(needs.prepare-jvm-native-latest-modules-mvn-param.outputs.NATIVE_MODULES_MAVEN_PARAM) }}
outputs:
has-flaky-tests: ${{steps.flaky-test-detector.outputs.has-flaky-tests}}
steps:
Expand Down Expand Up @@ -205,13 +210,10 @@ jobs:
./quarkus-dev-cli version
- name: Build with Maven
run: |
if [[ -n ${MODULES_ARG} ]]; then
echo "Running modules: ${MODULES_ARG}"
mvn -fae -V -B -s .github/mvn-settings.xml -fae -Dall-modules \
mvn -fae -V -B -s .github/mvn-settings.xml -fae \
-Dquarkus.native.native-image-xmx=5g \
-Dinclude.quarkus-cli-tests -Dts.quarkus.cli.cmd="${PWD}/quarkus-dev-cli" \
-pl $MODULES_ARG clean verify -Dnative -am
fi
${{ matrix.module-mvn-args }} clean verify -Dnative -am
- name: Detect flaky tests
id: flaky-test-detector
if: ${{ hashFiles('**/flaky-run-report.json') != '' }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/daily.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,12 @@ jobs:
matrix:
java: [ 17 ]
image: [ "ubi-quarkus-graalvmce-builder-image:jdk-21", "ubi-quarkus-mandrel-builder-image:jdk-21" ]
profiles: [ "root-modules",
profiles: [ "root-modules,websockets-modules,test-tooling-modules,nosql-db-modules",
"http-modules,cache-modules",
"security-modules,spring-modules",
"sql-db-modules -pl env-info,sql-db/hibernate,sql-db/sql-app,sql-db/sql-app-compatibility,sql-db/multiple-pus,sql-db/panache-flyway,sql-db/hibernate-reactive",
"sql-db-modules -pl env-info,sql-db/reactive-rest-data-panache,sql-db/vertx-sql,sql-db/reactive-vanilla,sql-db/hibernate-fulltext-search,sql-db/narayana-transactions",
"messaging-modules,websockets-modules,monitoring-modules,test-tooling-modules,nosql-db-modules"]
"messaging-modules,monitoring-modules"]
steps:
- uses: actions/checkout@v4
- name: Reclaim Disk Space
Expand Down