Skip to content

Commit

Permalink
update Gradle Build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
aSemy committed Aug 7, 2023
1 parent 38dee4d commit cdb0176
Showing 1 changed file with 31 additions and 10 deletions.
41 changes: 31 additions & 10 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,54 @@
name: gradle-ci

on: [ push, pull_request, workflow_dispatch ]
on:
push:
branches:
- master
pull_request:
branches:
- master
workflow_dispatch:

concurrency:
group: "${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}"
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest

env:
GRADLE_OPTS: "-Dorg.gradle.jvmargs=-XX:MaxMetaspaceSize=512m"

strategy:
matrix:
java-version: [ 11, 17, 20 ]
os:
- macos-latest
- ubuntu-latest
- windows-latest
fail-fast: false
runs-on: ${{ matrix.os }}
env:
GRADLE_OPTS: "-Dorg.gradle.jvmargs=-XX:MaxMetaspaceSize=512m"

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up JDK ${{ matrix.java-version }}
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: ${{ matrix.java-version }}

- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1

- name: Cache Kotlin Konan
id: cache-kotlin-konan
uses: actions/cache@v3
with:
path: |
~/.konan/**/*
key: kotlin-konan-${{ runner.os }}

- name: Test with Gradle
uses: gradle/gradle-build-action@v2
with:
gradle-home-cache-cleanup: true
arguments: build check --stacktrace -PtestsBadgeApiKey=${{ secrets.TESTS_BADGE_API_KEY }}

0 comments on commit cdb0176

Please sign in to comment.