Skip to content

Commit d853d18

Browse files
committed
Rework CI to add multi-version build and Maven repository caching
1 parent 17e5732 commit d853d18

File tree

4 files changed

+34
-75
lines changed

4 files changed

+34
-75
lines changed

.github/workflows/ci.yml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Java CI with Maven
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
workflow_dispatch:
9+
10+
jobs:
11+
build:
12+
name: Java ${{ matrix.java }}
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
java: [ 8, 11, 16, 17-ea, 18-ea ]
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- uses: actions/checkout@v2
21+
- name: Setup Java
22+
uses: actions/setup-java@v2
23+
with:
24+
distribution: 'zulu'
25+
java-version: ${{ matrix.java }}
26+
- name: Cache local Maven repository
27+
uses: actions/cache@v2
28+
with:
29+
path: ~/.m2/repository
30+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
31+
restore-keys: |
32+
${{ runner.os }}-maven-
33+
- name: Build with Maven
34+
run: mvn -B package

.github/workflows/maven_java1.8.yml

-25
This file was deleted.

.github/workflows/maven_java11.yml

-25
This file was deleted.

.github/workflows/maven_java15.yml

-25
This file was deleted.

0 commit comments

Comments
 (0)