Skip to content

Bring Base Metals to Minecraft 26.2 #70

Bring Base Metals to Minecraft 26.2

Bring Base Metals to Minecraft 26.2 #70

Workflow file for this run

name: Base Metals 26.2 CI
on:
push:
branches:
- master-26.2
- 'feature/**'
pull_request:
branches:
- master-26.2
permissions:
contents: read
concurrency:
group: basemetals-26.2-${{ 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 25 runtime and toolchain
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5
with:
distribution: temurin
java-version: '25.0.3+9.0.LTS'
- 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: Test saved-item component comparisons
run: |
python3 -m venv "$RUNNER_TEMP/nbt-tests"
"$RUNNER_TEMP/nbt-tests/bin/pip" install nbtlib==2.0.4 numpy==2.4.6
"$RUNNER_TEMP/nbt-tests/bin/python" -m unittest discover -s tools/validation -p 'test_*.py'
- name: Test upgrade log boundaries
run: node --test tools/validation/test_painting_registry.js tools/validation/test_runtime_log.js
- 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.1.2602001.jar "$first/"
cp build/libs/BaseMetals-3.1.1.2602001-sources.jar "$first/"
cp build/libs/BaseMetals-3.1.1.2602001-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.1.2602001.jar" build/libs/BaseMetals-3.1.1.2602001.jar
cmp "$RUNNER_TEMP/basemetals-first/BaseMetals-3.1.1.2602001-sources.jar" build/libs/BaseMetals-3.1.1.2602001-sources.jar
cmp "$RUNNER_TEMP/basemetals-first/BaseMetals-3.1.1.2602001-javadoc.jar" build/libs/BaseMetals-3.1.1.2602001-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-26.2-65.1.0-server"
client_runtime="$RUNNER_TEMP/forge-26.2-65.1.0-client"
installer="$RUNNER_TEMP/forge-26.2-65.1.0-installer.jar"
mkdir -p "$server_runtime" "$client_runtime"
curl --fail --location --retry 3 \
--output "$installer" \
https://maven.minecraftforge.net/net/minecraftforge/forge/26.2-65.1.0/forge-26.2-65.1.0-installer.jar
echo "813FBBFECC3086A492783B9F5023AE15007737B42E17AAB75F48BA77403314DF $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 --kill-after=30s 15m xvfb-run -a ./gradlew packagedClientStartupSmoke
-PvirtualDisplaySmoke=true
-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 --kill-after=30s 15m xvfb-run -a ./gradlew runClient
-PvirtualDisplaySmoke=true
-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-26.2-${{ github.sha }}
if-no-files-found: error
retention-days: 30
path: |
build/libs/BaseMetals-3.1.1.2602001.jar
build/libs/BaseMetals-3.1.1.2602001-sources.jar
build/libs/BaseMetals-3.1.1.2602001-javadoc.jar
build/release/SHA256SUMS
CHANGELOG.txt
- name: Upload bounded diagnostics on failure
if: failure()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: BaseMetals-26.2-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/**