Run CI builds for Java versions 17
and 21
LTS and the latest 23
#11
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
name: CI build | |
on: [push] | |
jobs: | |
builds: | |
name: '${{ matrix.os }} with Java ${{ matrix.jdk }}' | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
jdk: [17, 21, 23] | |
os: [ubuntu-latest, windows-latest] #, macos-13] | |
fail-fast: false | |
max-parallel: 6 | |
timeout-minutes: 30 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Java ${{ matrix.jdk }} | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: ${{ matrix.jdk }} | |
- name: Compile | |
run: | | |
./gradlew jar | |
./gradlew example:jar | |
- name: Test | |
run: | | |
if [[ "$RUNNER_OS" == "Linux" ]]; then | |
export DISPLAY=:99.0 && /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x16; | |
fi | |
./gradlew -DciTest=true test | |
shell: bash | |
- name: Javadoc | |
run: | | |
./gradlew javadoc |