Skip to content

Build with Java 17

Build with Java 17 #14

Workflow file for this run

name: 'Build'
on:
push:
workflow_dispatch:
jobs:
build:
strategy:
matrix:
# os: [ 'ubuntu', 'macos', 'windows' ]
os: [ 'ubuntu', 'windows', 'macos' ]
runs-on: '${{ matrix.os }}-latest'
steps:
- uses: actions/checkout@v4
- uses: browser-actions/setup-chrome@v1
- id: parameters
shell: bash
run: |
OS="${{matrix.os}}"
case $OS in
"ubuntu")
echo "arch=x86" >> $GITHUB_OUTPUT
echo "profile=jvm,js,linux,wasm-js" >> $GITHUB_OUTPUT
echo "dokka=true" >> $GITHUB_OUTPUT
;;
"windows")
echo "arch=x86" >> $GITHUB_OUTPUT
echo "profile=mingw" >> $GITHUB_OUTPUT
echo "dokka=false" >> $GITHUB_OUTPUT
;;
"macos")
echo "arch=arm64" >> $GITHUB_OUTPUT
echo "profile=macos" >> $GITHUB_OUTPUT
echo "dokka=false" >> $GITHUB_OUTPUT
;;
*)
echo "Unable to determine arch from $OS"
exit 1
;;
esac
- name: Set up JDK 11 for ${{ steps.parameters.outputs.arch }}
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'zulu'
cache: gradle
- name: 'Build'
shell: bash
run: |
chmod a+x ./gradlew
echo "::info ::Build profile=${{ steps.parameters.outputs.profile }} on ${{ steps.parameters.outputs.arch }}"
./gradlew build -PbuildProfile=${{ steps.parameters.outputs.profile }} -Pdokka=${{ steps.parameters.outputs.dokka }}
- name: 'Test Report - ${{ matrix.os }}'
if: ${{ success() || failure() }}
uses: dorny/test-reporter@v1
with:
name: 'Test Report - ${{ matrix.os }}'
path: '**/test-results/**/*.xml'
reporter: java-junit