forked from java-native-access/jna
-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (56 loc) · 1.65 KB
/
ci.yaml
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
# Full CI matrix on all pushes to master branch, and all PRs
name: Java CI
on:
workflow_dispatch:
pull_request:
push:
branches:
- master
permissions:
contents: read
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
java: [8, 11, 17, 21, 23-ea]
os: [ubuntu-latest, macos-13, macos-latest]
exclude:
# 23-ea is not available for mac OS
- java: 23-ea
os: macos-latest
# Run all tests even if one fails
fail-fast: false
name: Test JDK ${{ matrix.java }}, ${{ matrix.os }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
with:
egress-policy: audit
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- name: Set up JDK
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
with:
java-version: ${{ matrix.java }}
distribution: 'zulu'
- name: Setup codebase
run: bash setup.sh
- name: Linux requirements
if: contains(matrix.os, 'ubuntu')
run: sudo apt-get -y install texinfo
- name: macOS requirements
if: contains(matrix.os, 'macos')
run: |
brew update
brew install automake --force
brew install libtool --force
brew install texinfo --force
- name: Checkstyle
if: contains(matrix.os, 'ubuntu') && contains(matrix.java, '8')
run: |
ant checkstyle
ant dist
- name: Build with Ant
run: |
ant test
ant test-platform