Java CI #3684
Workflow file for this run
This file contains 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: Java CI | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up JDK | |
uses: actions/setup-java@v2 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- name: Cache | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
./.gradle/loom-cache/remapped-mods | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/build.gradle', '**/gradle-wrapper.properties') }} | |
- name: Check lang files | |
run: ./scripts/check_lang.sh | |
- name: Build GoG | |
run: make -C garden_of_glass jar | |
- name: Build with Gradle | |
run: ./gradlew pmdMain spotlessJavaCheck build | |
- name: PMD report | |
uses: jwgmeligmeyling/pmd-github-action@v1 | |
if: failure() | |
with: | |
path: '**/reports/pmd/main.xml' | |
- name: Check generated files up to date | |
run: ./scripts/check_datagen.sh | |
- name: Run GameTests (Fabric) | |
run: ./gradlew :Fabric:runGameTest | |
- name: Archive Fabric Binaries | |
uses: actions/upload-artifact@v2 | |
with: | |
name: Fabric | |
path: Fabric/build/libs/*.jar | |
- name: Archive Forge Binaries | |
uses: actions/upload-artifact@v2 | |
with: | |
name: Forge | |
path: Forge/build/libs/*.jar | |
- name: Archive GoG Binary | |
uses: actions/upload-artifact@v2 | |
with: | |
name: GoG | |
path: garden_of_glass/*.jar | |
- name: Cleanup | |
run: ./gradlew --stop |