Repository navigation
Bring Base Metals to Minecraft 1.20.1 #45
This file contains hidden or 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
| name: Base Metals 1.20.1 CI | |
| on: | |
| push: | |
| branches: | |
| - master-1.20.1 | |
| - 'feature/**' | |
| pull_request: | |
| branches: | |
| - master-1.20.1 | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: basemetals-1.20.1-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| name: Build, test, and audit | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 90 | |
| steps: | |
| - name: Check out source | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 | |
| - name: Install pinned Java 17 runtime and toolchain | |
| uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5 | |
| with: | |
| distribution: temurin | |
| java-version: '17.0.1+12' | |
| - name: Set up Gradle | |
| uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6 | |
| - name: Stage exact OreSpawn release dependency | |
| id: orespawn | |
| run: | | |
| mirror="$RUNNER_TEMP/orespawn-mirror" | |
| bash gradle/stage-orespawn-release.sh "$mirror" | |
| echo "repository=$mirror" >> "$GITHUB_OUTPUT" | |
| - name: Build, test, and audit first candidate | |
| run: | | |
| chmod +x ./gradlew | |
| ./gradlew clean check build javadoc verifyReleaseArtifacts writeReleaseChecksums \ | |
| -PorespawnVerificationRepository="${{ steps.orespawn.outputs.repository }}" \ | |
| --no-daemon --stacktrace | |
| first="$RUNNER_TEMP/basemetals-first" | |
| mkdir -p "$first" | |
| cp build/libs/BaseMetals-3.1.0.120011.jar "$first/" | |
| cp build/libs/BaseMetals-3.1.0.120011-sources.jar "$first/" | |
| cp build/libs/BaseMetals-3.1.0.120011-javadoc.jar "$first/" | |
| cp build/release/SHA256SUMS "$first/" | |
| - name: Rebuild and prove byte-identical archives | |
| run: | | |
| ./gradlew clean assemble verifyReleaseArtifacts writeReleaseChecksums \ | |
| -PorespawnVerificationRepository="${{ steps.orespawn.outputs.repository }}" \ | |
| --no-daemon --stacktrace | |
| cmp "$RUNNER_TEMP/basemetals-first/BaseMetals-3.1.0.120011.jar" build/libs/BaseMetals-3.1.0.120011.jar | |
| cmp "$RUNNER_TEMP/basemetals-first/BaseMetals-3.1.0.120011-sources.jar" build/libs/BaseMetals-3.1.0.120011-sources.jar | |
| cmp "$RUNNER_TEMP/basemetals-first/BaseMetals-3.1.0.120011-javadoc.jar" build/libs/BaseMetals-3.1.0.120011-javadoc.jar | |
| cmp "$RUNNER_TEMP/basemetals-first/SHA256SUMS" build/release/SHA256SUMS | |
| - name: Run all required GameTests | |
| run: >- | |
| timeout 15m ./gradlew runGameTestServer | |
| -PorespawnVerificationRepository=${{ steps.orespawn.outputs.repository }} | |
| --no-daemon --stacktrace | |
| - name: Install official Forge packaged runtimes | |
| id: forge-runtimes | |
| run: | | |
| server_runtime="$RUNNER_TEMP/forge-1.20.1-47.4.10-server" | |
| client_runtime="$RUNNER_TEMP/forge-1.20.1-47.4.10-client" | |
| installer="$RUNNER_TEMP/forge-1.20.1-47.4.10-installer.jar" | |
| mkdir -p "$server_runtime" "$client_runtime" | |
| curl --fail --location --retry 3 \ | |
| --output "$installer" \ | |
| https://maven.minecraftforge.net/net/minecraftforge/forge/1.20.1-47.4.10/forge-1.20.1-47.4.10-installer.jar | |
| echo "1912760B4CB6B803D8A826DE603C9076B1DA71EC2765E9A1F8C1CA78F65278E3 $installer" | sha256sum --check --strict | |
| ( | |
| cd "$server_runtime" | |
| java -jar "$installer" --installServer | |
| ) | |
| python3 gradle/prepare-forge-client-runtime.py \ | |
| --installer "$installer" \ | |
| --runtime "$client_runtime" \ | |
| --java "$JAVA_HOME/bin/java" | |
| echo "server_runtime=$server_runtime" >> "$GITHUB_OUTPUT" | |
| echo "client_runtime=$client_runtime" >> "$GITHUB_OUTPUT" | |
| - name: Run exact packaged dedicated-server smoke | |
| run: >- | |
| timeout 15m ./gradlew packagedServerStartupSmoke | |
| -PpackagedForgeServerRuntime=${{ steps.forge-runtimes.outputs.server_runtime }} | |
| -PorespawnVerificationRepository=${{ steps.orespawn.outputs.repository }} | |
| --no-daemon --stacktrace | |
| - name: Run exact packaged integrated-world client smoke | |
| run: >- | |
| timeout 15m xvfb-run -a ./gradlew packagedClientStartupSmoke | |
| -PpackagedForgeClientRuntime=${{ steps.forge-runtimes.outputs.client_runtime }} | |
| -PorespawnVerificationRepository=${{ steps.orespawn.outputs.repository }} | |
| --no-daemon --stacktrace | |
| - name: Run bounded development integrated-world client smoke | |
| run: >- | |
| timeout 15m xvfb-run -a ./gradlew runClient | |
| -PintegratedWorldSmoke=true | |
| -PintegratedWorldSmokeName=basemetals-ci-${{ github.run_id }} | |
| -PorespawnVerificationRepository=${{ steps.orespawn.outputs.repository }} | |
| --no-daemon --stacktrace | |
| - name: Generate and audit Eclipse production launches | |
| run: >- | |
| ./gradlew genEclipseRuns eclipse isolateEclipseProductionRuns verifyEclipseProductionClasspath | |
| -PorespawnVerificationRepository=${{ steps.orespawn.outputs.repository }} | |
| --no-daemon --stacktrace | |
| - name: Upload audited release candidate | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 | |
| with: | |
| name: BaseMetals-1.20.1-${{ github.sha }} | |
| if-no-files-found: error | |
| retention-days: 30 | |
| path: | | |
| build/libs/BaseMetals-3.1.0.120011.jar | |
| build/libs/BaseMetals-3.1.0.120011-sources.jar | |
| build/libs/BaseMetals-3.1.0.120011-javadoc.jar | |
| build/release/SHA256SUMS | |
| CHANGELOG.txt | |
| - name: Upload bounded diagnostics on failure | |
| if: failure() | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 | |
| with: | |
| name: BaseMetals-1.20.1-diagnostics-${{ github.sha }} | |
| if-no-files-found: ignore | |
| retention-days: 14 | |
| path: | | |
| build/test-results/** | |
| build/reports/** | |
| run/logs/** | |
| run/crash-reports/** | |
| run-gametest/logs/** | |
| run-gametest/crash-reports/** | |
| run-integrated-smoke/logs/** | |
| run-integrated-smoke/crash-reports/** | |
| run-data/logs/** | |
| build/problems/** | |
| build/packaged-server-run/logs/** | |
| build/packaged-server-run/crash-reports/** | |
| build/packaged-client-run/logs/** | |
| build/packaged-client-run/crash-reports/** |