|
1 | | -name: CI |
| 1 | +name: OreSpawn 1.21.11 CI |
2 | 2 |
|
3 | | -on: [push, pull_request] |
4 | | -#on: |
5 | | -# push: |
6 | | -# branches: [ master-1.12 ] |
7 | | -# pull_request: |
8 | | -# # The branches below must be a subset of the branches above |
9 | | -# branches: [ master-1.12 ] |
10 | | -# types: [opened, synchronize, reopened] |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - master-1.21.11 |
| 7 | + - 'feature/**' |
| 8 | + pull_request: |
| 9 | + branches: |
| 10 | + - master-1.21.11 |
| 11 | + |
| 12 | +permissions: |
| 13 | + contents: read |
| 14 | + |
| 15 | +concurrency: |
| 16 | + group: orespawn-1.21.11-${{ github.workflow }}-${{ github.ref }} |
| 17 | + cancel-in-progress: true |
11 | 18 |
|
12 | 19 | jobs: |
| 20 | + cold-forge-bootstrap: |
| 21 | + name: Cold Forge bootstrap |
| 22 | + runs-on: ubuntu-latest |
| 23 | + timeout-minutes: 60 |
| 24 | + steps: |
| 25 | + - name: Check out source |
| 26 | + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 |
| 27 | + |
| 28 | + - name: Install pinned Java 25 Mavenizer runtime |
| 29 | + uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5 |
| 30 | + with: |
| 31 | + distribution: temurin |
| 32 | + java-version: '25.0.3+9.0.LTS' |
| 33 | + |
| 34 | + - name: Install pinned Java 8 launcher toolchain |
| 35 | + uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5 |
| 36 | + with: |
| 37 | + distribution: temurin |
| 38 | + java-version: '8.0.502+7' |
| 39 | + |
| 40 | + - name: Install pinned Java 21 runtime and toolchain |
| 41 | + uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5 |
| 42 | + with: |
| 43 | + distribution: temurin |
| 44 | + java-version: '21.0.7+6.0.LTS' |
| 45 | + |
| 46 | + - name: Bootstrap Forge from an empty cache |
| 47 | + shell: bash |
| 48 | + env: |
| 49 | + GRADLE_USER_HOME: ${{ runner.temp }}/orespawn-cold-gradle |
| 50 | + run: | |
| 51 | + set -euo pipefail |
| 52 | + test ! -e .gradle |
| 53 | + test ! -e "$GRADLE_USER_HOME" |
| 54 | + mkdir -p "$GRADLE_USER_HOME" |
| 55 | + chmod +x ./gradlew |
| 56 | + ./gradlew verifyMavenizerCompatibilityFixture help \ |
| 57 | + --no-daemon --no-build-cache --stacktrace --max-workers=2 \ |
| 58 | + -Dorg.gradle.java.installations.paths="$JAVA_HOME,$JAVA_HOME_8_X64,$JAVA_HOME_25_X64" \ |
| 59 | + -Dorg.gradle.java.installations.auto-detect=false \ |
| 60 | + -Dorg.gradle.java.installations.auto-download=false \ |
| 61 | + | tee "$RUNNER_TEMP/cold-forge-bootstrap.log" |
| 62 | + grep -F "OreSpawn Mavenizer compatibility runtime: Java 25.0.3" \ |
| 63 | + "$RUNNER_TEMP/cold-forge-bootstrap.log" |
| 64 | + grep -F "OreSpawn Mavenizer compatibility: applied 0 rule(s) for net.minecraftforge:forge:1.21.11-61.1.0 (explicit no-op)" \ |
| 65 | + "$RUNNER_TEMP/cold-forge-bootstrap.log" |
| 66 | + find "$GRADLE_USER_HOME" .gradle/mavenizer \ |
| 67 | + -name '*.orespawn-compatibility' -type f -print0 \ |
| 68 | + | sort -z | xargs -0 -r sha256sum > "$RUNNER_TEMP/markers-before.sha256" |
| 69 | + test -s "$RUNNER_TEMP/markers-before.sha256" |
| 70 | +
|
| 71 | + - name: Verify same-cache preparation is idempotent |
| 72 | + shell: bash |
| 73 | + env: |
| 74 | + GRADLE_USER_HOME: ${{ runner.temp }}/orespawn-cold-gradle |
| 75 | + run: | |
| 76 | + set -euo pipefail |
| 77 | + ./gradlew verifyMavenizerCompatibilityFixture help \ |
| 78 | + --no-daemon --no-build-cache --stacktrace --max-workers=2 \ |
| 79 | + -Dorg.gradle.java.installations.paths="$JAVA_HOME,$JAVA_HOME_8_X64,$JAVA_HOME_25_X64" \ |
| 80 | + -Dorg.gradle.java.installations.auto-detect=false \ |
| 81 | + -Dorg.gradle.java.installations.auto-download=false |
| 82 | + find "$GRADLE_USER_HOME" .gradle/mavenizer \ |
| 83 | + -name '*.orespawn-compatibility' -type f -print0 \ |
| 84 | + | sort -z | xargs -0 -r sha256sum > "$RUNNER_TEMP/markers-after.sha256" |
| 85 | + diff -u "$RUNNER_TEMP/markers-before.sha256" "$RUNNER_TEMP/markers-after.sha256" |
| 86 | +
|
13 | 87 | build: |
| 88 | + name: Build, test, and audit |
14 | 89 | runs-on: ubuntu-latest |
15 | | - name: Build |
| 90 | + timeout-minutes: 60 |
| 91 | + |
16 | 92 | steps: |
17 | | - - uses: actions/checkout@v2 |
18 | | - - uses: actions/setup-java@v1 |
19 | | - with: |
20 | | - java-version: 8 |
21 | | - - run: chmod a+x gradlew |
22 | | - - run: ./gradlew --version --no-daemon |
23 | | - - run: ./gradlew setupCIWorkspace -S |
24 | | - - run: ./gradlew clean build -S |
| 93 | + - name: Check out source |
| 94 | + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 |
| 95 | + |
| 96 | + - name: Install pinned Java 25 Mavenizer runtime |
| 97 | + uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5 |
| 98 | + with: |
| 99 | + distribution: temurin |
| 100 | + java-version: '25.0.3+9.0.LTS' |
| 101 | + |
| 102 | + - name: Install pinned Java 8 launcher toolchain |
| 103 | + uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5 |
| 104 | + with: |
| 105 | + distribution: temurin |
| 106 | + java-version: '8.0.502+7' |
| 107 | + |
| 108 | + - name: Install pinned Java 21 runtime and toolchain |
| 109 | + uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5 |
| 110 | + with: |
| 111 | + distribution: temurin |
| 112 | + java-version: '21.0.7+6.0.LTS' |
| 113 | + |
| 114 | + - name: Set up Gradle |
| 115 | + uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6 |
| 116 | + |
| 117 | + - name: Make the wrapper executable |
| 118 | + run: chmod +x ./gradlew |
| 119 | + |
| 120 | + - name: Build, test, and audit release artifacts |
| 121 | + run: >- |
| 122 | + ./gradlew clean check build javadoc verifyReleaseArtifacts writeReleaseChecksums |
| 123 | + verifyEclipseProductionClasspath --no-daemon --stacktrace |
| 124 | + -Dorg.gradle.java.installations.paths="$JAVA_HOME,$JAVA_HOME_8_X64,$JAVA_HOME_25_X64" |
| 125 | + -Dorg.gradle.java.installations.auto-detect=false |
| 126 | + -Dorg.gradle.java.installations.auto-download=false |
| 127 | +
|
| 128 | + - name: Upload audited release candidate |
| 129 | + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 |
| 130 | + with: |
| 131 | + name: OreSpawn-1.21.11-${{ github.sha }} |
| 132 | + if-no-files-found: error |
| 133 | + retention-days: 30 |
| 134 | + path: | |
| 135 | + build/libs/OreSpawn-4.0.16.121111.jar |
| 136 | + build/libs/OreSpawn-4.0.16.121111-sources.jar |
| 137 | + build/libs/OreSpawn-4.0.16.121111-javadoc.jar |
| 138 | + build/release/SHA256SUMS |
| 139 | + CHANGELOG.txt |
| 140 | +
|
| 141 | + - name: Upload diagnostics on failure |
| 142 | + if: failure() |
| 143 | + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 |
| 144 | + with: |
| 145 | + name: OreSpawn-1.21.11-diagnostics-${{ github.sha }} |
| 146 | + if-no-files-found: ignore |
| 147 | + retention-days: 14 |
| 148 | + path: | |
| 149 | + build/test-results/** |
| 150 | + build/reports/** |
| 151 | + build/*-run/logs/** |
| 152 | + build/surface-integration-run/**/*.properties |
| 153 | + build/problems/** |
0 commit comments