-
Notifications
You must be signed in to change notification settings - Fork 2
50 lines (41 loc) · 1.22 KB
/
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
name: Build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
Build:
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
java: [ '8', '11', '17' ]
runs-on: '${{ matrix.os }}'
steps:
- uses: actions/checkout@v2
- name: Setup java
uses: actions/setup-java@v2
with:
distribution: zulu
java-version: ${{ matrix.java }}
- name: Cache gradle files
uses: actions/cache@v2
with:
path: |
$HOME/.gradle/caches
$HOME/.gradle/wrapper
key: vfu-${{ matrix.os }}-${{ matrix.java }}-${{ hashFiles('**/*.gradle*', '**/*.gradle.kts', '**/gradle-wrapper.properties') }}
restore-keys: |
vfu-${{ matrix.os }}-${{ matrix.java }}-
- name: Build
shell: bash
run: ./gradlew build
- name: After Build
shell: bash
run: |
./gradlew --stop
git reset --hard HEAD
- name: Update Codecov
shell: bash
if: ${{ matrix.os == 'ubuntu-latest' && matrix.java == '8' }}
run: bash <(curl -s https://codecov.io/bash)