Skip to content

Setup improvement

Setup improvement #25

Workflow file for this run

name: Build
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
types: [ opened, synchronize, reopened, ready_for_review ]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
lint:
name: Spotless check
runs-on: macos-latest
steps:
- name: Check out code
uses: actions/[email protected]
- name: Set up JDK
uses: actions/[email protected]
with:
distribution: 'corretto'
java-version: 17
- name: spotless
run: ./gradlew spotlessCheck
api_check:
name: API check
runs-on: macos-latest
steps:
- name: Check out code
uses: actions/[email protected]
- name: Set up JDK
uses: actions/[email protected]
with:
distribution: 'corretto'
java-version: 17
- name: API check
run: ./gradlew apiCheck
build:
strategy:
matrix:
platform: [ android, ios, web-wasm, web-js, desktop ]
include:
- platform: android
os: ubuntu-latest
- platform: web-wasm
os: ubuntu-latest
- platform: web-js
os: ubuntu-latest
- platform: ios
os: macos-latest
- platform: desktop
os: macos-latest
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/[email protected]
- name: Java and Gradle set up
if: matrix.platform != 'ios'
uses: ./.github/workflows/setup/java-setup
- name: iOS set up
if: matrix.platform == 'ios'
uses: ./.github/workflows/setup/ios-setup
# Android
- name: Grant execute permission for Android script
if: matrix.platform == 'android'
run: chmod +x ./scripts/build_android.sh
- name: Build Android
if: matrix.platform == 'android'
run: ./scripts/build_android.sh
# iOS
- name: Grant execute permission for iOS script
if: matrix.platform == 'ios'
run: chmod +x ./scripts/build_ios.sh
- name: Build iOS
if: matrix.platform == 'ios'
run: ./scripts/build_ios.sh
# Web-WASM
- name: Grant execute permission for Web WASM script
if: matrix.platform == 'web-wasm'
run: chmod +x ./scripts/build_web_wasm.sh
- name: Build Web WASM
if: matrix.platform == 'web-wasm'
run: ./scripts/build_web_wasm.sh
# Web-JS
- name: Grant execute permission for Web JS script
if: matrix.platform == 'web-js'
run: chmod +x ./scripts/build_web_js.sh
- name: Build Web JS
if: matrix.platform == 'web-js'
run: ./scripts/build_web_js.sh
# MacOS
- name: Grant execute permission for MacOS script
if: matrix.platform == 'desktop'
run: chmod +x ./scripts/build_macos.sh
- name: Build MacOS
if: matrix.platform == 'desktop'
run: ./scripts/build_macos.sh