Skip to content

Use plain access operations #129

Use plain access operations

Use plain access operations #129

name: Build and run tests
on:
push:
pull_request:
branches:
- master
permissions:
contents: read
checks: write
pull-requests: write
jobs:
build:
name: Build and run tests on JDK ${{ matrix.jdk }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
jdk: [8, 11, 17, 21, 23, 24, 25]
include:
- jdk: 8
main_jdk: 8
second_jdk: 21
- jdk: 25
main_jdk: 8
second_jdk: 25
steps:
- uses: actions/checkout@v3
- name: Set up Java
uses: actions/setup-java@v3
with:
# All versions are added to the PATH. The last version will be used and available globally.
java-version: |
${{ matrix.second_jdk || '8' }}
${{ matrix.main_jdk || matrix.jdk }}
distribution: 'zulu'
- name: Setup dependencies
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt install gcc \
apt install libssl-dev \
- name: Build and run checks and tests on JDK ${{matrix.jdk}}
run: ./gradlew jar allTests -Pci=true --scan --debug -Ptest.jdk=${{matrix.jdk}}
- name: Publish test results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
files: "build/test-results/**/*.xml"
check_name: "Test results on JDK ${{ matrix.jdk }}"