Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
99 changes: 99 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ jobs:
run: |
bash -n tools/perf/prepare-phase2-protocol-client.sh
bash -n tools/perf/run-phase2-runtime-once.sh
bash -n tools/perf/run-paper-compatibility-smoke.sh
bash tools/perf/run-phase2-runtime-once.sh --self-test
bash tools/perf/run-paper-compatibility-smoke.sh --self-test
node --check tools/perf/phase2-protocol-client.js

- name: Run checks and build production jar
Expand All @@ -93,3 +96,99 @@ jobs:
path: build/libs/InteractionVisualizer-*.jar
if-no-files-found: error
retention-days: 14

paper-26-2-compatibility:
name: Paper 26.2 compatibility smoke
needs: build
runs-on: ubuntu-latest
timeout-minutes: 15
env:
PAPER_VERSION: "26.2"
PAPER_BUILD_ID: "62"
PAPER_CHANNEL: BETA
PAPER_SHA256: 597cb54eef27b318dfb7daef924f9bbe2816e6b0547f0f861b15b42337b6ccd5
PAPER_USER_AGENT: InteractionVisualizer-CI/1.0 (https://github.com/EllanServer/InteractionVisualizer)

steps:
- name: Check out compatibility harness
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Set up Java 25
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: "25"

- name: Download current production jar
uses: actions/download-artifact@v4
with:
name: InteractionVisualizer-${{ github.sha }}
path: compatibility-dependencies/plugin

- name: Select production jar
shell: bash
run: |
set -euo pipefail
shopt -s nullglob
candidates=()
for candidate in compatibility-dependencies/plugin/InteractionVisualizer-*.jar; do
case "$candidate" in
*-sources.jar|*-benchmark.jar|*-runtime-compare.jar) continue ;;
esac
candidates+=("$candidate")
done
if (( ${#candidates[@]} != 1 )); then
printf 'Expected exactly one production jar, found %d\n' "${#candidates[@]}" >&2
printf '%s\n' "${candidates[@]}" >&2
exit 1
fi
echo "PAPER_COMPAT_PLUGIN_JAR=${candidates[0]}" >> "$GITHUB_ENV"

- name: Download pinned Paper 26.2 build 62
shell: bash
run: |
set -euo pipefail
mkdir -p compatibility-dependencies/paper
curl --fail --silent --show-error \
-H "User-Agent: $PAPER_USER_AGENT" \
--output compatibility-dependencies/paper/builds.json \
"https://fill.papermc.io/v3/projects/paper/versions/$PAPER_VERSION/builds"
PAPER_RECORD=$(jq -ce --argjson build_id "$PAPER_BUILD_ID" \
'first(.[] | select(.id == $build_id)) // error("pinned Paper build is missing")' \
compatibility-dependencies/paper/builds.json)
[[ "$(jq -r '.id' <<< "$PAPER_RECORD")" == "$PAPER_BUILD_ID" ]]
[[ "$(jq -r '.channel' <<< "$PAPER_RECORD")" == "$PAPER_CHANNEL" ]]
[[ "$(jq -r '.downloads."server:default".checksums.sha256' <<< "$PAPER_RECORD")" == "$PAPER_SHA256" ]]
[[ "$(jq -r '.downloads."server:default".name' <<< "$PAPER_RECORD")" == "paper-$PAPER_VERSION-$PAPER_BUILD_ID.jar" ]]
PAPER_URL=$(jq -er '.downloads."server:default".url' <<< "$PAPER_RECORD")
PAPER_COMMIT_SHA=$(jq -er '.commits[0].sha' <<< "$PAPER_RECORD")
[[ "$PAPER_COMMIT_SHA" =~ ^[0-9a-f]{40}$ ]]
curl --fail --location --show-error \
-H "User-Agent: $PAPER_USER_AGENT" \
--output compatibility-dependencies/paper/paper.jar \
"$PAPER_URL"
echo "$PAPER_SHA256 compatibility-dependencies/paper/paper.jar" | sha256sum --check
printf '%s\n' "$PAPER_RECORD" > compatibility-dependencies/paper/build-62.json
echo "PAPER_COMPAT_PAPER_COMMIT_SHA=$PAPER_COMMIT_SHA" >> "$GITHUB_ENV"

- name: Run real Paper 26.2 compatibility smoke
shell: bash
env:
PAPER_COMPAT_PAPER_JAR: compatibility-dependencies/paper/paper.jar
PAPER_COMPAT_OUTPUT_ROOT: compatibility-results
PAPER_COMPAT_SOURCE_SHA: ${{ github.sha }}
run: bash tools/perf/run-paper-compatibility-smoke.sh

- name: Upload Paper 26.2 compatibility evidence
if: always()
uses: actions/upload-artifact@v4
with:
name: paper-26.2-build-62-compatibility-${{ github.sha }}-${{ github.run_id }}
path: |
compatibility-results/server.log
compatibility-results/compatibility-manifest.json
compatibility-dependencies/paper/build-62.json
if-no-files-found: warn
retention-days: 14
28 changes: 24 additions & 4 deletions .github/workflows/phase2-packet-capture.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 100
env:
CAMPAIGN_PAPER_VERSION: "26.1.2"
CAMPAIGN_PAPER_BUILD_ID: "74"
CAMPAIGN_PAPER_CHANNEL: STABLE
CAMPAIGN_SCENARIO: ${{ github.event_name == 'workflow_dispatch' && inputs.scenario || contains(github.event.label.name, 'visibility-itemdisplay') && 'visibility-itemdisplay-return' || contains(github.event.label.name, 'visibility-textdisplay') && 'visibility-textdisplay-return' || contains(github.event.label.name, 'visibility') && 'visibility-return' || 'static-spawn' }}
CAMPAIGN_RUNS: ${{ github.event_name == 'workflow_dispatch' && inputs.runs || contains(github.event.label.name, '-formal') && '12' || '4' }}
CAMPAIGN_ITEMS: ${{ github.event_name == 'workflow_dispatch' && inputs.items || contains(github.event.label.name, '-formal') && '4096' || '1024' }}
Expand Down Expand Up @@ -104,6 +107,7 @@ jobs:
run: |
bash -n tools/perf/prepare-phase2-protocol-client.sh
bash -n tools/perf/run-phase2-runtime-once.sh
bash tools/perf/run-phase2-runtime-once.sh --self-test
node --check tools/perf/phase2-protocol-client.js
node --check tools/perf/analyze-phase2-protocol-trace.js
node tools/perf/analyze-phase2-protocol-trace.js --self-test
Expand All @@ -113,26 +117,39 @@ jobs:
- name: Build and test the production plugin
run: ./gradlew clean check shadowJar --no-daemon --no-build-cache --rerun-tasks

- name: Download stable Paper 26.1.2
- name: Download pinned stable Paper 26.1.2 build 74
env:
PAPER_USER_AGENT: InteractionVisualizer-Phase2/1.0 (https://github.com/EllanServer/InteractionVisualizer)
PAPER_VERSION: ${{ env.CAMPAIGN_PAPER_VERSION }}
PAPER_BUILD_ID: ${{ env.CAMPAIGN_PAPER_BUILD_ID }}
PAPER_CHANNEL: ${{ env.CAMPAIGN_PAPER_CHANNEL }}
run: |
mkdir -p phase2-dependencies
BUILDS=$(curl --fail --silent --show-error \
-H "User-Agent: $PAPER_USER_AGENT" \
https://fill.papermc.io/v3/projects/paper/versions/26.1.2/builds)
PAPER_URL=$(echo "$BUILDS" | jq -r 'first(.[] | select(.channel == "STABLE") | .downloads."server:default".url) // empty')
test -n "$PAPER_URL"
"https://fill.papermc.io/v3/projects/paper/versions/$PAPER_VERSION/builds")
PAPER_RECORD=$(echo "$BUILDS" | jq -c \
--arg channel "$PAPER_CHANNEL" --argjson build_id "$PAPER_BUILD_ID" \
'first(.[] | select(.channel == $channel and .id == $build_id)) // empty')
test -n "$PAPER_RECORD"
[[ "$(echo "$PAPER_RECORD" | jq -r '.id')" == "$PAPER_BUILD_ID" ]]
[[ "$(echo "$PAPER_RECORD" | jq -r '.channel')" == "$PAPER_CHANNEL" ]]
PAPER_URL=$(echo "$PAPER_RECORD" | jq -r '.downloads."server:default".url')
PAPER_SHA256=$(echo "$PAPER_RECORD" | jq -r '.downloads."server:default".checksums.sha256')
curl --fail --location --show-error \
-H "User-Agent: $PAPER_USER_AGENT" \
--output phase2-dependencies/paper.jar "$PAPER_URL"
echo "$PAPER_SHA256 phase2-dependencies/paper.jar" | sha256sum --check

- name: Prepare immutable protocol client artifact
run: bash tools/perf/prepare-phase2-protocol-client.sh phase2-dependencies/protocol-client

- name: Run restart-isolated packet ABBA campaign
id: packet_campaign
env:
PAPER_VERSION: ${{ env.CAMPAIGN_PAPER_VERSION }}
PAPER_BUILD_ID: ${{ env.CAMPAIGN_PAPER_BUILD_ID }}
PAPER_CHANNEL: ${{ env.CAMPAIGN_PAPER_CHANNEL }}
SCENARIO: ${{ env.CAMPAIGN_SCENARIO }}
RUNS: ${{ env.CAMPAIGN_RUNS }}
ITEMS: ${{ env.CAMPAIGN_ITEMS }}
Expand Down Expand Up @@ -188,6 +205,9 @@ jobs:

PHASE2_PLUGIN_JAR="$PLUGIN_JAR" \
PHASE2_PAPER_JAR=phase2-dependencies/paper.jar \
PHASE2_PAPER_VERSION="$PAPER_VERSION" \
PHASE2_PAPER_CHANNEL="$PAPER_CHANNEL" \
PHASE2_PAPER_BUILD_ID="$PAPER_BUILD_ID" \
PHASE2_CLIENT_ROOT=phase2-dependencies/protocol-client \
PHASE2_OUTPUT_ROOT=phase2-results/packet \
PHASE2_RUN_ID="$run_id" \
Expand Down
Loading
Loading