Repository navigation
Bring baseElectric to Minecraft 1.21.1 #59
Workflow file for this run
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: CodeQL | |
| on: | |
| push: | |
| branches: [master-1.21.1, 'feature/**'] | |
| pull_request: | |
| branches: [master-1.21.1] | |
| permissions: | |
| contents: read | |
| actions: read | |
| security-events: write | |
| concurrency: | |
| group: baseelectric-1.21.1-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| analyze: | |
| name: Analyze Java | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 75 | |
| steps: | |
| - name: Check out baseElectric | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 | |
| - name: Use canonical LF dependency inputs | |
| run: git config --global core.autocrlf false | |
| - name: Verify merged and public dependency pins | |
| id: public-pins | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: bash .github/verify-published-pins.sh | |
| - name: Check out pinned OreSpawn tool source | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 | |
| with: | |
| repository: MinecraftModDevelopmentMods/OreSpawn | |
| ref: ${{ steps.public-pins.outputs.orespawn_ref }} | |
| path: .ci-dependencies/OreSpawn | |
| - name: Check out released basePower source | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 | |
| with: | |
| repository: MinecraftModDevelopmentMods/basePower | |
| ref: ${{ steps.public-pins.outputs.power_ref }} | |
| path: .ci-dependencies/basePower | |
| - name: Install Java 25 for Mavenizer | |
| uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5 | |
| with: | |
| distribution: temurin | |
| java-version: '25.0.3+9.0.LTS' | |
| - name: Install Java 8 for the launcher helper | |
| uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5 | |
| with: | |
| distribution: temurin | |
| java-version: '8.0.502+7' | |
| - name: Install Java 21 for Gradle and production | |
| uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5 | |
| with: | |
| distribution: temurin | |
| java-version: '21.0.7+6.0.LTS' | |
| - name: Use pinned build toolchains | |
| run: >- | |
| echo "MMD_GRADLE_TOOLCHAINS=-Porg.gradle.java.installations.paths=$JAVA_HOME,$JAVA_HOME_8_X64,$JAVA_HOME_25_X64 | |
| -Porg.gradle.java.installations.auto-detect=false | |
| -Porg.gradle.java.installations.auto-download=false" >> "$GITHUB_ENV" | |
| - name: Set up Gradle | |
| uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6 | |
| - name: Verify the Forge 52 build inputs | |
| shell: bash | |
| env: | |
| ORESPAWN_REF: ${{ steps.public-pins.outputs.orespawn_ref }} | |
| POWER_REF: ${{ steps.public-pins.outputs.power_ref }} | |
| run: | | |
| set -euo pipefail | |
| orespawn="$GITHUB_WORKSPACE/.ci-dependencies/OreSpawn" | |
| power="$GITHUB_WORKSPACE/.ci-dependencies/basePower" | |
| test "$(git -C "$orespawn" rev-parse HEAD)" = "$ORESPAWN_REF" | |
| test "$(git -C "$power" rev-parse HEAD)" = "$POWER_REF" | |
| mavenizer="$orespawn/ci-fixtures/tools/minecraft-mavenizer-0.5.21-orespawn-compat.jar" | |
| printf '%s %s\n' '019032A4A26ECB473D403EF017054D5892CE59A9904E8831B452287CD756397E' "$mavenizer" | sha256sum -c - | |
| echo "MAVENIZER=$mavenizer" >> "$GITHUB_ENV" | |
| - name: Initialize CodeQL | |
| uses: github/codeql-action/init@db488ddef3bf6cb639b32c2e9a7c0a7ea8271d28 # v4 | |
| with: | |
| languages: java-kotlin | |
| build-mode: manual | |
| - name: Compile production code | |
| shell: bash | |
| run: | | |
| ./gradlew $MMD_GRADLE_TOOLCHAINS classes verifyReleaseDependencies --rerun-tasks --no-build-cache --no-daemon --stacktrace \ | |
| "-Pforge52MavenizerJar=$MAVENIZER" "-PpowerAdvantageDeobfJar=$POWER_PLAYER" \ | |
| "-PbaseMetalsDeobfJar=$METALS_PLAYER" "-PoreSpawnDeobfJar=$ORESPAWN_PLAYER" | |
| - name: Analyze | |
| uses: github/codeql-action/analyze@db488ddef3bf6cb639b32c2e9a7c0a7ea8271d28 # v4 |