-
Notifications
You must be signed in to change notification settings - Fork 28
79 lines (67 loc) · 2.21 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: Gradle CI
on:
push:
branches: [ master ]
paths-ignore: [ "**.md", "schemas/**", ".editorconfig", ".gitignore", ".gitattributes" ]
pull_request:
branches: [ master ]
paths-ignore: [ "**.md", "schemas/**", ".editorconfig", ".gitignore", ".gitattributes" ]
jobs:
gradle:
strategy:
fail-fast: false
matrix:
os: [ "ubuntu", "windows", "macos" ]
runs-on: ${{ matrix.os }}-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: zulu
java-version: 11
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Setup Gradle Dependencies Cache
uses: actions/cache@v3
with:
path: ~/.gradle/caches
key: ${{ matrix.os }}-gradle-caches-${{ hashFiles('**/*.gradle', '**/*.gradle.kts', 'gradle.properties') }}
- name: Setup Gradle Wrapper Cache
uses: actions/cache@v3
with:
path: ~/.gradle/wrapper
key: ${{ matrix.os }}-gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
- name: Setup Gradle Wrapper Cache
uses: actions/cache@v3
with:
path: ./it
key: minosoft-assets
- name: Build
uses: gradle/gradle-build-action@v2
with:
arguments: assemble
- name: Test
uses: gradle/gradle-build-action@v2
with:
arguments: check
- name: Package amd64
uses: gradle/gradle-build-action@v2
with:
arguments: fatJar
- name: Upload amd64 build
uses: actions/upload-artifact@v3
with:
name: 'minosoft-${{ matrix.os }}-amd64'
path: build/libs/minosoft-fat-*-amd64-*.jar
- name: Package aarch64
if: ${{ !startsWith(matrix.os, 'windows') }}
uses: gradle/gradle-build-action@v2
with:
arguments: fatJar -Parchitecture=aarch64
- name: Upload aarch64 build
if: ${{ !startsWith(matrix.os, 'windows') }}
uses: actions/upload-artifact@v3
with:
name: 'minosoft-${{ matrix.os }}-aarch64'
path: build/libs/minosoft-fat-*-aarch64-*.jar