From be80e936f4170dce805075ca8e4fddc97c30b3ba Mon Sep 17 00:00:00 2001 From: Raven Szewczyk Date: Tue, 12 Jul 2022 07:58:39 +0100 Subject: [PATCH 1/4] Fix git error in gha build --- .github/workflows/build-and-test.yml | 4 ++-- .github/workflows/release-tags.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index e2a7d91c..2194de8f 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -5,9 +5,9 @@ name: Build and test on: pull_request: - branches: [ master, main ] + branches: [ master, main, '1.7.10' ] push: - branches: [ master, main ] + branches: [ master, main, '1.7.10' ] jobs: build-and-test: diff --git a/.github/workflows/release-tags.yml b/.github/workflows/release-tags.yml index 37342cf8..10cfb654 100644 --- a/.github/workflows/release-tags.yml +++ b/.github/workflows/release-tags.yml @@ -15,7 +15,7 @@ jobs: - name: Checkout mod repo uses: actions/checkout@v2 with: - fetch-depth: 32 + fetch-depth: 0 submodules: 'recursive' - name: Set release version From 606aded05537467aab18fa4a3e53d836dabdf61e Mon Sep 17 00:00:00 2001 From: Raven Szewczyk Date: Tue, 12 Jul 2022 08:18:49 +0100 Subject: [PATCH 2/4] Upload failed build zip for inspection --- .github/workflows/build-and-test.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 2194de8f..323205de 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -44,6 +44,17 @@ jobs: name: thermos-server path: build/distributions/* + - name: Tar failed build + if: failed() + run: tar -cvf failed_build.tar ./* + + - name: Upload failed build + uses: actions/upload-artifact@v3 + if: failed() + with: + name: failed-build + path: failed_build.tar + - name: Prepare libraries for launch run: cp -av libraries/ build/distributions/libraries From ef3ef36fb0c0205aea222ef90d69120cf97ae4c7 Mon Sep 17 00:00:00 2001 From: Raven Szewczyk Date: Tue, 12 Jul 2022 08:26:51 +0100 Subject: [PATCH 3/4] Fix yaml syntax --- .github/workflows/build-and-test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 323205de..fa421e2c 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -45,12 +45,12 @@ jobs: path: build/distributions/* - name: Tar failed build - if: failed() + if: ${{ failure() }} run: tar -cvf failed_build.tar ./* - name: Upload failed build uses: actions/upload-artifact@v3 - if: failed() + if: ${{ failure() }} with: name: failed-build path: failed_build.tar From b1f96fc339ea5541fd740f814e059955aa2cdeca Mon Sep 17 00:00:00 2001 From: Raven Szewczyk Date: Tue, 12 Jul 2022 08:45:06 +0100 Subject: [PATCH 4/4] Try ubuntu's java --- .github/workflows/build-and-test.yml | 10 +++------- .github/workflows/release-tags.yml | 8 ++------ 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index fa421e2c..53719f46 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -26,17 +26,13 @@ jobs: fetch-depth: 0 - name: Set up JDK 8 - uses: actions/setup-java@v2 - with: - java-version: '8' - distribution: 'adopt' - cache: gradle + run: sudo apt-get update && sudo apt-get install openjdk-8-jdk-headless && sudo update-java-alternatives -s java-1.8.0-openjdk-amd64 - name: Grant execute permission for gradlew run: chmod +x gradlew - name: Build thermos - run: ./gradlew setupCauldron jar packageBundle --info + run: JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 ./gradlew setupCauldron jar packageBundle --info - name: Upload thermos artifacts uses: actions/upload-artifact@v3 @@ -63,7 +59,7 @@ jobs: mkdir run cd run echo "eula=true" > eula.txt - timeout 90 java -Xmx1G -server -jar ../build/distributions/Thermos-1.7.10-1614.*-server.jar 2>&1 | tee -a ../server.log || true + timeout 90 /usr/lib/jvm/java-8-openjdk-amd64/bin/java -Xmx1G -server -jar ../build/distributions/Thermos-*-server.jar 2>&1 | tee -a ../server.log || true - name: Test no errors reported during server run run: | diff --git a/.github/workflows/release-tags.yml b/.github/workflows/release-tags.yml index 10cfb654..3a8a2340 100644 --- a/.github/workflows/release-tags.yml +++ b/.github/workflows/release-tags.yml @@ -22,17 +22,13 @@ jobs: run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV - name: Set up JDK 8 - uses: actions/setup-java@v2 - with: - java-version: '8' - distribution: 'adopt' - cache: gradle + run: sudo apt-get update && sudo apt-get install openjdk-8-jdk-headless && sudo update-java-alternatives -s java-1.8.0-openjdk-amd64 - name: Grant execute permission for gradlew run: chmod +x gradlew - name: Build thermos - run: ./gradlew setupCauldron jar packageBundle --info + run: JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 ./gradlew setupCauldron jar packageBundle --info - name: Release under current tag run: gh release create "${RELEASE_VERSION}" --generate-notes ./build/distributions/*