name: 2.5.x PR Build

on:
  pull_request:
    branches:
      - 2.5.x

jobs:
  build:
    name: Build
    runs-on: ubuntu-latest
    strategy:
      matrix:
        jdk: [8, 11]
      fail-fast: false
    steps:
      - uses: actions/checkout@v2
      - name: Set up JDK ${{ matrix.jdk }}
        uses: actions/setup-java@v1
        with:
          java-version: ${{ matrix.jdk }}
      - name: Cache Gradle packages
        uses: actions/cache@v2
        with:
          path: ~/.gradle/caches
          key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
      - name: Build with Gradle
        run: ./gradlew clean build --no-daemon --stacktrace
