-
Notifications
You must be signed in to change notification settings - Fork 209
81 lines (67 loc) · 2.2 KB
/
auto-os-matrix.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
72
73
74
75
76
77
78
79
80
81
name: DataSketches-Java Auto OS Matrix Test & Install
on:
pull_request:
push:
branches: [ master, main ]
workflow_dispatch:
env:
MAVEN_OPTS: -Xmx1g -Xms1g
jobs:
build:
name: Build, Test, Install
strategy:
fail-fast: false
matrix:
jdk: [ 17 ]
os: [ windows-latest, ubuntu-latest, macos-latest ]
include:
- os: windows-latest
skip_javadoc: "`-Dmaven`.javadoc`.skip=true"
skip_gpg: "`-Dgpg`.skip=true"
- os: ubuntu-latest
skip_javadoc: -Dmaven.javadoc.skip=true
skip_gpg: -Dgpg.skip=true
- os: macos-latest
skip_javadoc: -Dmaven.javadoc.skip=true
skip_gpg: -Dgpg.skip=true
runs-on: ${{matrix.os}}
env:
JDK_VERSION: ${{ matrix.jdk }}
steps:
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Cache local Maven repository
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: build-${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: build-${{ runner.os }}-maven-
- name: Install Matrix JDK
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.jdk }}
distribution: 'temurin'
java-package: jdk
architecture: x64
- name: Echo Java Version
run: >
java -version
- name: Test
run: >
mvn clean test
${{matrix.os.skip_javadoc}}
${{matrix.os.skip_gpg}}
- name: Install
run: >
mvn clean install -B
${{matrix.os.skip_javadoc}}
-D skipTests=true
${{matrix.os.skip_gpg}}
# Architecture options: x86, x64, armv7, aarch64, ppc64le
# setup-java@v4 has a "with cache" option
# Lifecycle: validate, compile, test, package, verify, install, deploy
# -B batch mode
# -V show Version without stopping
# -q quiet, only show errors