1# Copyright 2020 Google Inc. All Rights Reserved. 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); 4# you may not use this file except in compliance with the License. 5# You may obtain a copy of the License at 6# 7# http://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12# See the License for the specific language governing permissions and 13# limitations under the License. 14 15name: CI 16 17on: 18 push: 19 branches: 20 - main 21 pull_request: 22 branches: 23 - main 24 25jobs: 26 test: 27 name: "JDK ${{ matrix.java }} on ${{ matrix.os }}" 28 strategy: 29 fail-fast: false 30 matrix: 31 os: [ ubuntu-latest ] 32 java: [ 17, 11 ] 33 experimental: [ false ] 34 include: 35 # Only test on macos and windows with a single recent JDK to avoid a 36 # combinatorial explosion of test configurations. 37 - os: macos-latest 38 java: 17 39 experimental: false 40 - os: windows-latest 41 java: 17 42 experimental: false 43 - os: ubuntu-latest 44 java: 18-ea 45 experimental: true 46 runs-on: ${{ matrix.os }} 47 continue-on-error: ${{ matrix.experimental }} 48 steps: 49 - name: Cancel previous 50 uses: styfle/cancel-workflow-action@0.9.1 51 with: 52 access_token: ${{ github.token }} 53 - name: 'Check out repository' 54 uses: actions/checkout@v2 55 - name: 'Set up JDK ${{ matrix.java }}' 56 uses: actions/setup-java@v2 57 with: 58 java-version: ${{ matrix.java }} 59 distribution: 'zulu' 60 cache: 'maven' 61 - name: 'Install' 62 shell: bash 63 run: mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V 64 - name: 'Test' 65 shell: bash 66 run: mvn test -B 67 - name: 'Javadoc' 68 shell: bash 69 run: mvn javadoc:aggregate 70