Restore removed file #626
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Notes | |
# - cannot run on Windows, as we use shell scripts | |
# - removed macos from most jobs to speed up the process | |
name: "Validate" | |
on: | |
pull_request: | |
push: | |
branches-ignore: [ 'main', 'helidon-*.x', 'release-*' ] | |
tags-ignore: [ '**' ] | |
workflow_call: | |
env: | |
JAVA_VERSION: '21' | |
JAVA_DISTRO: 'oracle' | |
MAVEN_ARGS: | | |
-B -fae -e | |
-Dmaven.wagon.httpconnectionManager.ttlSeconds=60 | |
-Dmaven.wagon.http.retryHandler.count=3 | |
concurrency: | |
group: Validate-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
copyright: | |
timeout-minutes: 10 | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up JDK ${{ env.JAVA_VERSION }} | |
uses: actions/[email protected] | |
with: | |
distribution: ${{ env.JAVA_DISTRO }} | |
java-version: ${{ env.JAVA_VERSION }} | |
cache: maven | |
- name: Copyright | |
run: etc/scripts/copyright.sh | |
checkstyle: | |
timeout-minutes: 10 | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK ${{ env.JAVA_VERSION }} | |
uses: actions/[email protected] | |
with: | |
distribution: ${{ env.JAVA_DISTRO }} | |
java-version: ${{ env.JAVA_VERSION }} | |
cache: maven | |
- name: Checkstyle | |
run: etc/scripts/checkstyle.sh | |
shellcheck: | |
timeout-minutes: 5 | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: ShellCheck | |
run: etc/scripts/shellcheck.sh | |
spotbugs: | |
timeout-minutes: 45 | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK ${{ env.JAVA_VERSION }} | |
uses: actions/[email protected] | |
with: | |
distribution: ${{ env.JAVA_DISTRO }} | |
java-version: ${{ env.JAVA_VERSION }} | |
cache: maven | |
- name: Spotbugs | |
run: | | |
mvn ${MAVEN_ARGS} -e \ | |
-DskipTests \ | |
-Dmaven.test.skip=true \ | |
-Pspotbugs \ | |
install | |
docs: | |
timeout-minutes: 30 | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK ${{ env.JAVA_VERSION }} | |
uses: actions/[email protected] | |
with: | |
distribution: ${{ env.JAVA_DISTRO }} | |
java-version: ${{ env.JAVA_VERSION }} | |
cache: maven | |
- name: Docs | |
run: | | |
mvn ${MAVEN_ARGS} \ | |
-DskipTests \ | |
install | |
mvn ${MAVEN_ARGS} \ | |
-f docs/pom.xml \ | |
-Pjavadoc \ | |
install | |
build: | |
timeout-minutes: 60 | |
strategy: | |
matrix: | |
os: [ ubuntu-20.04 ] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK ${{ env.JAVA_VERSION }} | |
uses: actions/[email protected] | |
with: | |
distribution: ${{ env.JAVA_DISTRO }} | |
java-version: ${{ env.JAVA_VERSION }} | |
cache: maven | |
- name: Maven build | |
run: | | |
mvn ${MAVEN_ARGS} \ | |
-Dmaven.test.failure.ignore=false \ | |
-Pjavadoc,sources,tests \ | |
install | |
examples: | |
timeout-minutes: 40 | |
strategy: | |
matrix: | |
os: [ ubuntu-20.04, macos-14 ] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK ${{ env.JAVA_VERSION }} | |
uses: actions/[email protected] | |
with: | |
distribution: ${{ env.JAVA_DISTRO }} | |
java-version: ${{ env.JAVA_VERSION }} | |
cache: maven | |
- uses: graalvm/setup-graalvm@v1 | |
with: | |
java-version: ${{ env.JAVA_VERSION }} | |
distribution: graalvm-community | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
native-image-job-reports: true | |
cache: maven | |
- name: Maven build | |
run: | | |
# prime build | |
mvn ${MAVEN_ARGS} -T8 \ | |
-DskipTests \ | |
install | |
- name: Examples build | |
run: etc/scripts/build-examples.sh | |
- name: Test quickstarts native image | |
run: etc/scripts/test-quickstarts.sh | |
mp-tck: | |
timeout-minutes: 60 | |
strategy: | |
matrix: | |
os: [ ubuntu-20.04 ] | |
include: | |
- { os: ubuntu-20.04, platform: linux } | |
runs-on: ${{ matrix.os }} | |
name: tests/tck-${{ matrix.platform }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK ${{ env.JAVA_VERSION }} | |
uses: actions/[email protected] | |
with: | |
distribution: ${{ env.JAVA_DISTRO }} | |
java-version: ${{ env.JAVA_VERSION }} | |
cache: maven | |
- name: Maven build | |
run: | | |
# prime build | |
mvn ${MAVEN_ARGS} -T8 \ | |
-DskipTests \ | |
install | |
mvn ${MAVEN_ARGS} \ | |
-f microprofile/tests/tck/pom.xml \ | |
-Ptck-ft \ | |
verify | |
archetypes: | |
timeout-minutes: 45 | |
strategy: | |
matrix: | |
os: [ ubuntu-20.04 ] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK ${{ env.JAVA_VERSION }} | |
uses: actions/[email protected] | |
with: | |
distribution: ${{ env.JAVA_DISTRO }} | |
java-version: ${{ env.JAVA_VERSION }} | |
cache: maven | |
- name: Test archetypes | |
run: | | |
# prime build | |
mvn ${MAVEN_ARGS} -T8 \ | |
-DskipTests \ | |
install | |
mvn ${MAVEN_ARGS} -e \ | |
-f archetypes/pom.xml \ | |
install | |
packaging: | |
timeout-minutes: 30 | |
strategy: | |
matrix: | |
os: [ ubuntu-20.04, macos-14 ] | |
packaging: [ jar, jlink ] | |
include: | |
- { os: ubuntu-20.04, platform: linux } | |
- { os: macos-14, platform: macos } | |
runs-on: ${{ matrix.os }} | |
name: tests/packaging-${{ matrix.packaging }}-${{ matrix.platform }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ inputs.ref }} | |
- name: Set up JDK ${{ env.JAVA_VERSION }} | |
uses: actions/[email protected] | |
with: | |
distribution: ${{ env.JAVA_DISTRO }} | |
java-version: ${{ env.JAVA_VERSION }} | |
cache: maven | |
- name: Free Space | |
shell: bash | |
run: | | |
# See https://github.com/actions/runner-images/issues/2840 | |
sudo rm -rf /usr/share/dotnet | |
sudo rm -rf /usr/local/share/powershell | |
- name: Build Helidon | |
run: | | |
# prime build | |
mvn ${MAVEN_ARGS} -T4 \ | |
-DskipTests \ | |
-Ptests \ | |
install | |
- name: Run Test | |
run: | | |
mvn ${MAVEN_ARGS} \ | |
-f tests/integration/packaging/pom.xml \ | |
-P${{ matrix.packaging }}-image \ | |
verify | |
native-image: | |
timeout-minutes: 30 | |
strategy: | |
matrix: | |
os: [ ubuntu-20.04, macos-14 ] | |
module: [ mp-1, mp-2, mp-3, se-1 ] | |
include: | |
- { os: ubuntu-20.04, platform: linux } | |
- { os: macos-14, platform: macos } | |
runs-on: ${{ matrix.os }} | |
name: tests/native-image-${{ matrix.module }}-${{ matrix.platform }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ inputs.ref }} | |
- uses: graalvm/setup-graalvm@v1 | |
with: | |
java-version: ${{ env.JAVA_VERSION }} | |
distribution: graalvm-community | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
native-image-job-reports: true | |
cache: maven | |
- name: Free Space | |
shell: bash | |
run: | | |
# See https://github.com/actions/runner-images/issues/2840 | |
sudo rm -rf /usr/share/dotnet | |
sudo rm -rf /usr/local/share/powershell | |
- name: Build Helidon | |
run: | | |
# prime build | |
mvn ${MAVEN_ARGS} -T4 \ | |
-DskipTests \ | |
-Ptests \ | |
install | |
- name: Run Test | |
run: | | |
mvn ${MAVEN_ARGS} -e \ | |
-f tests/integration/packaging/pom.xml \ | |
-pl ${{ matrix.module }} \ | |
-Pnative-image \ | |
-am \ | |
verify | |
dbclient: | |
timeout-minutes: 60 | |
strategy: | |
matrix: | |
os: [ ubuntu-20.04 ] | |
group: [ oracle, others ] | |
include: | |
- { group: others, modules: '!oracle' } | |
- { os: ubuntu-20.04, platform: linux } | |
runs-on: ${{ matrix.os }} | |
name: tests/dbclient-${{ matrix.group }}-${{ matrix.platform }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK ${{ env.JAVA_VERSION }} | |
uses: actions/[email protected] | |
with: | |
distribution: ${{ env.JAVA_DISTRO }} | |
java-version: ${{ env.JAVA_VERSION }} | |
cache: maven | |
- name: Free Space | |
shell: bash | |
run: | | |
# See https://github.com/actions/runner-images/issues/2840 | |
sudo rm -rf /usr/share/dotnet | |
sudo rm -rf /usr/local/share/powershell | |
- name: Build Helidon | |
run: | | |
# prime build | |
mvn ${MAVEN_ARGS} -T4 \ | |
-DskipTests \ | |
-Ptests \ | |
install | |
- name: Run Tests | |
run: | | |
mvn ${MAVEN_ARGS} \ | |
-f tests/integration/dbclient/pom.xml \ | |
-pl ${{ matrix.modules || matrix.group }} \ | |
-am \ | |
verify | |
gate: | |
runs-on: ubuntu-20.04 | |
needs: [ copyright, checkstyle, shellcheck, build, docs, spotbugs, packaging, native-image, dbclient, archetypes, mp-tck ] | |
steps: | |
- shell: bash | |
run: | | |
echo OK |