name: Validate
on:
  push:
    branches:
      - master
  pull_request:

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

jobs:
  run_tests:
    name: Run Tests
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v5

      - uses: actions/setup-java@v5
        with:
          distribution: 'temurin'
          java-version: '17'
          architecture: x64

      - name: Setup Cl
        run: ./scripts/SetupClUnix.sh

      - name: Set up gradle
        uses: gradle/actions/setup-gradle@v5

      - name: Build check
        run: ./gradlew :desktop:packageUberJarForCurrentOS :android:assembleDebug
