Skip to content

Added macos build

Added macos build #13

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: '11'
distribution: 'zulu'
# architecture: ${{ steps.parameters.outputs.arch }}
- 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