2020-06-21 16:14:29 -04:00
|
|
|
name: Build
|
2023-04-23 08:02:02 -04:00
|
|
|
on: [push, pull_request, merge_group]
|
2020-06-21 16:14:29 -04:00
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2024-04-03 10:46:52 -04:00
|
|
|
java: [21-ubuntu]
|
2023-05-30 08:07:11 -04:00
|
|
|
runs-on: ubuntu-22.04
|
2020-11-05 13:12:01 -05:00
|
|
|
container:
|
2023-10-01 07:36:35 -04:00
|
|
|
image: mcr.microsoft.com/openjdk/jdk:${{ matrix.java }}
|
2020-11-05 13:12:01 -05:00
|
|
|
options: --user root
|
2020-06-21 16:14:29 -04:00
|
|
|
steps:
|
2023-10-01 07:36:35 -04:00
|
|
|
- uses: actions/checkout@v4
|
2021-11-12 07:48:58 -05:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2024-04-03 10:22:00 -04:00
|
|
|
- uses: gradle/wrapper-validation-action@v2
|
|
|
|
- run: ./gradlew check build publishToMavenLocal --stacktrace
|
2022-09-09 07:45:06 -04:00
|
|
|
- uses: Juuxel/publish-checkstyle-report@v1
|
|
|
|
if: ${{ failure() }}
|
|
|
|
with:
|
|
|
|
reports: |
|
|
|
|
**/build/reports/checkstyle/*.xml
|
2024-04-03 10:22:00 -04:00
|
|
|
- uses: actions/upload-artifact@v4
|
2020-06-21 16:14:29 -04:00
|
|
|
with:
|
2024-04-03 10:22:00 -04:00
|
|
|
name: Artifacts ${{ matrix.java }}
|
|
|
|
path: |
|
|
|
|
build/libs/
|
|
|
|
./*/build/libs/
|
|
|
|
build/publishMods/
|
|
|
|
- uses: actions/upload-artifact@v4
|
2020-06-21 16:14:29 -04:00
|
|
|
with:
|
2024-04-03 10:22:00 -04:00
|
|
|
name: Maven Local ${{ matrix.java }}
|
2023-08-02 13:51:21 -04:00
|
|
|
path: /root/.m2/repository/net/fabricmc/
|
2022-11-22 11:49:00 -05:00
|
|
|
|
|
|
|
client_test:
|
|
|
|
runs-on: ubuntu-22.04
|
|
|
|
steps:
|
2023-10-01 07:36:35 -04:00
|
|
|
- uses: actions/checkout@v4
|
2022-11-22 11:49:00 -05:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2024-04-03 10:22:00 -04:00
|
|
|
- uses: actions/setup-java@v4
|
2022-11-22 11:49:00 -05:00
|
|
|
with:
|
|
|
|
distribution: 'microsoft'
|
2024-04-03 10:48:30 -04:00
|
|
|
java-version: '21'
|
2022-11-22 11:49:00 -05:00
|
|
|
- name: Run Auto test Client
|
|
|
|
uses: modmuss50/xvfb-action@v1
|
|
|
|
with:
|
|
|
|
run: ./gradlew runProductionAutoTestClient --stacktrace --warning-mode=fail
|
2024-04-03 10:22:00 -04:00
|
|
|
- uses: actions/upload-artifact@v4
|
2022-11-22 11:49:00 -05:00
|
|
|
if: always()
|
|
|
|
with:
|
|
|
|
name: Test Screenshots
|
|
|
|
path: run/screenshots
|
2022-12-11 08:49:21 -05:00
|
|
|
|
|
|
|
server_test:
|
|
|
|
runs-on: ubuntu-22.04
|
|
|
|
steps:
|
2023-10-01 07:36:35 -04:00
|
|
|
- uses: actions/checkout@v4
|
2022-12-11 08:49:21 -05:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2024-04-03 10:22:00 -04:00
|
|
|
- uses: actions/setup-java@v4
|
2022-12-11 08:49:21 -05:00
|
|
|
with:
|
|
|
|
distribution: 'microsoft'
|
2024-04-03 10:48:30 -04:00
|
|
|
java-version: '21'
|
2022-12-11 08:49:21 -05:00
|
|
|
- run: mkdir run && echo "eula=true" >> run/eula.txt
|
|
|
|
- run: ./gradlew runProductionAutoTestServer --stacktrace --warning-mode=fail
|
2023-02-13 04:30:39 -05:00
|
|
|
|
|
|
|
check_resources:
|
|
|
|
runs-on: ubuntu-22.04
|
|
|
|
steps:
|
2023-10-01 07:36:35 -04:00
|
|
|
- uses: actions/checkout@v4
|
2023-02-13 04:30:39 -05:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2024-04-03 10:22:00 -04:00
|
|
|
- uses: actions/setup-java@v4
|
2023-02-13 04:30:39 -05:00
|
|
|
with:
|
|
|
|
distribution: 'microsoft'
|
2024-04-03 10:50:07 -04:00
|
|
|
java-version: '21'
|
2023-02-13 04:30:39 -05:00
|
|
|
- run: ./gradlew generateResources --stacktrace --warning-mode=fail
|
|
|
|
- run: if [ -n "$(git status --porcelain)" ]; then exit 1; fi
|