# Copyright (c) 2014-2020 Zephir Team
#
# This source file is subject the MIT license, that is bundled with
# this package in the file LICENSE, and is available through the
# world-wide-web at the following url:
#
# https://github.com/zephir-lang/idea-plugin/blob/master/LICENSE

name: build

on:
  push:
    branches:
      - master
      - development
  pull_request:

jobs:
  build:
    name: Build Plugin
    runs-on: ubuntu-latest

    steps:
      - name: Checkout Code
        uses: actions/checkout@v2
        with:
          fetch-depth: 5

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

      - name: Grant execute permission for gradlew
        run: chmod +x gradlew

      - name: Build with Gradle
        run: ./gradlew build

      - name: Success Reporting
        if: success()
        run: git log --format=fuller -5

# Copyright (c) 2014-2020 Zephir Team
#
# This source file is subject the MIT license, that is bundled with
# this package in the file LICENSE, and is available through the
# world-wide-web at the following url:
#
# https://github.com/zephir-lang/idea-plugin/blob/master/LICENSE

name: build

on:
  push:
    branches:
      - master
      - development
  pull_request:

jobs:
  build:
    name: Build Plugin
    runs-on: ubuntu-latest

    steps:
      - name: Checkout Code
        uses: actions/checkout@v2
        with:
          fetch-depth: 5

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

      - name: Grant execute permission for gradlew
        run: chmod +x gradlew

      - name: Cache Gradle packages
        uses: actions/cache@v1
        with:
          path: ~/.gradle/caches
          key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
          restore-keys: ${{ runner.os }}-gradle

      - name: Build with Gradle
        run: ./gradlew build

      - name: Success Reporting
        if: success()
        run: git log --format=fuller -5

Enable caching on GitHub Actions
Enable caching on GitHub Actions
