Skip to content
This repository has been archived by the owner on May 12, 2024. It is now read-only.

Merge pull request #70 from RaphiMC/dependabot/gradle/bootstrap/net.l… #180

Merge pull request #70 from RaphiMC/dependabot/gradle/bootstrap/net.l…

Merge pull request #70 from RaphiMC/dependabot/gradle/bootstrap/net.l… #180

Workflow file for this run

name: build
on: [push, pull_request, workflow_dispatch]
jobs:
build:
runs-on: ubuntu-latest
if: ${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 21
check-latest: true
- name: Build with Gradle
run: ./gradlew build
- name: Upload JavaDowngrader-standalone artifacts to GitHub
uses: actions/upload-artifact@v3
with:
name: JavaDowngrader-standalone
path: standalone/build/libs/
- name: Upload JavaDowngrader-bootstrap artifacts to GitHub
uses: actions/upload-artifact@v3
with:
name: JavaDowngrader-bootstrap
path: bootstrap/build/libs/
- name: Upload JavaDowngrader-coverage-scanner artifacts to GitHub
uses: actions/upload-artifact@v3
with:
name: JavaDowngrader-coverage-scanner
path: coverage-scanner/build/libs/
test-geyser:
runs-on: ubuntu-latest
needs: build
steps:
- name: Download standalone
uses: actions/download-artifact@v3
with:
name: JavaDowngrader-standalone
- name: Download coverage scanner
uses: actions/download-artifact@v3
with:
name: JavaDowngrader-coverage-scanner
- name: Set up JDK 21
uses: actions/[email protected]
with:
java-version: 21
distribution: zulu
- name: Download Geyser
run: curl -Lo Geyser-Standalone.jar https://download.geysermc.org/v2/projects/geyser/versions/latest/builds/latest/downloads/standalone
- name: Downgrade Geyser
run: java -jar JavaDowngrader-Standalone-1.1.3-SNAPSHOT.jar -i Geyser-Standalone.jar -o Geyser-Standalone-out.jar -v 8
- name: Generate coverage report
run: java -jar coverage-scanner-1.1.3-SNAPSHOT.jar Geyser-Standalone-out.jar > coverage-geyser.txt
- name: Upload coverage report
uses: actions/[email protected]
with:
name: coverage-report
path: coverage-geyser.txt
test-paperclip:
runs-on: ubuntu-latest
needs: build
steps:
- name: Download standalone
uses: actions/download-artifact@v3
with:
name: JavaDowngrader-standalone
- name: Download coverage scanner
uses: actions/download-artifact@v3
with:
name: JavaDowngrader-coverage-scanner
- name: Set up JDK 21
uses: actions/[email protected]
with:
java-version: 21
distribution: zulu
- name: Download Paperclip
run: wget https://api.papermc.io/v2/projects/paper/versions/1.20.2/builds/240/downloads/paper-1.20.2-240.jar
- name: Downgrade Paperclip
run: java -jar JavaDowngrader-Standalone-1.1.3-SNAPSHOT.jar -i paper-1.20.2-240.jar -o paperclip-downgraded.jar -v 8
- name: Generate coverage report
run: java -jar coverage-scanner-1.1.3-SNAPSHOT.jar paperclip-downgraded.jar > coverage-paperclip.txt
- name: Upload coverage report
uses: actions/[email protected]
with:
name: coverage-report
path: coverage-paperclip.txt
test-spigot:
runs-on: ubuntu-latest
needs: build
steps:
- name: Download standalone
uses: actions/download-artifact@v3
with:
name: JavaDowngrader-standalone
- name: Download coverage scanner
uses: actions/download-artifact@v3
with:
name: JavaDowngrader-coverage-scanner
- name: Set up JDK 21
uses: actions/[email protected]
with:
java-version: 21
distribution: zulu
- name: Build Spigot
run: |
wget https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar
java -jar BuildTools.jar
7z x spigot-*.jar "META-INF/versions/spigot-*.jar"
- name: Downgrade Spigot
run: java -jar JavaDowngrader-Standalone-1.1.3-SNAPSHOT.jar -i META-INF/versions/spigot-*.jar -o spigot-downgraded.jar -v 8
- name: Generate coverage report
run: java -jar coverage-scanner-1.1.3-SNAPSHOT.jar spigot-downgraded.jar > coverage-spigot.txt
- name: Upload coverage report
uses: actions/[email protected]
with:
name: coverage-report
path: coverage-spigot.txt