blob: 8bb287c548bb4c91501de70b347c9e61bb946740 [file] [log] [blame]
# 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: Verify
on:
workflow_call:
inputs:
maven_args:
description: The arguments to pass to Maven when building the code
required: false
default: --errors --batch-mode --show-version -P run-its -D"invoker.streamLogsOnFailures" verify
type: string
os-matrix:
description: 'os matrix as json array'
default: '[ "ubuntu-latest", "windows-latest", "macOS-latest" ]'
type: string
jdk-matrix:
description: 'jdk matrix as json array'
default: '[ "8", "11", "17" ]'
type: string
matrix-exclude:
description: 'exclude for matrix as json'
default: '[]'
type: string
jdk-distribution-matrix:
description: "jdk distribution matrix"
default: '[ "temurin" ]'
type: string
jobs:
build:
name: fail-fast-build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2.3.4
- name: Set up JDK
uses: actions/setup-java@v2.3.1
with:
java-version: 8
distribution: 'temurin'
cache: 'maven'
- name: Build with Maven
run: mvn --errors --batch-mode --show-version -P run-its -D"invoker.streamLogsOnFailures" verify
verify:
needs: build
name: ${{ matrix.os }} jdk-${{ matrix.jdk }}-${{ matrix.distribution }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: ${{ fromJSON( inputs.os-matrix ) }}
jdk: ${{ fromJSON( inputs.jdk-matrix ) }}
distribution: ${{ fromJSON( inputs.jdk-distribution-matrix ) }}
exclude: ${{ fromJSON( inputs.matrix-exclude ) }}
steps:
- name: Checkout
uses: actions/checkout@v2.3.4
- name: Set up JDK
uses: actions/setup-java@v2.3.1
with:
java-version: ${{ matrix.jdk }}
distribution: ${{ matrix.distribution }}
cache: 'maven'
- name: Build with Maven
run: mvn --errors --batch-mode --show-version -P run-its -D"invoker.streamLogsOnFailures" verify
- name: Build Maven Site
run: mvn ${{ inputs.maven_args }}