Liam Miller-Cushon | 88b8edf | 2020-12-08 09:12:51 -0800 | [diff] [blame^] | 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 | |
| 15 | name: CI |
| 16 | |
| 17 | on: [ push, pull_request ] |
| 18 | |
| 19 | jobs: |
| 20 | test: |
| 21 | name: "JDK ${{ matrix.java }} on ${{ matrix.os }}" |
| 22 | strategy: |
| 23 | fail-fast: false |
| 24 | matrix: |
| 25 | os: [ ubuntu-latest, macos-latest, windows-latest ] |
| 26 | java: [ 15, 11, 8 ] |
| 27 | runs-on: ${{ matrix.os }} |
| 28 | steps: |
| 29 | - name: 'Check out repository' |
| 30 | uses: actions/checkout@v2 |
| 31 | - name: 'Cache local Maven repository' |
| 32 | uses: actions/cache@v2 |
| 33 | with: |
| 34 | path: ~/.m2/repository |
| 35 | key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} |
| 36 | restore-keys: | |
| 37 | ${{ runner.os }}-maven- |
| 38 | - name: 'Set up JDK ${{ matrix.java }}' |
| 39 | uses: actions/setup-java@v1 |
| 40 | with: |
| 41 | java-version: ${{ matrix.java }} |
| 42 | - name: 'Install' |
| 43 | shell: bash |
| 44 | run: mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V |
| 45 | - name: 'Test' |
| 46 | shell: bash |
| 47 | run: mvn test -B |
| 48 | |
| 49 | early_access: |
| 50 | name: 'JDK Early-Access' |
| 51 | continue-on-error: true |
| 52 | runs-on: ubuntu-latest |
| 53 | steps: |
| 54 | - name: 'Check out repository' |
| 55 | uses: actions/checkout@v2 |
| 56 | - name: 'Cache local Maven repository' |
| 57 | uses: actions/cache@v2 |
| 58 | with: |
| 59 | path: ~/.m2/repository |
| 60 | key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} |
| 61 | restore-keys: | |
| 62 | ${{ runner.os }}-maven- |
| 63 | - name: 'Set up JDK ${{ matrix.java }}' |
| 64 | uses: actions/setup-java@v1 |
| 65 | with: |
| 66 | java-version: 16-ea |
| 67 | - name: 'Install' |
| 68 | shell: bash |
| 69 | run: mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V |
| 70 | - name: 'Test' |
| 71 | shell: bash |
| 72 | run: mvn test -B |