-
Notifications
You must be signed in to change notification settings - Fork 759
68 lines (60 loc) · 1.89 KB
/
maven.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
name: Build Maven Projects
on:
push:
schedule:
- cron: '0 5 * * SUN'
jobs:
build-java-8-and-17-projects:
strategy:
fail-fast: false
matrix:
versions: [8, 17]
runs-on: ubuntu-20.04
name: Build Java ${{ matrix.versions }} projects
steps:
- name: VCS checkout
uses: actions/checkout@v1
- name: Set up cache
uses: actions/cache@v1
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-jdk${{ matrix.versions }}-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-jdk${{ matrix.versions }}-
- name: Set up JDK ${{ matrix.versions }}
uses: actions/setup-java@v2
with:
java-version: ${{ matrix.versions }}
distribution: 'adopt'
java-package: 'jdk'
- name: Build all projects with Maven
run: |
chmod +x ./buildJdk${{ matrix.versions }}Projects.sh
./buildJdk${{ matrix.versions }}Projects.sh
build-java-11-project-batches:
strategy:
fail-fast: false
matrix:
batch: [1, 2, 3]
runs-on: ubuntu-20.04
name: Build Java 11 Batch ${{ matrix.batch }} projects
steps:
- name: VCS checkout
uses: actions/checkout@v1
- name: Set up cache
uses: actions/cache@v1
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-jdk${{ matrix.batch }}-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-jdk${{ matrix.batch }}-
- name: Set up JDK $11
uses: actions/setup-java@v2
with:
java-version: 11
distribution: 'adopt'
java-package: 'jdk'
- name: Build all projects of batch with Maven
run: |
chmod +x ./buildJdk11Projects_0${{ matrix.batch }}.sh
./buildJdk11Projects_0${{ matrix.batch }}.sh