-
Notifications
You must be signed in to change notification settings - Fork 3
43 lines (40 loc) · 1.16 KB
/
ci.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
name: Continuous Integration
on:
workflow_dispatch:
push:
branches: [main]
pull_request:
types: [opened, synchronize]
branches: [main]
env:
GRADLE_OPTS: "-Dorg.gradle.daemon=false"
jobs:
build:
name: Build Java ${{ matrix.java }} (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
java: [ '11' ]
os: [ 'ubuntu-latest', 'windows-latest', 'macos-latest' ]
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Cache gradle dependencies
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('**/*.gradle') }}
restore-keys: |
${{ runner.os }}-gradle-caches-
- name: Cache gradle wrapper
uses: actions/cache@v2
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
- name: Setup java
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
- name: Build with gradle
run: ./gradlew build