Skip to content

Commit

Permalink
Rework CI to add multi-version build and Maven repository caching
Browse files Browse the repository at this point in the history
  • Loading branch information
scordio committed Aug 15, 2021
1 parent 17e5732 commit d853d18
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 75 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Java CI with Maven

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:

jobs:
build:
name: Java ${{ matrix.java }}
strategy:
fail-fast: false
matrix:
java: [ 8, 11, 16, 17-ea, 18-ea ]
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Setup Java
uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: ${{ matrix.java }}
- name: Cache local Maven repository
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Build with Maven
run: mvn -B package
25 changes: 0 additions & 25 deletions .github/workflows/maven_java1.8.yml

This file was deleted.

25 changes: 0 additions & 25 deletions .github/workflows/maven_java11.yml

This file was deleted.

25 changes: 0 additions & 25 deletions .github/workflows/maven_java15.yml

This file was deleted.

0 comments on commit d853d18

Please sign in to comment.