2019-08-26 20:29:11 +00:00
|
|
|
name: Java CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
2020-11-02 23:56:30 +00:00
|
|
|
paths:
|
|
|
|
- 'src/**'
|
|
|
|
- 'pom.xml'
|
2019-08-26 20:29:11 +00:00
|
|
|
pull_request:
|
2020-03-21 18:08:37 +00:00
|
|
|
paths:
|
2021-08-30 10:15:17 +00:00
|
|
|
- '.github/workflows/**'
|
2020-03-21 18:08:37 +00:00
|
|
|
- 'src/**'
|
|
|
|
- 'pom.xml'
|
2019-08-26 20:29:11 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
|
2020-08-06 07:51:46 +00:00
|
|
|
name: Maven build
|
2019-08-26 20:29:11 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
2020-03-21 11:55:40 +00:00
|
|
|
- name: Checkout repository
|
2022-03-01 18:57:28 +00:00
|
|
|
uses: actions/checkout@v3
|
2021-07-01 14:47:12 +00:00
|
|
|
|
2022-01-16 13:17:50 +00:00
|
|
|
- name: Set up JDK 17
|
2022-02-24 15:22:34 +00:00
|
|
|
uses: actions/setup-java@v3.0.0
|
2019-08-26 20:29:11 +00:00
|
|
|
with:
|
2021-04-05 22:09:26 +00:00
|
|
|
distribution: 'adopt'
|
2022-01-16 13:17:50 +00:00
|
|
|
java-version: '17'
|
2021-12-17 16:54:36 +00:00
|
|
|
java-package: jdk
|
|
|
|
architecture: x64
|
2021-07-01 14:47:12 +00:00
|
|
|
|
|
|
|
- name: Cache Maven packages
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: ~/.m2
|
|
|
|
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
|
|
|
|
restore-keys: ${{ runner.os }}-m2
|
|
|
|
|
2019-08-26 20:29:11 +00:00
|
|
|
- name: Build with Maven
|
2020-11-02 23:56:43 +00:00
|
|
|
run: mvn package --file pom.xml
|