-
Notifications
You must be signed in to change notification settings - Fork 15
116 lines (111 loc) · 3.54 KB
/
gradle.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
name: Build Check and Publish
on:
workflow_dispatch:
push:
branches:
- "1.21.2"
tags:
- "!*"
pull_request:
branches:
- "1.21.2"
permissions:
contents: read
packages: read
jobs:
assemble:
runs-on: ubuntu-latest
container:
image: ghcr.io/kotori316/quarry-cache:1.21.2
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
options: '--user root'
steps:
- uses: actions/checkout@v4
- uses: gradle/actions/wrapper-validation@v4
- run: chmod +x ./gradlew
- run: ./gradlew assemble --scan
- run: ./gradlew data checkReleaseVersion --no-parallel
platforms:
runs-on: ubuntu-latest
container:
image: ghcr.io/kotori316/quarry-cache:1.21.2
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
options: '--user root'
strategy:
fail-fast: false
matrix:
platform:
- common
- fabric
- forge
- neoforge
env:
DISABLE_FORGE: ${{ matrix.platform != 'forge' }}
DISABLE_FABRIC: ${{ matrix.platform != 'fabric' }}
DISABLE_NEOFORGE: ${{ matrix.platform != 'neoforge' }}
steps:
- uses: actions/checkout@v4
- uses: gradle/actions/wrapper-validation@v4
- run: ls -al && whoami
- name: Compile main ${{ matrix.platform }}
run: ./gradlew :${{ matrix.platform }}:classes
- name: Compile test ${{ matrix.platform }}
run: ./gradlew :${{ matrix.platform }}:testClasses
- name: Get run resources
if: matrix.platform != 'neoforge' && matrix.platform != 'common'
run: |
(./gradlew downloadAssets) || \
(sleep 5 && ./gradlew downloadAssets) || \
(sleep 5 && ./gradlew downloadAssets) || true
- name: JUnit ${{ matrix.platform }}
run: ./gradlew :${{ matrix.platform }}:test
env:
TEST_UTILITY_LOG_ALL_TEST: true
IGNORE_OTHER_MODS_IN_RUNTIME: true
- name: Data ${{ matrix.platform }}
if: matrix.platform != 'common'
run: ./gradlew :${{ matrix.platform }}:runData
env:
TEST_UTILITY_LOG_ALL_DATA: true
IGNORE_OTHER_MODS_IN_RUNTIME: true
RUN_DATA: true
- name: 'Data common(in NeoForge module)'
if: matrix.platform == 'neoforge'
run: ./gradlew :${{ matrix.platform }}:runCommonData
env:
TEST_UTILITY_LOG_ALL_DATA: true
IGNORE_OTHER_MODS_IN_RUNTIME: true
RUN_DATA: true
- name: Check updated files
if: false
run: git diff --exit-code
- name: GameTest ${{ matrix.platform }}
if: matrix.platform != 'common'
run: ./gradlew :${{ matrix.platform }}:runGameTestServer
env:
TEST_UTILITY_LOG_ALL_TEST: true
IGNORE_OTHER_MODS_IN_RUNTIME: true
RUN_GAME_TEST: true
- name: Check report
run: |
! test -d "${{ matrix.platform }}/game-test/crash-reports"
- name: Upload failed test report
if: failure()
uses: actions/upload-artifact@v4
with:
path: |
${{ matrix.platform }}/build/reports/tests/*
${{ matrix.platform }}/game-test/crash-reports/*
name: Test-Report-${{ github.run_number }}-QuarryPlus-${{ matrix.platform }}
merge-checker:
if: always()
needs:
- assemble
- platforms
uses: 'Kotori316/common-script/.github/workflows/merge-checker.yaml@main'
with:
needs: ${{ toJSON(needs) }}