Unstable: Integration #33
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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: 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: Java Flags | |
run: | | |
# if java is greater than 17, we need to enable the security manager | |
if [ ${{ matrix.java }} -gt 17 ]; then | |
export ANT_OPTS="-Djava.security.manager=allow" | |
# enable for subsequent tasks | |
echo "ANT_OPTS=-Djava.security.manager=allow" >> $GITHUB_ENV | |
fi | |
- 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 | |
- name: Local Deploy | |
run: ant deploy-local | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: jna-maven-bundle-${{ matrix.os }}-jdk${{ matrix.java }}-${{ github.sha }} | |
path: build/stage | |
if-no-files-found: error | |
retention-days: 14 | |
compression-level: 1 | |
overwrite: true | |
# test-graalvm: | |
# strategy: | |
# matrix: | |
# java: [21] | |
# os: [ubuntu-latest] | |
# fail-fast: true | |
# name: GraalVM Native | |
# uses: ./.github/workflows/graalvm.yaml | |
# with: | |
# runner: ${{ matrix.os }} | |
# java: ${{ matrix.java }} |