-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improved build.yml, removed redundant remapping and compiling, added …
…maven local cache load job to all tasks that need to build.
- Loading branch information
Showing
1 changed file
with
69 additions
and
107 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -143,9 +143,9 @@ jobs: | |
name: Lusk.jar | ||
path: build/libs/*.jar | ||
|
||
|
||
test_build: | ||
runs-on: ubuntu-latest | ||
needs: [ build ] | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
|
@@ -170,111 +170,15 @@ jobs: | |
restore-keys: | | ||
maven-${{ runner.os }}- | ||
- name: Set up JDK 16 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: 16 | ||
distribution: 'adopt' | ||
- name: Compile Spigot 1.16.5-1.17.x | ||
uses: SpraxDev/[email protected] | ||
with: | ||
versions: "1.16.5,1.17,1.17.1" | ||
remapped: true | ||
|
||
- name: Remap 1.17 | ||
run: ./gradlew nms:nms_v1_17:build | ||
|
||
- name: Remap 1.17.1 | ||
run: ./gradlew nms:nms_v1_17_1:build | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: 17 | ||
distribution: 'adopt' | ||
|
||
- name: Compile Spigot 1.18.x | ||
uses: SpraxDev/[email protected] | ||
with: | ||
versions: "1.18,1.18.1,1.18.2" | ||
remapped: true | ||
|
||
- name: Remap 1.18 | ||
run: ./gradlew nms:nms_v1_18:build | ||
|
||
- name: Remap 1.18.1 | ||
run: ./gradlew nms:nms_v1_18_1:build | ||
|
||
- name: Remap 1.18.2 | ||
run: ./gradlew nms:nms_v1_18_2:build | ||
|
||
- name: Compile Spigot 1.19.x | ||
uses: SpraxDev/[email protected] | ||
with: | ||
versions: "1.19,1.19.1,1.19.3,1.19.4" | ||
remapped: true | ||
|
||
- name: Remap 1.19 | ||
run: ./gradlew nms:nms_v1_19:build | ||
|
||
- name: Remap 1.19.1 | ||
run: ./gradlew nms:nms_v1_19_1:build | ||
|
||
- name: Remap 1.19.3 | ||
run: ./gradlew nms:nms_v1_19_3:build | ||
|
||
- name: Remap 1.19.4 | ||
run: ./gradlew nms:nms_v1_19_4:build | ||
|
||
- name: Set up JDK 21 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: 21 | ||
distribution: 'adopt' | ||
|
||
- name: Compile Spigot 1.20.x | ||
uses: SpraxDev/[email protected] | ||
with: | ||
versions: "1.20.1,1.20.2,1.20.4,1.20.6" | ||
remapped: true | ||
|
||
- name: Remap 1.20.1 | ||
run: ./gradlew nms:nms_v1_20_1:build | ||
|
||
- name: Remap 1.20.2 | ||
run: ./gradlew nms:nms_v1_20_2:build | ||
|
||
- name: Remap 1.20.4 | ||
run: ./gradlew nms:nms_v1_20_4:build | ||
|
||
- name: Remap 1.20.6 | ||
run: ./gradlew nms:nms_v1_20_6:build | ||
|
||
- name: Compile Spigot 1.21.x | ||
uses: SpraxDev/[email protected] | ||
with: | ||
versions: "1.21.1,1.21.3,1.21.4" | ||
remapped: true | ||
|
||
- name: Remap 1.21.1 | ||
run: ./gradlew nms:nms_v1_21_1:build | ||
|
||
- name: Remap 1.21.3 | ||
run: ./gradlew nms:nms_v1_21_3:build | ||
|
||
- name: Remap 1.21.4 | ||
run: ./gradlew nms:nms_v1_21_4:build | ||
|
||
- name: Build with Gradle | ||
run: ./gradlew build | ||
|
||
- name: Save Maven Local Cache | ||
id: cache-maven-save | ||
uses: actions/cache/save@v4 | ||
with: | ||
path: ~/.m2/repository | ||
key: ${{ steps.cache-maven-restore.outputs.cache-primary-key }} | ||
|
||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
|
@@ -284,7 +188,7 @@ jobs: | |
v1_16_5: | ||
if: "! contains(toJSON(github.event.commits.*.message), '[ci skip]')" | ||
runs-on: ubuntu-latest | ||
needs: [test_build] | ||
needs: [ build ] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
|
@@ -297,6 +201,16 @@ jobs: | |
java-version: '16' | ||
distribution: 'adopt' | ||
cache: gradle | ||
|
||
- name: Restore Maven Local Cache | ||
id: cache-maven-restore | ||
uses: actions/cache/restore@v4 | ||
with: | ||
path: ~/.m2/repository | ||
key: maven-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/settings.gradle') }} | ||
restore-keys: | | ||
maven-${{ runner.os }}- | ||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
- name: Build Lusk and run test scripts | ||
|
@@ -308,12 +222,10 @@ jobs: | |
name: lusk-nightly.jar | ||
path: build/libs/* | ||
|
||
|
||
|
||
v1_17_x: | ||
if: "! contains(toJSON(github.event.commits.*.message), '[ci skip]')" | ||
runs-on: ubuntu-latest | ||
needs: [test_build] | ||
needs: [ build ] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
|
@@ -326,6 +238,16 @@ jobs: | |
java-version: '17' | ||
distribution: 'adopt' | ||
cache: gradle | ||
|
||
- name: Restore Maven Local Cache | ||
id: cache-maven-restore | ||
uses: actions/cache/restore@v4 | ||
with: | ||
path: ~/.m2/repository | ||
key: maven-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/settings.gradle') }} | ||
restore-keys: | | ||
maven-${{ runner.os }}- | ||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
- name: Build Lusk and run test scripts | ||
|
@@ -340,7 +262,7 @@ jobs: | |
v1_18_x: | ||
if: "! contains(toJSON(github.event.commits.*.message), '[ci skip]')" | ||
runs-on: ubuntu-latest | ||
needs: [test_build] | ||
needs: [ build ] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
|
@@ -353,6 +275,16 @@ jobs: | |
java-version: '17' | ||
distribution: 'adopt' | ||
cache: gradle | ||
|
||
- name: Restore Maven Local Cache | ||
id: cache-maven-restore | ||
uses: actions/cache/restore@v4 | ||
with: | ||
path: ~/.m2/repository | ||
key: maven-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/settings.gradle') }} | ||
restore-keys: | | ||
maven-${{ runner.os }}- | ||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
- name: Build Lusk and run test scripts | ||
|
@@ -367,7 +299,7 @@ jobs: | |
v1_19_x: | ||
if: "! contains(toJSON(github.event.commits.*.message), '[ci skip]')" | ||
runs-on: ubuntu-latest | ||
needs: [test_build] | ||
needs: [ build ] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
|
@@ -380,6 +312,16 @@ jobs: | |
java-version: '17' | ||
distribution: 'adopt' | ||
cache: gradle | ||
|
||
- name: Restore Maven Local Cache | ||
id: cache-maven-restore | ||
uses: actions/cache/restore@v4 | ||
with: | ||
path: ~/.m2/repository | ||
key: maven-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/settings.gradle') }} | ||
restore-keys: | | ||
maven-${{ runner.os }}- | ||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
- name: Build Lusk and run test scripts | ||
|
@@ -394,7 +336,7 @@ jobs: | |
v1_20_x: | ||
if: "! contains(toJSON(github.event.commits.*.message), '[ci skip]')" | ||
runs-on: ubuntu-latest | ||
needs: [test_build] | ||
needs: [ build ] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
|
@@ -407,6 +349,16 @@ jobs: | |
java-version: '21' | ||
distribution: 'adopt' | ||
cache: gradle | ||
|
||
- name: Restore Maven Local Cache | ||
id: cache-maven-restore | ||
uses: actions/cache/restore@v4 | ||
with: | ||
path: ~/.m2/repository | ||
key: maven-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/settings.gradle') }} | ||
restore-keys: | | ||
maven-${{ runner.os }}- | ||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
- name: Build Lusk and run test scripts | ||
|
@@ -421,7 +373,7 @@ jobs: | |
v1_21_x: | ||
if: "! contains(toJSON(github.event.commits.*.message), '[ci skip]')" | ||
runs-on: ubuntu-latest | ||
needs: [test_build] | ||
needs: [ build ] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
|
@@ -434,6 +386,16 @@ jobs: | |
java-version: '21' | ||
distribution: 'adopt' | ||
cache: gradle | ||
|
||
- name: Restore Maven Local Cache | ||
id: cache-maven-restore | ||
uses: actions/cache/restore@v4 | ||
with: | ||
path: ~/.m2/repository | ||
key: maven-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/settings.gradle') }} | ||
restore-keys: | | ||
maven-${{ runner.os }}- | ||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
- name: Build Lusk and run test scripts | ||
|
@@ -447,7 +409,7 @@ jobs: | |
|
||
test_dev_feature: | ||
runs-on: ubuntu-latest | ||
needs: [test_build] | ||
needs: [ test_build ] | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v2 | ||
|
@@ -465,7 +427,7 @@ jobs: | |
|
||
test_dev_patch: | ||
runs-on: ubuntu-latest | ||
needs: [test_build] | ||
needs: [ test_build ] | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v2 | ||
|