name: CI PRs

on:
  pull_request:

jobs:
  build:
    runs-on: ${{ matrix.os }}
    timeout-minutes: 15
    strategy:
      fail-fast: false
      matrix:
        include:
          - nickname: linux jdk17
            java: 17
            os: ubuntu-latest
          - nickname: macos jdk17
            java: 17
            os: macos-latest
          - nickname: windows jdk17
            java: 17
            os: windows-latest
    name: CI PR ${{ matrix.nickname }}
    steps:
      - uses: actions/checkout@v3
      - uses: actions/setup-java@v3
        with:
          distribution: adopt
          java-version: ${{ matrix.java }}
          cache: gradle
      - name: Build
        run: ./gradlew build
