Skip to content
This repository has been archived by the owner on May 25, 2024. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'origin/master' into largefusion
Browse files Browse the repository at this point in the history
# Conflicts:
#	dependencies.gradle
#	src/main/java/goodgenerator/blocks/tileEntity/LargeEssentiaGenerator.java
#	src/main/java/goodgenerator/blocks/tileEntity/LargeFusionComputer.java
#	src/main/java/goodgenerator/blocks/tileEntity/UniversalChemicalFuelEngine.java
  • Loading branch information
GlodBlock committed Feb 16, 2022
2 parents e199b68 + 9e3ad3d commit 62dd3cd
Show file tree
Hide file tree
Showing 15 changed files with 377 additions and 215 deletions.
19 changes: 19 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# This is the universal Text Editor Configuration
# for all GTNewHorizons projects
# See: https://editorconfig.org/

root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[*.{bat,ini}]
end_of_line = crlf

[*.{dtd,json,info,mcmeta,md,sh,svg,xml,xsd,xsl,yaml,yml}]
indent_size = 2
27 changes: 0 additions & 27 deletions .github/scripts/test-no-error-reports.sh

This file was deleted.

51 changes: 51 additions & 0 deletions .github/scripts/test_no_error_reports
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
#!/usr/bin/env bash

# bashsupport disable=BP5006 # Global environment variables
RUNDIR="run" \
CRASH="crash-reports" \
SERVERLOG="server.log"

# enable nullglob to get 0 results when no match rather than the pattern
shopt -s nullglob

# store matches in array
crash_reports=("$RUNDIR/$CRASH/crash"*.txt)

# if array not empty there are crash_reports
if [ "${#crash_reports[@]}" -gt 0 ]; then
# get the latest crash_report from array
latest_crash_report="${crash_reports[-1]}"
{
printf 'Latest crash report detected %s:\n' "${latest_crash_report##*/}"
cat "$latest_crash_report"
} >&2
exit 1
fi

if grep --quiet --fixed-strings 'Fatal errors were detected' "$SERVERLOG"; then
{
printf 'Fatal errors detected:\n'
cat server.log
} >&2
exit 1
fi

if grep --quiet --fixed-strings 'The state engine was in incorrect state ERRORED and forced into state SERVER_STOPPED' \
"$SERVERLOG"; then
{
printf 'Server force stopped:'
cat server.log
} >&2
exit 1
fi

if ! grep --quiet --perl-regexp --only-matching '.+Done \(.+\)\! For help, type "help" or "\?"' "$SERVERLOG"; then
{
printf 'Server did not finish startup:'
cat server.log
} >&2
exit 1
fi

printf 'No crash reports detected'
exit 0
18 changes: 9 additions & 9 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,32 +14,32 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
with:
fetch-depth: 0

- name: Set up JDK 8
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'adopt'
cache: gradle

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Setup the workspace
run: ./gradlew setupCIWorkspace
run: ./gradlew setupDecompWorkspace

- name: Build the mod
run: ./gradlew build

- name: Run server for 1.5 minutes
- name: Run server for 4 minutes
run: |
mkdir run
echo "eula=true" > run/eula.txt
timeout 90 ./gradlew runServer | tee --append server.log || true
echo "eula=true" > run/eula.txt
timeout 240 ./gradlew runServer 2>&1 | tee -a server.log || true
- name: Test no errors reported during server run
run: |
chmod +x .github/scripts/test-no-error-reports.sh
.github/scripts/test-no-error-reports.sh
chmod +x .github/scripts/test_no_error_reports
.github/scripts/test_no_error_reports
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# GoodGenerator

add some muiltbolck generators for GTNH
Add some muiltblock generators for GTNH
Loading

0 comments on commit 62dd3cd

Please sign in to comment.