Skip to content

Commit

Permalink
Upload tests result artifact on Windows (helidon-io#1099)
Browse files Browse the repository at this point in the history
* Upload tests result artifacts on Windows

* Rename MAVEN_ARGS to MVN_ARGS to fix windows issues with Maven 3.9.9

* Fix build-cache-maven-extension it/test3

* Fix copyright

---------

Co-authored-by: Romain Grecourt <[email protected]>
  • Loading branch information
tvallin and romain-grecourt authored Jan 17, 2025
1 parent cb047c8 commit 7127472
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 31 deletions.
11 changes: 5 additions & 6 deletions .github/actions/common/action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2023, 2024 Oracle and/or its affiliates.
# Copyright (c) 2023, 2025 Oracle and/or its affiliates.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -57,7 +57,7 @@ inputs:
required: false
default: ''
test-artifact-name:
description: Name of the test artifact to create (excluded on windows), if non empty tests are archived
description: Name of the test artifact to create, if non empty tests are archived
required: false
default: ''
free-space:
Expand Down Expand Up @@ -150,15 +150,14 @@ runs:
GPG_PASSPHRASE: ${{ inputs.GPG_PASSPHRASE }}
GPG_PRIVATE_KEY: ${{ inputs.GPG_PRIVATE_KEY }}
MAVEN_SETTINGS: ${{ inputs.MAVEN_SETTINGS }}
MAVEN_ARGS: |
${{ env.MAVEN_ARGS }}
MVN_ARGS: |
${{ env.MVN_ARGS }}
-Dmaven.repo.local=${{ github.workspace }}/.m2/repository
-Dcache.record=${{ inputs.build-cache == 'read-write' }}
run: ${{ inputs.run }}
shell: bash
- name: Archive test results
# https://github.com/actions/upload-artifact/issues/240
if: ${{ inputs.test-artifact-name != '' && runner.os != 'Windows' && always() }}
if: ${{ inputs.test-artifact-name != '' && always() }}
uses: actions/upload-artifact@v4
with:
if-no-files-found: 'ignore'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2023, 2024 Oracle and/or its affiliates.
# Copyright (c) 2023, 2025 Oracle and/or its affiliates.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -23,7 +23,7 @@ on:
env:
JAVA_VERSION: 17
JAVA_DISTRO: oracle
MAVEN_ARGS: |
MVN_ARGS: |
-B -e
-Dmaven.wagon.httpconnectionManager.ttlSeconds=60
-Dmaven.wagon.http.retryHandler.count=3
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2023, 2024 Oracle and/or its affiliates.
# Copyright (c) 2023, 2025 Oracle and/or its affiliates.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -30,7 +30,7 @@ env:
JAVA_VERSION: 17
JAVA_DISTRO: oracle
GRAALVM_VERSION: 21.3.3.1
MAVEN_ARGS: |
MVN_ARGS: |
-B -fae -e
-Dmaven.wagon.httpconnectionManager.ttlSeconds=60
-Dmaven.wagon.http.retryHandler.count=3
Expand Down Expand Up @@ -90,8 +90,8 @@ jobs:
artifact-path: cli/impl/target/helidon-cli.zip
run: |
mvn --version
mvn ${MAVEN_ARGS} build-cache:go-offline
mvn ${MAVEN_ARGS} -T8 \
mvn ${MVN_ARGS} build-cache:go-offline
mvn ${MVN_ARGS} -T8 \
-Dorg.slf4j.simpleLogger.showThreadName=true \
-DskipTests \
-P tests \
Expand All @@ -115,9 +115,9 @@ jobs:
- uses: ./.github/actions/common
with:
build-cache: read-only
test-artifact-name: tests-${{ matrix.moduleSet }}
test-artifact-name: tests-${{ matrix.moduleSet }}-${{ matrix.os }}
run: |
mvn ${MAVEN_ARGS} \
mvn ${MVN_ARGS} \
-DreactorRule=tests \
-DmoduleSet=${{ matrix.moduleSet }} \
-Dsurefire.reportNameSuffix=${{ matrix.platform }} \
Expand All @@ -134,7 +134,7 @@ jobs:
with:
build-cache: read-only
run: |
mvn ${MAVEN_ARGS} -T 8 \
mvn ${MVN_ARGS} -T 8 \
-DskipTests \
-Pspotbugs,build-cache \
verify
Expand All @@ -150,7 +150,7 @@ jobs:
with:
build-cache: read-only
run: |
mvn ${MAVEN_ARGS} -T 8 \
mvn ${MVN_ARGS} -T 8 \
-DskipTests \
-Pjavadoc,build-cache \
package
Expand All @@ -166,7 +166,7 @@ jobs:
with:
build-cache: read-write
run: |
mvn ${MAVEN_ARGS} \
mvn ${MVN_ARGS} \
-pl ide-support/vscode-extension \
-DskipTests \
-P vscode \
Expand Down Expand Up @@ -196,15 +196,15 @@ jobs:
artifact-path: cli/impl/target/helidon-cli-${{ matrix.platform }}${{ matrix.file-ext }}
run: |
# build the executable
mvn ${MAVEN_ARGS} \
mvn ${MVN_ARGS} \
-pl cli/impl \
-DskipTests \
-Pnative-image,!toolchain \
-Dnative.image.name=helidon-cli-${{ matrix.platform }} \
package
# smoke test
mvn ${MAVEN_ARGS} \
mvn ${MVN_ARGS} \
-pl cli/tests/functional \
-Pnative-image \
-Dnative.image.name=helidon-cli-${{ matrix.platform }} \
Expand Down
4 changes: 2 additions & 2 deletions etc/scripts/checkstyle.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
#
# Copyright (c) 2018, 2023 Oracle and/or its affiliates.
# Copyright (c) 2018, 2025 Oracle and/or its affiliates.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -53,7 +53,7 @@ die(){ echo "${1}" ; exit 1 ;}
rm -f "${WS_DIR}"/target/checkstyle-*

# shellcheck disable=SC2086
mvn ${MAVEN_ARGS} checkstyle:checkstyle-aggregate \
mvn ${MVN_ARGS} checkstyle:checkstyle-aggregate \
-f "${WS_DIR}"/pom.xml \
-Dcheckstyle.output.format="plain" \
-Dcheckstyle.output.file="${RESULT_FILE}" \
Expand Down
4 changes: 2 additions & 2 deletions etc/scripts/copyright.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
#
# Copyright (c) 2018, 2023 Oracle and/or its affiliates.
# Copyright (c) 2018, 2025 Oracle and/or its affiliates.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -49,7 +49,7 @@ readonly RESULT_FILE
die() { echo "${1}" ; exit 1 ;}

# shellcheck disable=SC2086
mvn ${MAVEN_ARGS} \
mvn ${MVN_ARGS} \
-f ${WS_DIR}/pom.xml \
-Dhelidon.enforcer.output.file="${RESULT_FILE}" \
-Dhelidon.enforcer.rules=copyright \
Expand Down
12 changes: 6 additions & 6 deletions etc/scripts/release.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
#
# Copyright (c) 2018, 2023 Oracle and/or its affiliates.
# Copyright (c) 2018, 2025 Oracle and/or its affiliates.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -109,7 +109,7 @@ exec 6>&1 1>&2

current_version() {
# shellcheck disable=SC2086
mvn ${MAVEN_ARGS} -q \
mvn ${MVN_ARGS} -q \
-f "${WS_DIR}"/pom.xml \
-Dexec.executable="echo" \
-Dexec.args="\${project.version}" \
Expand All @@ -133,7 +133,7 @@ update_version(){
fi

# shellcheck disable=SC2086
mvn ${MAVEN_ARGS} "${ARGS[@]}" \
mvn ${MVN_ARGS} "${ARGS[@]}" \
-f "${WS_DIR}"/pom.xml versions:set versions:set-property \
-DgenerateBackupPoms="false" \
-DnewVersion="${version}" \
Expand Down Expand Up @@ -176,7 +176,7 @@ release_build(){
if [ -n "${MAVEN_SETTINGS}" ] ; then
tmpfile=$(mktemp XXXXXXsettings.xml)
echo "${MAVEN_SETTINGS}" > "${tmpfile}"
MAVEN_ARGS="${MAVEN_ARGS} -s ${tmpfile}"
MVN_ARGS="${MVN_ARGS} -s ${tmpfile}"
fi
if [ -n "${GPG_PRIVATE_KEY}" ] ; then
tmpfile=$(mktemp XXXXXX.key)
Expand All @@ -193,7 +193,7 @@ release_build(){

# Perform local deployment
# shellcheck disable=SC2086
mvn ${MAVEN_ARGS} "${ARGS[@]}" \
mvn ${MVN_ARGS} "${ARGS[@]}" \
deploy \
-Prelease \
-DskipTests \
Expand All @@ -202,7 +202,7 @@ release_build(){
# Upload all artifacts to nexus
version=$(release_version)
# shellcheck disable=SC2086
mvn ${MAVEN_ARGS} -N nexus-staging:deploy-staged \
mvn ${MVN_ARGS} -N nexus-staging:deploy-staged \
-DstagingDescription="Helidon Build Tools v${version}"
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2024 Oracle and/or its affiliates.
# Copyright (c) 2024, 2025 Oracle and/or its affiliates.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -24,4 +24,4 @@ invoker.goals.2 = package -DskipTests -Pjavadoc

invoker.name.3 = Cached build #2
invoker.description.3 = Tests resumed deploy
invoker.goals.3 = deploy -DaltDeploymentRepository=":::file://${maven.multiModuleProjectDirectory}/staging"
invoker.goals.3 = deploy -DaltDeploymentRepository="local::file://${maven.multiModuleProjectDirectory}/staging"

0 comments on commit 7127472

Please sign in to comment.