-
Notifications
You must be signed in to change notification settings - Fork 11
54 lines (44 loc) · 1.45 KB
/
gradle-test-build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: CI with Gradle - Test and Build
# Trigger the workflow pull request,
# but only for the main branch
on:
pull_request:
branches: [ main ]
env:
GRADLE_OPTS: -Dorg.gradle.daemon=false -Dorg.gradle.parallel=false -Dorg.gradle.jvmargs="-Xmx5g -XX:+UseParallelGC -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8"
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ 'macos-11', 'ubuntu-latest', 'windows-latest' ]
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0
- name: Set up Java
uses: actions/setup-java@v3.13.0
with:
distribution: 'adopt'
java-version: '17'
- name: Test (macos, jvm, js)
uses: gradle/gradle-build-action@v2.9.0
if: matrix.os == 'macos-11'
with:
arguments: --full-stacktrace build
- name: Test (linux)
uses: gradle/gradle-build-action@v2.9.0
if: matrix.os == 'ubuntu-latest'
with:
arguments: --full-stacktrace linuxX64Test
- name: Test (windows)
uses: gradle/gradle-build-action@v2.9.0
if: matrix.os == 'windows-latest'
with:
arguments: --full-stacktrace mingwX64Test
- name: Upload reports
uses: actions/upload-artifact@v3.1.3
with:
name: 'reports-${{ matrix.os }}'
path: '**/build/reports/**'