From dde34a2a865a23d10a0213ada51acd9e40112444 Mon Sep 17 00:00:00 2001 From: Faboslav Date: Mon, 14 Aug 2023 19:04:03 +0200 Subject: [PATCH 01/27] workflow test --- .github/workflows/build.yml | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b508b7bd8..111b3ec8d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -30,4 +30,35 @@ jobs: ${{ runner.os }}-build- - name: "Build with gradle" - run: ./gradlew build \ No newline at end of file + run: ./gradlew build + + run-fabric-client: + needs: build + runs-on: ubuntu-latest + name: "Run fabric client" + timeout-minutes: 30 + + steps: + - name: "Run fabric client" + run: ./gradlew fabric:runClient + + run-forge-client: + needs: build + runs-on: ubuntu-latest + name: "Run forge client" + timeout-minutes: 30 + + steps: + - name: "Run forge client" + run: ./gradlew forge:runClient + + + run-quilt-client: + needs: build + runs-on: ubuntu-latest + name: "Run quilt client" + timeout-minutes: 30 + + steps: + - name: "Run quilt client" + run: ./gradlew quilt:runClient \ No newline at end of file From e98c13825fb338ea02e39f7f196998969817c741 Mon Sep 17 00:00:00 2001 From: Faboslav Date: Mon, 14 Aug 2023 19:11:37 +0200 Subject: [PATCH 02/27] workflow test --- .github/workflows/build.yml | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 111b3ec8d..438fb861d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -39,26 +39,28 @@ jobs: timeout-minutes: 30 steps: + - name: "Checkout repository" + uses: actions/checkout@v3.5.3 + with: + fetch-depth: 0 + - name: "Run fabric client" run: ./gradlew fabric:runClient - run-forge-client: + run-fabric-server: needs: build runs-on: ubuntu-latest - name: "Run forge client" + name: "Run fabric server" timeout-minutes: 30 steps: - - name: "Run forge client" - run: ./gradlew forge:runClient - + - name: "Checkout repository" + uses: actions/checkout@v3.5.3 + with: + fetch-depth: 0 - run-quilt-client: - needs: build - runs-on: ubuntu-latest - name: "Run quilt client" - timeout-minutes: 30 + - name: "Accept eula" + run: mkdir -p fabric/run && echo "eula=true" > fabric/run/eula.txt - steps: - - name: "Run quilt client" - run: ./gradlew quilt:runClient \ No newline at end of file + - name: "Run fabric server" + run: ./gradlew fabric:runClient \ No newline at end of file From 34c09e8292e689b9d842d2dab09d3de4f9fbc8ff Mon Sep 17 00:00:00 2001 From: Faboslav Date: Mon, 14 Aug 2023 19:22:14 +0200 Subject: [PATCH 03/27] workflow test --- .github/workflows/build.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 438fb861d..2b0ee6a6b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,6 +11,8 @@ jobs: steps: - name: "Checkout repository" uses: actions/checkout@v3.5.3 + with: + fetch-depth: 0 - name: "Set up JDK" uses: actions/setup-java@v3.12.0 @@ -44,6 +46,23 @@ jobs: with: fetch-depth: 0 + - name: "Set up JDK" + uses: actions/setup-java@v3.12.0 + with: + distribution: "temurin" + java-version: 17 + + - name: "Initialize caches" + uses: actions/cache@v3.3.1 + with: + path: | + ~/.gradle/caches + ~/.gradle/loom-cache + ~/.gradle/wrapper + key: ${{ runner.os }}-build-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }} + restore-keys: | + ${{ runner.os }}-build- + - name: "Run fabric client" run: ./gradlew fabric:runClient @@ -59,6 +78,23 @@ jobs: with: fetch-depth: 0 + - name: "Set up JDK" + uses: actions/setup-java@v3.12.0 + with: + distribution: "temurin" + java-version: 17 + + - name: "Initialize caches" + uses: actions/cache@v3.3.1 + with: + path: | + ~/.gradle/caches + ~/.gradle/loom-cache + ~/.gradle/wrapper + key: ${{ runner.os }}-build-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }} + restore-keys: | + ${{ runner.os }}-build- + - name: "Accept eula" run: mkdir -p fabric/run && echo "eula=true" > fabric/run/eula.txt From 6f11946d976e1d463acfc67151628c872e853bae Mon Sep 17 00:00:00 2001 From: Faboslav Date: Mon, 14 Aug 2023 20:03:10 +0200 Subject: [PATCH 04/27] workflow test --- .github/workflows/build.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2b0ee6a6b..7445db60d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -64,7 +64,9 @@ jobs: ${{ runner.os }}-build- - name: "Run fabric client" - run: ./gradlew fabric:runClient + uses: modmuss50/xvfb-action@v1 + with: + run: ./gradlew fabric:runClient run-fabric-server: needs: build @@ -99,4 +101,4 @@ jobs: run: mkdir -p fabric/run && echo "eula=true" > fabric/run/eula.txt - name: "Run fabric server" - run: ./gradlew fabric:runClient \ No newline at end of file + run: ./gradlew fabric:runServer --args="nogui" \ No newline at end of file From a3329fd0cccfe02cf7c51b94b042e8a62b0aeab1 Mon Sep 17 00:00:00 2001 From: Faboslav Date: Mon, 14 Aug 2023 20:28:49 +0200 Subject: [PATCH 05/27] workflow test --- .github/scripts/run-fabric-client.sh | 13 +++++++++++++ .github/scripts/run-fabric-server.sh | 13 +++++++++++++ .github/workflows/build.yml | 7 ++++--- 3 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 .github/scripts/run-fabric-client.sh create mode 100644 .github/scripts/run-fabric-server.sh diff --git a/.github/scripts/run-fabric-client.sh b/.github/scripts/run-fabric-client.sh new file mode 100644 index 000000000..e7f0ab90b --- /dev/null +++ b/.github/scripts/run-fabric-client.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +# Start Gradle task in the background +./gradlew fabric:runClient > gradle_output.txt 2>&1 & + +# Monitor output for the desired text using a regular expression +TARGET_PATTERN='minecraft:textures/atlas/mob_effects\.png-atlas' +while ! grep -Eq "$TARGET_PATTERN" gradle_output.txt; do + sleep 1 +done + +# Stop the Gradle task +pkill -P $$ \ No newline at end of file diff --git a/.github/scripts/run-fabric-server.sh b/.github/scripts/run-fabric-server.sh new file mode 100644 index 000000000..8230a21bd --- /dev/null +++ b/.github/scripts/run-fabric-server.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +# Start Gradle task in the background +./gradlew fabric:runServer --args="nogui" > gradle_output.txt 2>&1 & + +# Monitor output for the desired text using a regular expression +TARGET_PATTERN='For help, type "help"' +while ! grep -Eq "$TARGET_PATTERN" gradle_output.txt; do + sleep 1 +done + +# Stop the Gradle task +pkill -P $$ \ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7445db60d..f1c2347fe 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -66,8 +66,8 @@ jobs: - name: "Run fabric client" uses: modmuss50/xvfb-action@v1 with: - run: ./gradlew fabric:runClient - + run: ./.github/scripts/run-fabric-client.sh + shell: bash run-fabric-server: needs: build runs-on: ubuntu-latest @@ -101,4 +101,5 @@ jobs: run: mkdir -p fabric/run && echo "eula=true" > fabric/run/eula.txt - name: "Run fabric server" - run: ./gradlew fabric:runServer --args="nogui" \ No newline at end of file + run: ./.github/scripts/run-fabric-server.sh + shell: bash \ No newline at end of file From 9893ef9331d2da68e4085ed97a30aeb3ead904d5 Mon Sep 17 00:00:00 2001 From: Faboslav Date: Mon, 14 Aug 2023 20:34:25 +0200 Subject: [PATCH 06/27] chmod --- .github/scripts/run-fabric-client.sh | 0 .github/scripts/run-fabric-server.sh | 0 2 files changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 .github/scripts/run-fabric-client.sh mode change 100644 => 100755 .github/scripts/run-fabric-server.sh diff --git a/.github/scripts/run-fabric-client.sh b/.github/scripts/run-fabric-client.sh old mode 100644 new mode 100755 diff --git a/.github/scripts/run-fabric-server.sh b/.github/scripts/run-fabric-server.sh old mode 100644 new mode 100755 From da73bdc46979c5856b2a48fa8180e8ab23433564 Mon Sep 17 00:00:00 2001 From: Faboslav Date: Mon, 14 Aug 2023 21:51:46 +0200 Subject: [PATCH 07/27] workflow test --- .github/scripts/run-client.sh | 21 ++++ .github/scripts/run-fabric-client.sh | 13 --- .github/scripts/run-fabric-server.sh | 13 --- .github/scripts/run-server.sh | 21 ++++ .github/templates/setup-environment.yml | 22 ++++ .github/workflows/build.yml | 142 +++++++++++++----------- .gitignore | 3 +- gradle_output.txt | 33 ++++++ 8 files changed, 174 insertions(+), 94 deletions(-) create mode 100755 .github/scripts/run-client.sh delete mode 100755 .github/scripts/run-fabric-client.sh delete mode 100755 .github/scripts/run-fabric-server.sh create mode 100755 .github/scripts/run-server.sh create mode 100644 .github/templates/setup-environment.yml create mode 100644 gradle_output.txt diff --git a/.github/scripts/run-client.sh b/.github/scripts/run-client.sh new file mode 100755 index 000000000..23ec7f630 --- /dev/null +++ b/.github/scripts/run-client.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +./gradlew $1:runClient > gradle_output.txt 2>&1 & + +TARGET_PATTERN='minecraft:textures/atlas/mob_effects\.png-atlas' +TIMEOUT=600 +ELAPSED=0 + +while [ $ELAPSED -lt $TIMEOUT ]; do + if grep -Eq "$TARGET_PATTERN" gradle_output.txt; then + pkill -P $$ + exit 0 + fi + + sleep 1 + ELAPSED=$((ELAPSED + 1)) +done + +if [ $ELAPSED -ge $TIMEOUT ]; then + exit 1 +fi diff --git a/.github/scripts/run-fabric-client.sh b/.github/scripts/run-fabric-client.sh deleted file mode 100755 index e7f0ab90b..000000000 --- a/.github/scripts/run-fabric-client.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -# Start Gradle task in the background -./gradlew fabric:runClient > gradle_output.txt 2>&1 & - -# Monitor output for the desired text using a regular expression -TARGET_PATTERN='minecraft:textures/atlas/mob_effects\.png-atlas' -while ! grep -Eq "$TARGET_PATTERN" gradle_output.txt; do - sleep 1 -done - -# Stop the Gradle task -pkill -P $$ \ No newline at end of file diff --git a/.github/scripts/run-fabric-server.sh b/.github/scripts/run-fabric-server.sh deleted file mode 100755 index 8230a21bd..000000000 --- a/.github/scripts/run-fabric-server.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -# Start Gradle task in the background -./gradlew fabric:runServer --args="nogui" > gradle_output.txt 2>&1 & - -# Monitor output for the desired text using a regular expression -TARGET_PATTERN='For help, type "help"' -while ! grep -Eq "$TARGET_PATTERN" gradle_output.txt; do - sleep 1 -done - -# Stop the Gradle task -pkill -P $$ \ No newline at end of file diff --git a/.github/scripts/run-server.sh b/.github/scripts/run-server.sh new file mode 100755 index 000000000..a543ac73e --- /dev/null +++ b/.github/scripts/run-server.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +./gradlew $1:runServer --args="nogui" > gradle_output.txt 2>&1 & + +TARGET_PATTERN='For help, type "help"' +TIMEOUT=600 +ELAPSED=0 + +while [ $ELAPSED -lt $TIMEOUT ]; do + if grep -Eq "$TARGET_PATTERN" gradle_output.txt; then + pkill -P $$ + exit 0 + fi + + sleep 1 + ELAPSED=$((ELAPSED + 1)) +done + +if [ $ELAPSED -ge $TIMEOUT ]; then + exit 1 +fi \ No newline at end of file diff --git a/.github/templates/setup-environment.yml b/.github/templates/setup-environment.yml new file mode 100644 index 000000000..163533cbe --- /dev/null +++ b/.github/templates/setup-environment.yml @@ -0,0 +1,22 @@ +steps: + - name: "Checkout repository" + uses: actions/checkout@v3.5.3 + with: + fetch-depth: 0 + + - name: "Set up JDK" + uses: actions/setup-java@v3.12.0 + with: + distribution: "temurin" + java-version: 17 + + - name: "Initialize caches" + uses: actions/cache@v3.3.1 + with: + path: | + ~/.gradle/caches + ~/.gradle/loom-cache + ~/.gradle/wrapper + key: ${{ runner.os }}-build-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }} + restore-keys: | + ${{ runner.os }}-build- \ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f1c2347fe..e72bd952a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,27 +9,8 @@ jobs: timeout-minutes: 30 steps: - - name: "Checkout repository" - uses: actions/checkout@v3.5.3 - with: - fetch-depth: 0 - - - name: "Set up JDK" - uses: actions/setup-java@v3.12.0 - with: - distribution: "temurin" - java-version: 17 - - - name: "Initialize caches" - uses: actions/cache@v3.3.1 - with: - path: | - ~/.gradle/caches - ~/.gradle/loom-cache - ~/.gradle/wrapper - key: ${{ runner.os }}-build-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }} - restore-keys: | - ${{ runner.os }}-build- + - name: "Setup environment" + uses: ./.github/templates/setup-environment.yml - name: "Build with gradle" run: ./gradlew build @@ -41,33 +22,15 @@ jobs: timeout-minutes: 30 steps: - - name: "Checkout repository" - uses: actions/checkout@v3.5.3 - with: - fetch-depth: 0 - - - name: "Set up JDK" - uses: actions/setup-java@v3.12.0 - with: - distribution: "temurin" - java-version: 17 - - - name: "Initialize caches" - uses: actions/cache@v3.3.1 - with: - path: | - ~/.gradle/caches - ~/.gradle/loom-cache - ~/.gradle/wrapper - key: ${{ runner.os }}-build-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }} - restore-keys: | - ${{ runner.os }}-build- + - name: "Setup environment" + uses: ./.github/templates/setup-environment.yml - name: "Run fabric client" uses: modmuss50/xvfb-action@v1 with: - run: ./.github/scripts/run-fabric-client.sh + run: ./.github/scripts/run-client.sh "fabric" shell: bash + run-fabric-server: needs: build runs-on: ubuntu-latest @@ -75,31 +38,76 @@ jobs: timeout-minutes: 30 steps: - - name: "Checkout repository" - uses: actions/checkout@v3.5.3 + - name: "Setup environment" + uses: ./.github/templates/setup-environment.yml + + - name: "Run fabric server" + uses: modmuss50/xvfb-action@v1 with: - fetch-depth: 0 + run: ./.github/scripts/run-server.sh "fabric" + shell: bash - - name: "Set up JDK" - uses: actions/setup-java@v3.12.0 + run-forge-client: + needs: build + runs-on: ubuntu-latest + name: "Run forge client" + timeout-minutes: 30 + + steps: + - name: "Setup environment" + uses: ./.github/templates/setup-environment.yml + + - name: "Run forge client" + uses: modmuss50/xvfb-action@v1 with: - distribution: "temurin" - java-version: 17 - - - name: "Initialize caches" - uses: actions/cache@v3.3.1 - with: - path: | - ~/.gradle/caches - ~/.gradle/loom-cache - ~/.gradle/wrapper - key: ${{ runner.os }}-build-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }} - restore-keys: | - ${{ runner.os }}-build- - - - name: "Accept eula" - run: mkdir -p fabric/run && echo "eula=true" > fabric/run/eula.txt + run: ./.github/scripts/run-client.sh "forge" + shell: bash - - name: "Run fabric server" - run: ./.github/scripts/run-fabric-server.sh - shell: bash \ No newline at end of file + run-forge-server: + needs: build + runs-on: ubuntu-latest + name: "Run forge server" + timeout-minutes: 30 + + steps: + - name: "Setup environment" + uses: ./.github/templates/setup-environment.yml + + - name: "Run forge server" + uses: modmuss50/xvfb-action@v1 + with: + run: ./.github/scripts/run-server.sh "forge" + shell: bash + + + run-quilt-client: + needs: build + runs-on: ubuntu-latest + name: "Run quilt client" + timeout-minutes: 30 + + steps: + - name: "Setup environment" + uses: ./.github/templates/setup-environment.yml + + - name: "Run quilt client" + uses: modmuss50/xvfb-action@v1 + with: + run: ./.github/scripts/run-client.sh "quilt" + shell: bash + + run-quilt-server: + needs: build + runs-on: ubuntu-latest + name: "Run quilt server" + timeout-minutes: 30 + + steps: + - name: "Setup environment" + uses: ./.github/templates/setup-environment.yml + + - name: "Run quilt server" + uses: modmuss50/xvfb-action@v1 + with: + run: ./.github/scripts/run-server.sh "quilt" + shell: bash \ No newline at end of file diff --git a/.gitignore b/.gitignore index be2a7c27e..900ee444d 100644 --- a/.gitignore +++ b/.gitignore @@ -17,4 +17,5 @@ classes/ .vscode .settings *.launch -.architectury-transformer \ No newline at end of file +.architectury-transformer +.gradle_output.txt \ No newline at end of file diff --git a/gradle_output.txt b/gradle_output.txt new file mode 100644 index 000000000..cccc9b84e --- /dev/null +++ b/gradle_output.txt @@ -0,0 +1,33 @@ + +> Configure project : +Architect Plugin: 3.4.146 +Architectury Loom: 1.0.326 +You are using an outdated version of Architectury Loom! This version will not receive any support, please consider updating! +Project :quilt is using experimental mod platform QUILT. Please report any issues! + +> Configure project :forge +:could not find forge mod in modImplementation but forcing: curios-forge-1.19.2-5.1.4.1-api.jar +:could not find forge mod in modImplementation but forcing: jankson-1.2.0.jar +:could not find forge mod in modImplementation but forcing: toml4j-0.7.2.jar +:could not find forge mod in modImplementation but forcing: snakeyaml-1.27.jar +:could not find forge mod in modImplementation but forcing: gson-2.8.1.jar + +FAILURE: Build failed with an exception. + +* What went wrong: +Project 'fap' not found in root project 'friends-and-foes'. + +* Try: +> Run with --stacktrace option to get the stack trace. +> Run with --info or --debug option to get more log output. +> Run with --scan to get full insights. + +* Get more help at https://help.gradle.org + +Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0. + +You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins. + +See https://docs.gradle.org/7.4/userguide/command_line_interface.html#sec:command_line_warnings + +BUILD FAILED in 849ms From 4ffe60aacf6c21384a55ebc61efdff7aa0aa55e2 Mon Sep 17 00:00:00 2001 From: Faboslav Date: Mon, 14 Aug 2023 21:55:17 +0200 Subject: [PATCH 08/27] added checkout --- .github/templates/setup-environment.yml | 5 ----- .github/workflows/build.yml | 30 +++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 5 deletions(-) diff --git a/.github/templates/setup-environment.yml b/.github/templates/setup-environment.yml index 163533cbe..c268442ca 100644 --- a/.github/templates/setup-environment.yml +++ b/.github/templates/setup-environment.yml @@ -1,9 +1,4 @@ steps: - - name: "Checkout repository" - uses: actions/checkout@v3.5.3 - with: - fetch-depth: 0 - - name: "Set up JDK" uses: actions/setup-java@v3.12.0 with: diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e72bd952a..cd63e1951 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,6 +22,11 @@ jobs: timeout-minutes: 30 steps: + - name: "Checkout repository" + uses: actions/checkout@v3.5.3 + with: + fetch-depth: 0 + - name: "Setup environment" uses: ./.github/templates/setup-environment.yml @@ -38,6 +43,11 @@ jobs: timeout-minutes: 30 steps: + - name: "Checkout repository" + uses: actions/checkout@v3.5.3 + with: + fetch-depth: 0 + - name: "Setup environment" uses: ./.github/templates/setup-environment.yml @@ -54,6 +64,11 @@ jobs: timeout-minutes: 30 steps: + - name: "Checkout repository" + uses: actions/checkout@v3.5.3 + with: + fetch-depth: 0 + - name: "Setup environment" uses: ./.github/templates/setup-environment.yml @@ -70,6 +85,11 @@ jobs: timeout-minutes: 30 steps: + - name: "Checkout repository" + uses: actions/checkout@v3.5.3 + with: + fetch-depth: 0 + - name: "Setup environment" uses: ./.github/templates/setup-environment.yml @@ -87,6 +107,11 @@ jobs: timeout-minutes: 30 steps: + - name: "Checkout repository" + uses: actions/checkout@v3.5.3 + with: + fetch-depth: 0 + - name: "Setup environment" uses: ./.github/templates/setup-environment.yml @@ -103,6 +128,11 @@ jobs: timeout-minutes: 30 steps: + - name: "Checkout repository" + uses: actions/checkout@v3.5.3 + with: + fetch-depth: 0 + - name: "Setup environment" uses: ./.github/templates/setup-environment.yml From 06265b1e25546d074be76d22547cf1c4ad97d7cc Mon Sep 17 00:00:00 2001 From: Faboslav Date: Mon, 14 Aug 2023 21:56:48 +0200 Subject: [PATCH 09/27] Added missing checkout --- .github/workflows/build.yml | 5 +++++ .github/workflows/publish.yml | 20 ++++---------------- 2 files changed, 9 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cd63e1951..e3304ffa9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,6 +9,11 @@ jobs: timeout-minutes: 30 steps: + - name: "Checkout repository" + uses: actions/checkout@v3.5.3 + with: + fetch-depth: 0 + - name: "Setup environment" uses: ./.github/templates/setup-environment.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index d5a7c5bc7..4860e1b60 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -30,23 +30,11 @@ jobs: steps: - name: "Checkout repository" uses: actions/checkout@v3.5.3 - - - name: "Set up JDK" - uses: actions/setup-java@v3.12.0 with: - distribution: "temurin" - java-version: 17 - - - name: "Initialize caches" - uses: actions/cache@v3.3.1 - with: - path: | - ~/.gradle/caches - ~/.gradle/loom-cache - ~/.gradle/wrapper - key: ${{ runner.os }}-build-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }} - restore-keys: | - ${{ runner.os }}-build- + fetch-depth: 0 + + - name: "Setup environment" + uses: ./.github/templates/setup-environment.yml - name: "Build with gradle" run: ./gradlew build From d466a3a2712a58c2edce1749f1700abc80fb0900 Mon Sep 17 00:00:00 2001 From: Faboslav Date: Mon, 14 Aug 2023 21:57:18 +0200 Subject: [PATCH 10/27] reformat --- .github/templates/setup-environment.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/templates/setup-environment.yml b/.github/templates/setup-environment.yml index c268442ca..22cb1f50b 100644 --- a/.github/templates/setup-environment.yml +++ b/.github/templates/setup-environment.yml @@ -5,13 +5,13 @@ steps: distribution: "temurin" java-version: 17 - - name: "Initialize caches" - uses: actions/cache@v3.3.1 - with: - path: | - ~/.gradle/caches - ~/.gradle/loom-cache - ~/.gradle/wrapper - key: ${{ runner.os }}-build-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }} - restore-keys: | - ${{ runner.os }}-build- \ No newline at end of file + - name: "Initialize caches" + uses: actions/cache@v3.3.1 + with: + path: | + ~/.gradle/caches + ~/.gradle/loom-cache + ~/.gradle/wrapper + key: ${{ runner.os }}-build-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }} + restore-keys: | + ${{ runner.os }}-build- \ No newline at end of file From 8f9871cada8ea898ee0907c1a74e18b9318b0732 Mon Sep 17 00:00:00 2001 From: Faboslav Date: Mon, 14 Aug 2023 22:02:18 +0200 Subject: [PATCH 11/27] workflow test --- .github/templates/setup-environment.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/templates/setup-environment.yml b/.github/templates/setup-environment.yml index 22cb1f50b..6acf85b2d 100644 --- a/.github/templates/setup-environment.yml +++ b/.github/templates/setup-environment.yml @@ -1,4 +1,9 @@ steps: + - name: "Checkout repository" + uses: actions/checkout@v3.5.3 + with: + fetch-depth: 0 + - name: "Set up JDK" uses: actions/setup-java@v3.12.0 with: From 36ebb8bd68227d4d7f1d3ee0003742357a3dd3dd Mon Sep 17 00:00:00 2001 From: Faboslav Date: Mon, 14 Aug 2023 22:08:32 +0200 Subject: [PATCH 12/27] use matrix instead of separate jobs --- .github/workflows/build.yml | 96 +++---------------------------------- 1 file changed, 7 insertions(+), 89 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e3304ffa9..71e07ab57 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,6 +5,9 @@ on: [ push ] jobs: build: runs-on: ubuntu-latest + strategy: + matrix: + mod_loader: [ "fabric", "forge", "quilt" ] name: "Build" timeout-minutes: 30 @@ -20,7 +23,7 @@ jobs: - name: "Build with gradle" run: ./gradlew build - run-fabric-client: + run-client: needs: build runs-on: ubuntu-latest name: "Run fabric client" @@ -38,10 +41,10 @@ jobs: - name: "Run fabric client" uses: modmuss50/xvfb-action@v1 with: - run: ./.github/scripts/run-client.sh "fabric" + run: ./.github/scripts/run-client.sh ${{ matrix.mod_loader }} shell: bash - run-fabric-server: + run-server: needs: build runs-on: ubuntu-latest name: "Run fabric server" @@ -59,90 +62,5 @@ jobs: - name: "Run fabric server" uses: modmuss50/xvfb-action@v1 with: - run: ./.github/scripts/run-server.sh "fabric" - shell: bash - - run-forge-client: - needs: build - runs-on: ubuntu-latest - name: "Run forge client" - timeout-minutes: 30 - - steps: - - name: "Checkout repository" - uses: actions/checkout@v3.5.3 - with: - fetch-depth: 0 - - - name: "Setup environment" - uses: ./.github/templates/setup-environment.yml - - - name: "Run forge client" - uses: modmuss50/xvfb-action@v1 - with: - run: ./.github/scripts/run-client.sh "forge" - shell: bash - - run-forge-server: - needs: build - runs-on: ubuntu-latest - name: "Run forge server" - timeout-minutes: 30 - - steps: - - name: "Checkout repository" - uses: actions/checkout@v3.5.3 - with: - fetch-depth: 0 - - - name: "Setup environment" - uses: ./.github/templates/setup-environment.yml - - - name: "Run forge server" - uses: modmuss50/xvfb-action@v1 - with: - run: ./.github/scripts/run-server.sh "forge" - shell: bash - - - run-quilt-client: - needs: build - runs-on: ubuntu-latest - name: "Run quilt client" - timeout-minutes: 30 - - steps: - - name: "Checkout repository" - uses: actions/checkout@v3.5.3 - with: - fetch-depth: 0 - - - name: "Setup environment" - uses: ./.github/templates/setup-environment.yml - - - name: "Run quilt client" - uses: modmuss50/xvfb-action@v1 - with: - run: ./.github/scripts/run-client.sh "quilt" - shell: bash - - run-quilt-server: - needs: build - runs-on: ubuntu-latest - name: "Run quilt server" - timeout-minutes: 30 - - steps: - - name: "Checkout repository" - uses: actions/checkout@v3.5.3 - with: - fetch-depth: 0 - - - name: "Setup environment" - uses: ./.github/templates/setup-environment.yml - - - name: "Run quilt server" - uses: modmuss50/xvfb-action@v1 - with: - run: ./.github/scripts/run-server.sh "quilt" + run: ./.github/scripts/run-server.sh ${{ matrix.mod_loader }} shell: bash \ No newline at end of file From eab349eac73a6b78fcf760d1dccdf735baffb12c Mon Sep 17 00:00:00 2001 From: Faboslav Date: Mon, 14 Aug 2023 22:14:46 +0200 Subject: [PATCH 13/27] test --- .github/templates/setup-environment.yml | 43 +++++++++++++------------ .github/workflows/build.yml | 14 ++++---- 2 files changed, 30 insertions(+), 27 deletions(-) diff --git a/.github/templates/setup-environment.yml b/.github/templates/setup-environment.yml index 6acf85b2d..f6b237671 100644 --- a/.github/templates/setup-environment.yml +++ b/.github/templates/setup-environment.yml @@ -1,22 +1,25 @@ -steps: - - name: "Checkout repository" - uses: actions/checkout@v3.5.3 - with: - fetch-depth: 0 +runs: + name: "Setup environment" + using: "composite" + steps: + - name: "Checkout repository" + uses: actions/checkout@v3.5.3 + with: + fetch-depth: 0 - - name: "Set up JDK" - uses: actions/setup-java@v3.12.0 - with: - distribution: "temurin" - java-version: 17 + - name: "Set up JDK" + uses: actions/setup-java@v3.12.0 + with: + distribution: "temurin" + java-version: 17 - - name: "Initialize caches" - uses: actions/cache@v3.3.1 - with: - path: | - ~/.gradle/caches - ~/.gradle/loom-cache - ~/.gradle/wrapper - key: ${{ runner.os }}-build-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }} - restore-keys: | - ${{ runner.os }}-build- \ No newline at end of file + - name: "Initialize caches" + uses: actions/cache@v3.3.1 + with: + path: | + ~/.gradle/caches + ~/.gradle/loom-cache + ~/.gradle/wrapper + key: ${{ runner.os }}-build-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }} + restore-keys: | + ${{ runner.os }}-build- \ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 71e07ab57..d39b628a1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,9 +5,6 @@ on: [ push ] jobs: build: runs-on: ubuntu-latest - strategy: - matrix: - mod_loader: [ "fabric", "forge", "quilt" ] name: "Build" timeout-minutes: 30 @@ -26,7 +23,10 @@ jobs: run-client: needs: build runs-on: ubuntu-latest - name: "Run fabric client" + strategy: + matrix: + mod_loader: [ "fabric", "forge", "quilt" ] + name: "Run client" timeout-minutes: 30 steps: @@ -38,7 +38,7 @@ jobs: - name: "Setup environment" uses: ./.github/templates/setup-environment.yml - - name: "Run fabric client" + - name: "Run client" uses: modmuss50/xvfb-action@v1 with: run: ./.github/scripts/run-client.sh ${{ matrix.mod_loader }} @@ -47,7 +47,7 @@ jobs: run-server: needs: build runs-on: ubuntu-latest - name: "Run fabric server" + name: "Run server" timeout-minutes: 30 steps: @@ -59,7 +59,7 @@ jobs: - name: "Setup environment" uses: ./.github/templates/setup-environment.yml - - name: "Run fabric server" + - name: "Run server" uses: modmuss50/xvfb-action@v1 with: run: ./.github/scripts/run-server.sh ${{ matrix.mod_loader }} From 96e8834befac0b33c905099dad69d64c7a3cd2ca Mon Sep 17 00:00:00 2001 From: Faboslav Date: Mon, 14 Aug 2023 22:19:19 +0200 Subject: [PATCH 14/27] test --- .../setup-environment/action.yml} | 1 + .github/workflows/build.yml | 9 ++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) rename .github/{templates/setup-environment.yml => actions/setup-environment/action.yml} (93%) diff --git a/.github/templates/setup-environment.yml b/.github/actions/setup-environment/action.yml similarity index 93% rename from .github/templates/setup-environment.yml rename to .github/actions/setup-environment/action.yml index f6b237671..3cdcf35b4 100644 --- a/.github/templates/setup-environment.yml +++ b/.github/actions/setup-environment/action.yml @@ -1,5 +1,6 @@ runs: name: "Setup environment" + description: "Common setup before using gradle" using: "composite" steps: - name: "Checkout repository" diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d39b628a1..2b072e9fe 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,12 +15,12 @@ jobs: fetch-depth: 0 - name: "Setup environment" - uses: ./.github/templates/setup-environment.yml + uses: ./.github/actions/setup-environment - name: "Build with gradle" run: ./gradlew build - run-client: + run-clients: needs: build runs-on: ubuntu-latest strategy: @@ -44,9 +44,12 @@ jobs: run: ./.github/scripts/run-client.sh ${{ matrix.mod_loader }} shell: bash - run-server: + run-servers: needs: build runs-on: ubuntu-latest + strategy: + matrix: + mod_loader: [ "fabric", "forge", "quilt" ] name: "Run server" timeout-minutes: 30 From 656b41f8b1956a73d48fee2b3b48c1345396ae5b Mon Sep 17 00:00:00 2001 From: Faboslav Date: Mon, 14 Aug 2023 22:22:22 +0200 Subject: [PATCH 15/27] test --- .github/actions/setup-environment/action.yml | 4 ++-- .github/workflows/build.yml | 4 ++-- .github/workflows/publish.yml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/actions/setup-environment/action.yml b/.github/actions/setup-environment/action.yml index 3cdcf35b4..af98fa41f 100644 --- a/.github/actions/setup-environment/action.yml +++ b/.github/actions/setup-environment/action.yml @@ -1,6 +1,6 @@ +name: "Setup environment" +description: "Common setup before using gradle" runs: - name: "Setup environment" - description: "Common setup before using gradle" using: "composite" steps: - name: "Checkout repository" diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2b072e9fe..d2a89d623 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -36,7 +36,7 @@ jobs: fetch-depth: 0 - name: "Setup environment" - uses: ./.github/templates/setup-environment.yml + uses: ./.github/actions/setup-environment - name: "Run client" uses: modmuss50/xvfb-action@v1 @@ -60,7 +60,7 @@ jobs: fetch-depth: 0 - name: "Setup environment" - uses: ./.github/templates/setup-environment.yml + uses: ./.github/actions/setup-environment - name: "Run server" uses: modmuss50/xvfb-action@v1 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 4860e1b60..62646d713 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -34,7 +34,7 @@ jobs: fetch-depth: 0 - name: "Setup environment" - uses: ./.github/templates/setup-environment.yml + uses: ./.github/actions/setup-environment - name: "Build with gradle" run: ./gradlew build From 06995a370b515aedbf138be28cf76aaa39bdb17e Mon Sep 17 00:00:00 2001 From: Faboslav Date: Mon, 14 Aug 2023 23:02:00 +0200 Subject: [PATCH 16/27] wip --- .github/scripts/run-client.sh | 14 ++++++++++---- .github/scripts/run-server.sh | 14 ++++++++++---- .github/workflows/build.yml | 10 ++++------ .gitignore | 3 ++- gradle.properties | 2 +- gradle_output.txt | 33 --------------------------------- 6 files changed, 27 insertions(+), 49 deletions(-) delete mode 100644 gradle_output.txt diff --git a/.github/scripts/run-client.sh b/.github/scripts/run-client.sh index 23ec7f630..a35af3e51 100755 --- a/.github/scripts/run-client.sh +++ b/.github/scripts/run-client.sh @@ -1,17 +1,23 @@ #!/bin/bash -./gradlew $1:runClient > gradle_output.txt 2>&1 & +./gradlew $1:runClient > gradle_client_output.txt 2>&1 & -TARGET_PATTERN='minecraft:textures/atlas/mob_effects\.png-atlas' -TIMEOUT=600 +SUCCESS_PATTERN='minecraft:textures/atlas/mob_effects\.png-atlas' +ERROR_PATTERN='Execution failed for task' +TIMEOUT=1800 ELAPSED=0 while [ $ELAPSED -lt $TIMEOUT ]; do - if grep -Eq "$TARGET_PATTERN" gradle_output.txt; then + if grep -Eq "$SUCCESS_PATTERN" gradle_client_output.txt; then pkill -P $$ exit 0 fi + if grep -Eq "$ERROR_PATTERN" gradle_client_output.txt; then + pkill -P $$ + exit 1 + fi + sleep 1 ELAPSED=$((ELAPSED + 1)) done diff --git a/.github/scripts/run-server.sh b/.github/scripts/run-server.sh index a543ac73e..72d906977 100755 --- a/.github/scripts/run-server.sh +++ b/.github/scripts/run-server.sh @@ -1,17 +1,23 @@ #!/bin/bash -./gradlew $1:runServer --args="nogui" > gradle_output.txt 2>&1 & +./gradlew $1:runServer --args="nogui" > gradle_server_output.txt 2>&1 & -TARGET_PATTERN='For help, type "help"' -TIMEOUT=600 +SUCCESS_PATTERN='For help, type "help"' +ERROR_PATTERN='Execution failed for task' +TIMEOUT=1800 ELAPSED=0 while [ $ELAPSED -lt $TIMEOUT ]; do - if grep -Eq "$TARGET_PATTERN" gradle_output.txt; then + if grep -Eq "$SUCCESS_PATTERN" gradle_server_output.txt; then pkill -P $$ exit 0 fi + if grep -Eq "$ERROR_PATTERN" gradle_server_output.txt; then + pkill -P $$ + exit 1 + fi + sleep 1 ELAPSED=$((ELAPSED + 1)) done diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d2a89d623..8ea8b18af 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,7 +20,7 @@ jobs: - name: "Build with gradle" run: ./gradlew build - run-clients: + run-client: needs: build runs-on: ubuntu-latest strategy: @@ -44,7 +44,7 @@ jobs: run: ./.github/scripts/run-client.sh ${{ matrix.mod_loader }} shell: bash - run-servers: + run-server: needs: build runs-on: ubuntu-latest strategy: @@ -63,7 +63,5 @@ jobs: uses: ./.github/actions/setup-environment - name: "Run server" - uses: modmuss50/xvfb-action@v1 - with: - run: ./.github/scripts/run-server.sh ${{ matrix.mod_loader }} - shell: bash \ No newline at end of file + run: ./.github/scripts/run-server.sh ${{ matrix.mod_loader }} + shell: bash \ No newline at end of file diff --git a/.gitignore b/.gitignore index 900ee444d..11a28bad0 100644 --- a/.gitignore +++ b/.gitignore @@ -18,4 +18,5 @@ classes/ .settings *.launch .architectury-transformer -.gradle_output.txt \ No newline at end of file +gradle_client_output.txt +gradle_server_output.txt \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 93b298dbe..3ad7d7d75 100644 --- a/gradle.properties +++ b/gradle.properties @@ -35,5 +35,5 @@ fabric_api_version=0.76.0+1.19.2 forge_version=1.19.2-43.2.11 # Quilt https://lambdaurora.dev/tools/import_quilt.html -quilt_loader_version=0.19.0-beta.13 +quilt_loader_version=0.19.3 quilt_fabric_api_version=4.0.0-beta.30+0.76.0-1.19.2 diff --git a/gradle_output.txt b/gradle_output.txt deleted file mode 100644 index cccc9b84e..000000000 --- a/gradle_output.txt +++ /dev/null @@ -1,33 +0,0 @@ - -> Configure project : -Architect Plugin: 3.4.146 -Architectury Loom: 1.0.326 -You are using an outdated version of Architectury Loom! This version will not receive any support, please consider updating! -Project :quilt is using experimental mod platform QUILT. Please report any issues! - -> Configure project :forge -:could not find forge mod in modImplementation but forcing: curios-forge-1.19.2-5.1.4.1-api.jar -:could not find forge mod in modImplementation but forcing: jankson-1.2.0.jar -:could not find forge mod in modImplementation but forcing: toml4j-0.7.2.jar -:could not find forge mod in modImplementation but forcing: snakeyaml-1.27.jar -:could not find forge mod in modImplementation but forcing: gson-2.8.1.jar - -FAILURE: Build failed with an exception. - -* What went wrong: -Project 'fap' not found in root project 'friends-and-foes'. - -* Try: -> Run with --stacktrace option to get the stack trace. -> Run with --info or --debug option to get more log output. -> Run with --scan to get full insights. - -* Get more help at https://help.gradle.org - -Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0. - -You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins. - -See https://docs.gradle.org/7.4/userguide/command_line_interface.html#sec:command_line_warnings - -BUILD FAILED in 849ms From 7e5039fa2c6f8796b42d41192a8034ba5dc40278 Mon Sep 17 00:00:00 2001 From: Faboslav Date: Mon, 14 Aug 2023 23:13:14 +0200 Subject: [PATCH 17/27] wip --- .github/workflows/build.yml | 3 +++ gradle.properties | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8ea8b18af..e08573dae 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -62,6 +62,9 @@ jobs: - name: "Setup environment" uses: ./.github/actions/setup-environment + - name: "Accept eula" + run: mkdir -p ${{ matrix.mod_loader }}/run && echo "eula=true" > ${{ matrix.mod_loader }}/run/eula.txt + - name: "Run server" run: ./.github/scripts/run-server.sh ${{ matrix.mod_loader }} shell: bash \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 3ad7d7d75..84222a7e8 100644 --- a/gradle.properties +++ b/gradle.properties @@ -28,11 +28,11 @@ mixin_extras_version=0.2.0-beta.8 trinkets_version=3.4.1 # Fabric https://fabricmc.net/versions.html -fabric_loader_version=0.14.21 -fabric_api_version=0.76.0+1.19.2 +fabric_loader_version=0.14.22 +fabric_api_version=0.76.1+1.19.2 # Forge https://files.minecraftforge.net/net/minecraftforge/forge/index_1.19.2.html -forge_version=1.19.2-43.2.11 +forge_version=1.19.2-43.2.21 # Quilt https://lambdaurora.dev/tools/import_quilt.html quilt_loader_version=0.19.3 From 3959e42ebc0db73192398b334a3542ff0e734f28 Mon Sep 17 00:00:00 2001 From: Faboslav Date: Mon, 14 Aug 2023 23:28:51 +0200 Subject: [PATCH 18/27] fixed error patterns --- .github/scripts/run-client.sh | 15 ++++++++++----- .github/scripts/run-server.sh | 15 ++++++++++----- .github/workflows/build.yml | 2 ++ 3 files changed, 22 insertions(+), 10 deletions(-) diff --git a/.github/scripts/run-client.sh b/.github/scripts/run-client.sh index a35af3e51..518de5401 100755 --- a/.github/scripts/run-client.sh +++ b/.github/scripts/run-client.sh @@ -3,7 +3,10 @@ ./gradlew $1:runClient > gradle_client_output.txt 2>&1 & SUCCESS_PATTERN='minecraft:textures/atlas/mob_effects\.png-atlas' -ERROR_PATTERN='Execution failed for task' +ERROR_PATTERNS=( + 'For more details see the full crash report file' + ' end of report ' +) TIMEOUT=1800 ELAPSED=0 @@ -13,10 +16,12 @@ while [ $ELAPSED -lt $TIMEOUT ]; do exit 0 fi - if grep -Eq "$ERROR_PATTERN" gradle_client_output.txt; then - pkill -P $$ - exit 1 - fi + for ERROR_PATTERN in "${ERROR_PATTERNS[@]}"; do + if grep -Eq "$ERROR_PATTERN" gradle_client_output.txt; then + pkill -P $$ + exit 1 + fi + done sleep 1 ELAPSED=$((ELAPSED + 1)) diff --git a/.github/scripts/run-server.sh b/.github/scripts/run-server.sh index 72d906977..e7ee2bb39 100755 --- a/.github/scripts/run-server.sh +++ b/.github/scripts/run-server.sh @@ -3,7 +3,10 @@ ./gradlew $1:runServer --args="nogui" > gradle_server_output.txt 2>&1 & SUCCESS_PATTERN='For help, type "help"' -ERROR_PATTERN='Execution failed for task' +ERROR_PATTERNS=( + 'For more details see the full crash report file' + ' end of report ' +) TIMEOUT=1800 ELAPSED=0 @@ -13,10 +16,12 @@ while [ $ELAPSED -lt $TIMEOUT ]; do exit 0 fi - if grep -Eq "$ERROR_PATTERN" gradle_server_output.txt; then - pkill -P $$ - exit 1 - fi + for ERROR_PATTERN in "${ERROR_PATTERNS[@]}"; do + if grep -Eq "$ERROR_PATTERN" gradle_client_output.txt; then + pkill -P $$ + exit 1 + fi + done sleep 1 ELAPSED=$((ELAPSED + 1)) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e08573dae..16945f2ff 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,6 +24,7 @@ jobs: needs: build runs-on: ubuntu-latest strategy: + fail-fast: false matrix: mod_loader: [ "fabric", "forge", "quilt" ] name: "Run client" @@ -48,6 +49,7 @@ jobs: needs: build runs-on: ubuntu-latest strategy: + fail-fast: false matrix: mod_loader: [ "fabric", "forge", "quilt" ] name: "Run server" From 103c37413b26ba2fbbb3c96a25b3f9bba9200df8 Mon Sep 17 00:00:00 2001 From: Faboslav Date: Mon, 14 Aug 2023 23:40:59 +0200 Subject: [PATCH 19/27] fixed output --- .github/scripts/run-server.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/scripts/run-server.sh b/.github/scripts/run-server.sh index e7ee2bb39..ae7b8a4cf 100755 --- a/.github/scripts/run-server.sh +++ b/.github/scripts/run-server.sh @@ -17,7 +17,7 @@ while [ $ELAPSED -lt $TIMEOUT ]; do fi for ERROR_PATTERN in "${ERROR_PATTERNS[@]}"; do - if grep -Eq "$ERROR_PATTERN" gradle_client_output.txt; then + if grep -Eq "$ERROR_PATTERN" gradle_server_output.txt; then pkill -P $$ exit 1 fi From 3b3e2d4b44435ac5505cfb72fdefd2f4bea58a9b Mon Sep 17 00:00:00 2001 From: Faboslav Date: Tue, 15 Aug 2023 14:49:20 +0200 Subject: [PATCH 20/27] updated build workflow --- .github/workflows/build.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 16945f2ff..0cc375190 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -27,7 +27,7 @@ jobs: fail-fast: false matrix: mod_loader: [ "fabric", "forge", "quilt" ] - name: "Run client" + name: Run ${{ join('', seq(1,1)) }}${{ matrix.mod_loader[0] }}${{ matrix.mod_loader[1:] }} client timeout-minutes: 30 steps: @@ -39,7 +39,7 @@ jobs: - name: "Setup environment" uses: ./.github/actions/setup-environment - - name: "Run client" + - name: Run ${{ join('', seq(1,1)) }}${{ matrix.mod_loader[0] }}${{ matrix.mod_loader[1:] }} client uses: modmuss50/xvfb-action@v1 with: run: ./.github/scripts/run-client.sh ${{ matrix.mod_loader }} @@ -52,7 +52,7 @@ jobs: fail-fast: false matrix: mod_loader: [ "fabric", "forge", "quilt" ] - name: "Run server" + name: Run ${{ join('', seq(1,1)) }}${{ matrix.mod_loader[0] }}${{ matrix.mod_loader[1:] }} server timeout-minutes: 30 steps: @@ -67,6 +67,6 @@ jobs: - name: "Accept eula" run: mkdir -p ${{ matrix.mod_loader }}/run && echo "eula=true" > ${{ matrix.mod_loader }}/run/eula.txt - - name: "Run server" + - name: Run ${{ join('', seq(1,1)) }}${{ matrix.mod_loader[0] }}${{ matrix.mod_loader[1:] }} server run: ./.github/scripts/run-server.sh ${{ matrix.mod_loader }} shell: bash \ No newline at end of file From e917b32bcd02e120ca898863b7d866cdf645c84f Mon Sep 17 00:00:00 2001 From: Faboslav Date: Tue, 15 Aug 2023 14:53:45 +0200 Subject: [PATCH 21/27] wip --- .github/workflows/build.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0cc375190..6581dbd50 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -27,7 +27,7 @@ jobs: fail-fast: false matrix: mod_loader: [ "fabric", "forge", "quilt" ] - name: Run ${{ join('', seq(1,1)) }}${{ matrix.mod_loader[0] }}${{ matrix.mod_loader[1:] }} client + name: Run ${{ matrix.mod_loader^ }} client timeout-minutes: 30 steps: @@ -39,7 +39,7 @@ jobs: - name: "Setup environment" uses: ./.github/actions/setup-environment - - name: Run ${{ join('', seq(1,1)) }}${{ matrix.mod_loader[0] }}${{ matrix.mod_loader[1:] }} client + - name: Run ${{ matrix.mod_loader^ }}client uses: modmuss50/xvfb-action@v1 with: run: ./.github/scripts/run-client.sh ${{ matrix.mod_loader }} @@ -52,7 +52,7 @@ jobs: fail-fast: false matrix: mod_loader: [ "fabric", "forge", "quilt" ] - name: Run ${{ join('', seq(1,1)) }}${{ matrix.mod_loader[0] }}${{ matrix.mod_loader[1:] }} server + name: Run ${{ matrix.mod_loader^ }} server timeout-minutes: 30 steps: @@ -67,6 +67,6 @@ jobs: - name: "Accept eula" run: mkdir -p ${{ matrix.mod_loader }}/run && echo "eula=true" > ${{ matrix.mod_loader }}/run/eula.txt - - name: Run ${{ join('', seq(1,1)) }}${{ matrix.mod_loader[0] }}${{ matrix.mod_loader[1:] }} server + - name: Run ${{ matrix.mod_loader^ }} server run: ./.github/scripts/run-server.sh ${{ matrix.mod_loader }} shell: bash \ No newline at end of file From 6827859ce76f3bdd415cc160f025c044150dab0c Mon Sep 17 00:00:00 2001 From: Faboslav Date: Tue, 15 Aug 2023 15:07:01 +0200 Subject: [PATCH 22/27] fixed build --- .github/workflows/build.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6581dbd50..637dafbe7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -27,7 +27,7 @@ jobs: fail-fast: false matrix: mod_loader: [ "fabric", "forge", "quilt" ] - name: Run ${{ matrix.mod_loader^ }} client + name: Run ${{ matrix.mod_loader }} client timeout-minutes: 30 steps: @@ -39,7 +39,7 @@ jobs: - name: "Setup environment" uses: ./.github/actions/setup-environment - - name: Run ${{ matrix.mod_loader^ }}client + - name: Run ${{ matrix.mod_loader }}client uses: modmuss50/xvfb-action@v1 with: run: ./.github/scripts/run-client.sh ${{ matrix.mod_loader }} @@ -52,7 +52,7 @@ jobs: fail-fast: false matrix: mod_loader: [ "fabric", "forge", "quilt" ] - name: Run ${{ matrix.mod_loader^ }} server + name: Run ${{ matrix.mod_loader }} server timeout-minutes: 30 steps: @@ -67,6 +67,6 @@ jobs: - name: "Accept eula" run: mkdir -p ${{ matrix.mod_loader }}/run && echo "eula=true" > ${{ matrix.mod_loader }}/run/eula.txt - - name: Run ${{ matrix.mod_loader^ }} server + - name: Run ${{ matrix.mod_loader }} server run: ./.github/scripts/run-server.sh ${{ matrix.mod_loader }} shell: bash \ No newline at end of file From 5afce75fa61849ee858184f36a804671d62f4bbb Mon Sep 17 00:00:00 2001 From: Faboslav Date: Tue, 15 Aug 2023 19:09:07 +0200 Subject: [PATCH 23/27] fixed action name in build --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 637dafbe7..bf1d79ef7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -39,7 +39,7 @@ jobs: - name: "Setup environment" uses: ./.github/actions/setup-environment - - name: Run ${{ matrix.mod_loader }}client + - name: Run ${{ matrix.mod_loader }} client uses: modmuss50/xvfb-action@v1 with: run: ./.github/scripts/run-client.sh ${{ matrix.mod_loader }} From 45025e60c6f3e75bf33a520197c923d2c56dd71c Mon Sep 17 00:00:00 2001 From: Faboslav Date: Tue, 15 Aug 2023 19:15:30 +0200 Subject: [PATCH 24/27] updated loom --- build.gradle | 2 +- fabric/build.gradle | 12 ++++++++---- forge/build.gradle | 8 ++++---- gradle.properties | 1 + gradle/wrapper/gradle-wrapper.properties | 5 +++-- quilt/build.gradle | 12 ++++++++---- 6 files changed, 25 insertions(+), 15 deletions(-) diff --git a/build.gradle b/build.gradle index 6aafc9805..38f1bb6dc 100644 --- a/build.gradle +++ b/build.gradle @@ -1,6 +1,6 @@ plugins { id "architectury-plugin" version "3.4-SNAPSHOT" - id "dev.architectury.loom" version "1.0.+" apply false + id "dev.architectury.loom" version "1.3.+" apply false } architectury { diff --git a/fabric/build.gradle b/fabric/build.gradle index b998e0d1c..750dd2476 100644 --- a/fabric/build.gradle +++ b/fabric/build.gradle @@ -1,5 +1,5 @@ plugins { - id "com.github.johnrengelman.shadow" version "7.1.2" + id "com.github.johnrengelman.shadow" version "8.1.1" } allprojects { @@ -38,6 +38,10 @@ dependencies { // Trinkets modImplementation("dev.emi:trinkets:${rootProject.trinkets_version}") + // Fix for CCA + modApi("dev.onyxstudios.cardinal-components-api:cardinal-components-base:${project.cca_version}") + modApi("dev.onyxstudios.cardinal-components-api:cardinal-components-entity:${project.cca_version}") + // For faster development https://www.cursemaven.com/ modRuntimeOnly "curse.maven:lazydfu-433518:3821870" modRuntimeOnly "curse.maven:starlight-521783:3835973" @@ -71,18 +75,18 @@ shadowJar { exclude "architectury.common.json" configurations = [project.configurations.shadowCommon] - classifier "dev-shadow" + archiveClassifier.set("dev-shadow") } remapJar { injectAccessWidener = true input.set shadowJar.archiveFile dependsOn shadowJar - classifier null + archiveClassifier.set(null) } jar { - classifier "dev" + archiveClassifier.set("dev") } sourcesJar { diff --git a/forge/build.gradle b/forge/build.gradle index 82ce737c0..86e448a2a 100644 --- a/forge/build.gradle +++ b/forge/build.gradle @@ -1,5 +1,5 @@ plugins { - id "com.github.johnrengelman.shadow" version "7.1.2" + id "com.github.johnrengelman.shadow" version "8.1.1" } allprojects { @@ -66,17 +66,17 @@ shadowJar { exclude "architectury.common.json" configurations = [project.configurations.shadowCommon] - classifier "dev-shadow" + archiveClassifier.set("dev-shadow") } remapJar { input.set shadowJar.archiveFile dependsOn shadowJar - classifier null + archiveClassifier.set(null) } jar { - classifier "dev" + archiveClassifier.set("dev") } sourcesJar { diff --git a/gradle.properties b/gradle.properties index 84222a7e8..bb2fe3014 100644 --- a/gradle.properties +++ b/gradle.properties @@ -26,6 +26,7 @@ enabled_platforms=fabric,forge,quilt cloth_config_version=8.0.75 mixin_extras_version=0.2.0-beta.8 trinkets_version=3.4.1 +cca_version=5.2.0 # Fabric https://fabricmc.net/versions.html fabric_loader_version=0.14.22 diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 41dfb8790..ac6226f70 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-all.zip +networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists +zipStorePath=wrapper/dists \ No newline at end of file diff --git a/quilt/build.gradle b/quilt/build.gradle index c0ca32925..0d0a23fbf 100644 --- a/quilt/build.gradle +++ b/quilt/build.gradle @@ -1,5 +1,5 @@ plugins { - id "com.github.johnrengelman.shadow" version "7.1.2" + id "com.github.johnrengelman.shadow" version "8.1.1" } allprojects { @@ -34,6 +34,10 @@ dependencies { // Trinkets modImplementation("dev.emi:trinkets:${rootProject.trinkets_version}") + // Fix for CCA + modApi("dev.onyxstudios.cardinal-components-api:cardinal-components-base:${project.cca_version}") + modApi("dev.onyxstudios.cardinal-components-api:cardinal-components-entity:${project.cca_version}") + common(project(path: ":common", configuration: "namedElements")) { transitive false } shadowCommon(project(path: ":common", configuration: "transformProductionQuilt")) { transitive false } } @@ -62,18 +66,18 @@ shadowJar { exclude "architectury.common.json" configurations = [project.configurations.shadowCommon] - classifier "dev-shadow" + archiveClassifier.set("dev-shadow") } remapJar { injectAccessWidener = true input.set shadowJar.archiveFile dependsOn shadowJar - classifier null + archiveClassifier.set(null) } jar { - classifier "dev" + archiveClassifier.set("dev") } sourcesJar { From a826a717fc9f2b92fcd495cf36c70d9ba9d42da0 Mon Sep 17 00:00:00 2001 From: Faboslav Date: Fri, 18 Aug 2023 15:38:41 +0200 Subject: [PATCH 25/27] disabled quilt --- .github/workflows/build.yml | 2 +- .github/workflows/publish.yml | 80 +++++------------------------------ fabric/build.gradle | 2 +- forge/build.gradle | 2 +- gradle.properties | 2 +- quilt/build.gradle | 2 +- settings.gradle | 1 - 7 files changed, 16 insertions(+), 75 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bf1d79ef7..7c21b682a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -26,7 +26,7 @@ jobs: strategy: fail-fast: false matrix: - mod_loader: [ "fabric", "forge", "quilt" ] + mod_loader: [ "fabric", "forge" ] name: Run ${{ matrix.mod_loader }} client timeout-minutes: 30 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 62646d713..c65dcc8bf 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -15,8 +15,12 @@ env: 1.19.2 FABRIC_DEPENDENCIES: | fabric-api | depends | * - QUILT_DEPENDENCIES: | - qsl | depends | * + FABRIC_LOADERS: | + fabric + quilt + FORGE_LOADERS: | + forge + neoforge RETRY_ATTEMPTS: 3 RELAY_DELAY: 10000 VERSION_RESOLVER: latest @@ -105,7 +109,7 @@ jobs: files-primary: fabric/build/libs/friendsandfoes-fabric-${{ github.ref_name }}.jar version-type: ${{ env.VERSION_TYPE }} - loaders: fabric + loaders: ${{ env.FABRIC_LOADERS }} game-versions: ${{ env.GAME_VERSIONS }} name: Friends&Foes ${{ github.ref_name }} (Fabric) dependencies: ${{ env.FABRIC_DEPENDENCIES }} @@ -137,7 +141,7 @@ jobs: files-primary: fabric/build/libs/friendsandfoes-fabric-${{ github.ref_name }}.jar version-type: ${{ env.VERSION_TYPE }} - loaders: fabric + loaders: ${{ env.FABRIC_LOADERS }} game-versions: ${{ env.GAME_VERSIONS }} name: Friends&Foes ${{ github.ref_name }} (Fabric) version: fabric-${{ github.ref_name }} @@ -185,7 +189,7 @@ jobs: files-primary: forge/build/libs/friendsandfoes-forge-${{ github.ref_name }}.jar version-type: ${{ env.VERSION_TYPE }} - loaders: forge + loaders: ${{ env.FORGE_LOADERS }} game-versions: ${{ env.GAME_VERSIONS }} name: Friends&Foes ${{ github.ref_name }} (Forge) java: ${{ env.JAVA_VERSIONS }} @@ -216,7 +220,7 @@ jobs: files-primary: forge/build/libs/friendsandfoes-forge-${{ github.ref_name }}.jar version-type: ${{ env.VERSION_TYPE }} - loaders: forge + loaders: ${{ env.FORGE_LOADERS }} game-versions: ${{ env.GAME_VERSIONS }} name: Friends&Foes ${{ github.ref_name }} (Forge) version: forge-${{ github.ref_name }} @@ -242,66 +246,4 @@ jobs: uses: AButler/upload-release-assets@v2.0.2 with: files: quilt/build/libs/friendsandfoes-quilt-${{ github.ref_name }}.jar - repo-token: ${{ secrets.GITHUB_TOKEN }} - - publish-quilt-to-curseforge: - needs: build - runs-on: ubuntu-latest - name: "Publish Quilt to CurseForge" - timeout-minutes: 30 - - steps: - - name: "Download artifacts" - uses: actions/download-artifact@v3 - with: - name: "friends-and-foes" - - - name: "Publish Quilt to CurseForge" - uses: Kir-Antipov/mc-publish@v3.2 - with: - curseforge-id: 628248 - curseforge-token: ${{ secrets.CURSEFORGE_RELEASE_TOKEN }} - - files-primary: quilt/build/libs/friendsandfoes-quilt-${{ github.ref_name }}.jar - version-type: ${{ env.VERSION_TYPE }} - loaders: quilt - game-versions: ${{ env.GAME_VERSIONS }} - name: Friends&Foes ${{ github.ref_name }} (Quilt) - dependencies: ${{ env.QUILT_DEPENDENCIES }} - java: ${{ env.JAVA_VERSIONS }} - - retry-attempts: ${{ env.RETRY_ATTEMPTS }} - retry-delay: ${{ env.RETRY_DELAY }} - version-resolver: ${{ env.VERSION_RESOLVER }} - - publish-quilt-to-modrinth: - needs: build - runs-on: ubuntu-latest - name: "Publish Quilt to Modrinth" - timeout-minutes: 30 - - steps: - - name: "Download artifacts" - uses: actions/download-artifact@v3 - with: - name: "friends-and-foes" - - - name: "Publish Quilt to Modrinth" - uses: Kir-Antipov/mc-publish@v3.2 - with: - modrinth-id: NxP9xmhw - modrinth-featured: true - modrinth-unfeature-mode: version-intersection - modrinth-token: ${{ secrets.MODRINTH_RELEASE_TOKEN }} - - files-primary: quilt/build/libs/friendsandfoes-quilt-${{ github.ref_name }}.jar - version-type: ${{ env.VERSION_TYPE }} - loaders: quilt - game-versions: ${{ env.GAME_VERSIONS }} - name: Friends&Foes ${{ github.ref_name }} (Quilt) - version: quilt-${{ github.ref_name }} - dependencies: ${{ env.QUILT_DEPENDENCIES }} - java: ${{ env.JAVA_VERSIONS }} - retry-attempts: ${{ env.RETRY_ATTEMPTS }} - retry-delay: ${{ env.RETRY_DELAY }} - version-resolver: ${{ env.VERSION_RESOLVER }} \ No newline at end of file + repo-token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/fabric/build.gradle b/fabric/build.gradle index 750dd2476..447bed10b 100644 --- a/fabric/build.gradle +++ b/fabric/build.gradle @@ -80,7 +80,7 @@ shadowJar { remapJar { injectAccessWidener = true - input.set shadowJar.archiveFile + inputFile.set shadowJar.archiveFile dependsOn shadowJar archiveClassifier.set(null) } diff --git a/forge/build.gradle b/forge/build.gradle index 86e448a2a..623e8027e 100644 --- a/forge/build.gradle +++ b/forge/build.gradle @@ -70,7 +70,7 @@ shadowJar { } remapJar { - input.set shadowJar.archiveFile + inputFile.set shadowJar.archiveFile dependsOn shadowJar archiveClassifier.set(null) } diff --git a/gradle.properties b/gradle.properties index bb2fe3014..adb1e21dc 100644 --- a/gradle.properties +++ b/gradle.properties @@ -20,7 +20,7 @@ minecraft_version=1.19.2 yarn_mappings=1.19.2+build.28:v2 # Architectury -enabled_platforms=fabric,forge,quilt +enabled_platforms=fabric,forge # Common cloth_config_version=8.0.75 diff --git a/quilt/build.gradle b/quilt/build.gradle index 0d0a23fbf..4bff87b7f 100644 --- a/quilt/build.gradle +++ b/quilt/build.gradle @@ -71,7 +71,7 @@ shadowJar { remapJar { injectAccessWidener = true - input.set shadowJar.archiveFile + inputFile.set shadowJar.archiveFile dependsOn shadowJar archiveClassifier.set(null) } diff --git a/settings.gradle b/settings.gradle index 8c96dc79f..197a2ae8d 100644 --- a/settings.gradle +++ b/settings.gradle @@ -10,6 +10,5 @@ pluginManagement { include("common") include("fabric") include("forge") -include("quilt") rootProject.name = "friends-and-foes" From 3d632e48adfc8e8ee05728ba57c0244fffd585ae Mon Sep 17 00:00:00 2001 From: Faboslav Date: Fri, 18 Aug 2023 15:39:59 +0200 Subject: [PATCH 26/27] disabled quilt #2 --- .github/workflows/publish.yml | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index c65dcc8bf..559b8b572 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -50,7 +50,6 @@ jobs: path: | fabric/build/libs/friendsandfoes-fabric-${{ github.ref_name }}.jar forge/build/libs/friendsandfoes-forge-${{ github.ref_name }}.jar - quilt/build/libs/friendsandfoes-quilt-${{ github.ref_name }}.jar LICENSE.txt publish-license-to-release: @@ -227,23 +226,4 @@ jobs: java: ${{ env.JAVA_VERSIONS }} retry-attempts: ${{ env.RETRY_ATTEMPTS }} retry-delay: ${{ env.RETRY_DELAY }} - version-resolver: ${{ env.VERSION_RESOLVER }} - - - publish-quilt-to-github: - needs: build - runs-on: ubuntu-latest - name: "Publish Quilt to GitHub" - timeout-minutes: 30 - - steps: - - name: "Download artifacts" - uses: actions/download-artifact@v3 - with: - name: "friends-and-foes" - - - name: "Publish Quilt to GitHub" - uses: AButler/upload-release-assets@v2.0.2 - with: - files: quilt/build/libs/friendsandfoes-quilt-${{ github.ref_name }}.jar - repo-token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + version-resolver: ${{ env.VERSION_RESOLVER }} \ No newline at end of file From 071ac74742b0c273f8f561a7eeede3e417274e25 Mon Sep 17 00:00:00 2001 From: Faboslav Date: Fri, 18 Aug 2023 15:49:07 +0200 Subject: [PATCH 27/27] disabled quilt #3 --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7c21b682a..f0719d0a6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -51,7 +51,7 @@ jobs: strategy: fail-fast: false matrix: - mod_loader: [ "fabric", "forge", "quilt" ] + mod_loader: [ "fabric", "forge" ] name: Run ${{ matrix.mod_loader }} server timeout-minutes: 30