-
Notifications
You must be signed in to change notification settings - Fork 12
70 lines (60 loc) · 1.73 KB
/
main.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
59
60
61
62
63
64
65
66
67
68
69
70
name: Build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
jobs:
build:
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
java-version:
- 8
- 11
- 13
exclude:
- os: macos-latest
java_version: 8
- os: macos-latest
java_version: 13
runs-on: ${{ matrix.os }}
steps:
# https://github.com/actions/checkout
- uses: actions/checkout@v2
# https://github.com/gradle/wrapper-validation-action
- uses: gradle/wrapper-validation-action@v1
# https://github.com/actions/setup-java
- uses: actions/setup-java@v2
with:
distribution: adopt
java-version: ${{ matrix.java-version }}
# https://github.com/actions/cache
- name: Cache Gradle packages
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Install Linux prerequisites
if: ${{ runner.os == 'Linux' }}
run: |
sudo apt update
sudo apt -y install sox speech-tools
- name: Install macOS prerequisites
if: ${{ runner.os == 'macOS' }}
run: brew install speech-tools
- name: Build with Gradle
env:
GRADLE_OPTS: -Dorg.gradle.daemon=false
run: ./gradlew build
- name: Cleanup Gradle Cache
run: |
rm -f ~/.gradle/caches/modules-2/modules-2.lock
rm -f ~/.gradle/caches/modules-2/gc.properties