Skip to content

test java 21 build #784

test java 21 build

test java 21 build #784

Workflow file for this run

name: Josm Scripting Plugin
on:
push:
branches:
- master
pull_request:
branches:
- master
schedule:
# build once every day
- cron: '0 1 * * *'
permissions:
contents: read
jobs:
build:
strategy:
matrix:
platform:
- ubuntu-latest
# - windows-latest
josm-version:
- latest
# - tested
# - release
jdk:
# - 17
- 21
name: Build plugin on ${{ matrix.platform }} - JDK ${{ matrix.jdk }}, minJosmVersion=${{ matrix.josm-version }}
runs-on: ${{ matrix.platform }}
env:
JAVA_OPTS: "-Xmx6G"
steps:
# Determines the name of the GraalVM platform and stores in the environment
# variable GRAALVM_PLATFORM
- name: Set GraalVM platform for ubuntu-latest
if: ${{ matrix.platform == 'ubuntu-latest' }}
run: echo "GRAALVM_PLATFORM=linux-amd64" >> $GITHUB_ENV
- name: Set GraalVM platform for windows-latest
if: ${{ matrix.platform == 'windows-latest' }}
run: echo "GRAALVM_PLATFORM=windows-amd64" >> $env:GITHUB_ENV
- uses: actions/checkout@v3
- name: Set up JDK ${{ matrix.jdk }}
uses: actions/setup-java@v3
with:
java-version: '${{ matrix.jdk }}'
distribution: 'microsoft' # Microsoft's build of OpenJDK
cache: 'gradle'
# headless X11 setup according to
# https://stackoverflow.com/questions/68292797/running-java-gui-tests-on-github-using-xvfb
- name: Set up virtual X11
if: ${{ matrix.platform == 'ubuntu-latest' }}
run: sudo apt-get -y install xvfb
- name: Start virtual frame buffer
if: ${{ matrix.platform == 'ubuntu-latest' }}
run: Xvfb :19 -screen 0 1024x768x16 &
- name: Build with Gradle
uses: gradle/[email protected]
env:
DISPLAY: ":19"
OSM_DEV_API_PASSWORD: "${{ secrets.OSM_DEV_API_PASSWORD }}"
with:
arguments: |
build
-Pplugin.josmCompileVersion=${{ matrix.josm-version}}
-Pgraalvm.jdk=jdk${{ matrix.jdk }}
-Pgraalvm.platform=${{ env.GRAALVM_PLATFORM }}
- name: Store reports
if: failure()
uses: actions/upload-artifact@v3
with:
name: reports
path: |
**/build/reports/
**/build/test-results/