-
Notifications
You must be signed in to change notification settings - Fork 10
71 lines (62 loc) · 1.76 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
69
70
71
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: Java CI with Maven
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ${{ matrix.platform }}
strategy:
matrix:
include:
- jvm: 11
platform: ubuntu-22.04
architecture: x64
- jvm: 17
platform: ubuntu-22.04
architecture: x64
- jvm: 21
platform: ubuntu-22.04
architecture: x64
- jvm: 11
platform: macos-12
architecture: x64
- jvm: 11
platform: macos-14
architecture: aarch64
- jvm: 11
platform: windows-2022
architecture: x64
steps:
- name: install libomp
run: brew install libomp
if: runner.os == 'macOS'
- uses: actions/checkout@v2
with:
lfs: true
- name: Checkout LFS objects
run: git lfs checkout
- name: Set up JDK
uses: actions/setup-java@v2
with:
java-version: ${{ matrix.jvm }}
architecture: ${{ matrix.architecture }}
distribution: 'temurin'
- name: Cache maven packages
uses: actions/cache@v2
env:
cache-name: cache-mvn
with:
path: ~/.m2
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Build with Maven
run: mvn -B compile --file pom.xml
- name: Run tests
run: mvn -B test --file pom.xml