mirror of
https://github.com/GTNewHorizons/Postea.git
synced 2026-11-19 19:59:39 +00:00
Merge pull request #24 from SinTh0r4s/ensure-decompilation-tasks-use-toolchain
ci: add step to test toolchain compatibility with newer java version > 8
This commit is contained in:
8 files changed
+77
-11
No files matched your search
@@ -0,0 +1,9 @@
|
||||
directory="run/crash-reports"
|
||||
if [ -d $directory ]; then
|
||||
echo "Crash reports detected:"
|
||||
cat $directory/*
|
||||
exit 1
|
||||
else
|
||||
echo "No crash reports detected"
|
||||
exit 0
|
||||
fi
|
||||
@@ -6,9 +6,11 @@ name: Build and test
|
||||
on:
|
||||
pull_request:
|
||||
branches: [ master, main ]
|
||||
push:
|
||||
branches: [ master, main ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
build-and-test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
@@ -30,3 +32,14 @@ jobs:
|
||||
|
||||
- name: Build the mod
|
||||
run: ./gradlew build
|
||||
|
||||
- name: Run server for 1 minute
|
||||
run: |
|
||||
mkdir run
|
||||
echo "eula=true" > run/eula.txt
|
||||
timeout 10 ./gradlew runServer || true
|
||||
|
||||
- name: Test no crashes happend
|
||||
run: |
|
||||
chmod +x .github/scripts/test-no-crash-reports.sh
|
||||
.github/scripts/test-no-crash-reports.sh
|
||||
@@ -1,5 +1,4 @@
|
||||
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
|
||||
# This workflow only meant for the source mod you shouldn't bring it into your own project
|
||||
|
||||
name: Release starter and migration packages
|
||||
|
||||
@@ -33,7 +32,7 @@ jobs:
|
||||
-x ".github/scripts/update-version.sh" \
|
||||
-x ".github/workflows/buildscript-maintenance.yml" \
|
||||
-x ".github/workflows/release-packages-latest.yml" \
|
||||
-x ".github/workflows/release-packages-tags.yml" \
|
||||
-x ".github/workflows/toolchain-compatibility.yml" \
|
||||
\
|
||||
-x "*docs/*" \
|
||||
-x "README.md" \
|
||||
@@ -54,6 +53,7 @@ jobs:
|
||||
-x ".github/workflows/buildscript-maintenance.yml" \
|
||||
-x ".github/workflows/release-packages-latest.yml" \
|
||||
-x ".github/workflows/release-packages-tags.yml" \
|
||||
-x ".github/workflows/toolchain-compatibility.yml" \
|
||||
\
|
||||
-x "*docs/*" \
|
||||
-x "*src/*" \
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
|
||||
|
||||
name: Release artifacts
|
||||
name: Release tagged build
|
||||
|
||||
on:
|
||||
push:
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
|
||||
|
||||
name: Check if toolchain is applied when using differnt java versions
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [ master, main ]
|
||||
|
||||
jobs:
|
||||
check-compatibility-with-java-11:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up JDK 11
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
java-version: '11'
|
||||
distribution: 'adopt'
|
||||
cache: gradle
|
||||
|
||||
- name: Grant execute permission for gradlew
|
||||
run: chmod +x gradlew
|
||||
|
||||
- name: Setup the workspace
|
||||
run: ./gradlew setupCIWorkspace
|
||||
|
||||
- name: Build the mod
|
||||
run: ./gradlew build
|
||||
|
||||
- name: Run server for 1 minute
|
||||
run: |
|
||||
mkdir run
|
||||
echo "eula=true" > run/eula.txt
|
||||
timeout 10 ./gradlew runServer || true
|
||||
|
||||
- name: Test no crashes happend
|
||||
run: |
|
||||
chmod +x .github/scripts/test-no-crash-reports.sh
|
||||
.github/scripts/test-no-crash-reports.sh
|
||||
@@ -38,9 +38,10 @@ We also have described guidelines for existing mod [migration](docs/migration.md
|
||||
- Boilerplate forge mod as starting point
|
||||
- Improved warnings for pitfalls
|
||||
- Git Tags integration for versioning
|
||||
- GitHub CI
|
||||
- [Jitpack](https://jitpack.io) CI
|
||||
- Releasing your artifacts on new tags pushed. Push git tag named after version (e.g. 1.0.0) which will trigger a release of artifacts with according names.
|
||||
- GitHub CI:
|
||||
- Releasing your artifacts on new tags pushed. Push git tag named after version (e.g. 1.0.0) which will trigger a release of artifacts with according names.
|
||||
- Running smoke test for server startup. On any server crash occurring workflow will fail and print the crash log.
|
||||
|
||||
### Files
|
||||
- [`build.gradle`](https://github.com/SinTh0r4s/ExampleMod1.7.10/blob/main/build.gradle): This is the core script of the build process. You should not need to tamper with it, unless you are trying to accomplish something out of the ordinary. __Do not touch this file! You will make a future update near impossible if you do so!__
|
||||
|
||||
+2
-2
@@ -36,14 +36,14 @@ buildscript {
|
||||
}
|
||||
|
||||
plugins {
|
||||
id 'idea'
|
||||
id 'scala'
|
||||
id("org.ajoberstar.grgit") version("3.1.1")
|
||||
id("com.github.johnrengelman.shadow") version("4.0.4")
|
||||
id("com.palantir.git-version") version("0.12.3")
|
||||
}
|
||||
|
||||
apply plugin: 'scala'
|
||||
apply plugin: 'forge'
|
||||
apply plugin: 'idea'
|
||||
|
||||
def projectJavaVersion = JavaLanguageVersion.of(8)
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ public class CommonProxy {
|
||||
// etc, and register them with the GameRegistry."
|
||||
public void preInit(FMLPreInitializationEvent event) {
|
||||
Config.syncronizeConfiguration(event.getSuggestedConfigurationFile());
|
||||
|
||||
|
||||
MyMod.info(Config.greeting);
|
||||
MyMod.info("I am " + Tags.MODNAME + " at version " + Tags.VERSION + " and group name " + Tags.GROUPNAME);
|
||||
}
|
||||
@@ -43,4 +43,4 @@ public class CommonProxy {
|
||||
public void serverStopped(FMLServerStoppedEvent event) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user