-
Notifications
You must be signed in to change notification settings - Fork 6
63 lines (54 loc) · 1.55 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
name: build
on:
push:
branches:
- '*'
pull_request:
branches:
- $default-branch
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
jdk-version: [11, 17]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Java JDK
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.jdk-version }}
distribution: 'temurin'
- uses: actions/cache@v4
id: ant-lib-cache
name: Ant Library Cache
with:
path: "~/.ant/lib/"
key: ant-lib-cache-v1-jdk-${{ matrix.jdk-version }}-${{ hashFiles('.github/scripts/init-ant.sh') }}
- uses: actions/cache@v4
id: ivy-lib-cache
name: Ivy Dependency Cache
with:
path: |
~/.ivy2/cache/
lib/
key: ivy-lib-cache-v1-jdk-${{ matrix.jdk-version }}-${{ hashFiles('ivy.xml') }}
- name: Initialize Ant
if: steps.ant-lib-cache.outputs.cache-hit != 'true'
run: ./.github/scripts/init-ant.sh
- name: Run Ant Build
run: |
ant -version
ant -noinput -logger org.apache.tools.ant.NoBannerLogger clean build
- name: Archive Test Results
uses: actions/upload-artifact@v3
with:
name: JUnit Test Results
path: build/reports/unittest
- name: Archive Code Coverage Report
uses: actions/upload-artifact@v3
with:
name: Code Coverage Report
path: build/reports/coverage