name: CI

on: [push]

jobs:
  build:
    name: Build OS ${{ matrix.os }}
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest, windows-latest, macos-latest]

    steps:
      - name: Checkout sources
        uses: actions/checkout@v1

      - name: Set up JDK 1.8
        uses: actions/setup-java@v1
        with:
          java-version: 1.8

      - name: Build with Maven
        if: matrix.os == 'ubuntu-latest'
        run: mvn --batch-mode -Pjacoco install

      - name: Build with Maven
        if: matrix.os != 'ubuntu-latest'
        run: mvn --batch-mode install

      - name: Run SonarCloud analysis
        if: matrix.os == 'ubuntu-latest'
        run: >
          mvn --batch-mode -DskipTests sonar:sonar
          -Dsonar.host.url=https://sonarcloud.io
          -Dsonar.organization=powsybl-ci-github
          -Dsonar.projectKey=com.powsybl:powsybl-core
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

name: CI

on: [push]

jobs:
  build:
    name: Build OS ${{ matrix.os }}
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest, windows-latest, macos-latest]

    steps:
      - name: Checkout sources
        uses: actions/checkout@v1

      - name: Set up JDK 11
        uses: actions/setup-java@v1
        with:
          java-version: 11

      - name: Build with Maven
        if: matrix.os == 'ubuntu-latest'
        run: mvn --batch-mode -Pjacoco install

      - name: Build with Maven
        if: matrix.os != 'ubuntu-latest'
        run: mvn --batch-mode install

      - name: Run SonarCloud analysis
        if: matrix.os == 'ubuntu-latest'
        run: >
          mvn --batch-mode -DskipTests sonar:sonar
          -Dsonar.host.url=https://sonarcloud.io
          -Dsonar.organization=powsybl-ci-github
          -Dsonar.projectKey=com.powsybl:powsybl-core
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

Update Java version for CI to JDK 11
Update Java version for CI to JDK 11

Signed-off-by: Mathieu BAGUE <d65b94f2e63cbda2f0ae4c23a9026e22172cc6c2@rte-france.com>
