-
-
Notifications
You must be signed in to change notification settings - Fork 7
58 lines (51 loc) · 1.75 KB
/
build-n-verify.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
55
56
57
58
name: Build and verify
on:
pull_request:
branches: [ v3 ]
push:
branches:
- '*'
paths-ignore:
- '**/*.md'
- '**/renovate.json'
workflow_dispatch:
# Cancel running workflows of the same group when commit is added and a new workflow is triggered
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build-and-test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
# https://docs.github.com/en/actions/using-jobs/choosing-the-runner-for-a-job
os: [ ubuntu-24.04, windows-2022, macos-15 ]
jvm: [ 11, 17, 21 ]
# https://github.com/actions
# https://github.com/marketplace?type=actions
steps:
- name: Checkout project
uses: actions/[email protected]
- name: Setup JVM ${{ matrix.jvm }}
uses: actions/[email protected]
with:
distribution: 'temurin'
java-version: ${{ matrix.jvm }}
# https://github.com/marketplace/actions/gradle-build-action
- name: Setup Gradle
uses: gradle/actions/[email protected]
with:
# The Gradle wrapper's version (already the default, putting it here to clarity)
cache-read-only: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/v3' }}
gradle-home-cache-includes: |
caches
notifications
jdks
gradle-version: wrapper
- name: Build
if: startsWith(matrix.os, 'ubuntu')
run: xvfb-run ./gradlew build -P kotlin.jvmToolchain=${{ matrix.jvm }}
- name: Build
if: ${{ !startsWith(matrix.os, 'ubuntu') }}
run: ./gradlew build -P kotlin.jvmToolchain=${{ matrix.jvm }}