-
-
Notifications
You must be signed in to change notification settings - Fork 22
51 lines (48 loc) · 1.52 KB
/
gradle.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
# This workflow will build a Java project with Gradle
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
name: Build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
jdk: [17]
steps:
- uses: actions/checkout@v2
- name: Set up JDK ${{ matrix.jdk }}
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.jdk }}
- name: Cache Gradle packages
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: Cache generated resources
uses: actions/cache@v2
with:
path: ./BlockMap-internal/build/generated-resources/BlockMap-internal
key: ${{ runner.os }}-resources
restore-keys: ${{ runner.os }}-resources
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew regenerate && ./gradlew assemble
- name: Generate jar files
run: ./gradlew previewRelease
- name: Upload jars as artifact
uses: actions/upload-artifact@v2
with:
name: BlockMap-${{ matrix.os }}-${{ github.sha }}
path: BlockMap-*/build/libs/fat/BlockMap-*
continue-on-error: true
- name: Execute tests
run: ./gradlew test