Create build workflow #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI Build Check | |
| on: | |
| push: | |
| branches: [ main, develop ] | |
| pull_request: | |
| branches: [ main, develop ] | |
| jobs: | |
| build: | |
| strategy: | |
| matrix: | |
| os: [windows-latest, macos-latest, ubuntu-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # LibGDX typically uses Java 11 or newer | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| # Cache Gradle dependencies to speed up subsequent runs | |
| cache: 'gradle' | |
| # Grant execute permission for gradlew (necessary for macOS and Linux) | |
| - name: Grant execute permission for gradlew | |
| run: chmod +x gradlew | |
| # Use an 'if' condition to only run this on non-Windows OS | |
| if: startsWith(runner.os, 'macOS') || startsWith(runner.os, 'Linux') | |
| # This task compiles all modules (core, desktop, etc.) | |
| - name: Build with Gradle | |
| run: ./gradlew build |