-
Notifications
You must be signed in to change notification settings - Fork 13
51 lines (40 loc) · 1.35 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
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-latest', 'ubuntu-latest', 'windows-latest' ]
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0
- name: Set up Java
uses: actions/[email protected]
with:
distribution: 'adopt'
java-version: '17'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Test (macos, jvm, js)
if: matrix.os == 'macos-latest'
run: ./gradlew build --full-stacktrace
- name: Test (linux)
if: matrix.os == 'ubuntu-latest'
run: ./gradlew linuxX64Test --full-stacktrace
- name: Test (windows)
if: matrix.os == 'windows-latest'
run: ./gradlew mingwX64Test --full-stacktrace
- name: Upload reports
uses: actions/[email protected]
with:
name: 'reports-${{ matrix.os }}'
path: '**/build/reports/**'