66 workflow_dispatch :
77 inputs :
88 paper_version :
9- description : " Stable Paper runtime under test"
9+ description : " Paper runtime under test (26.2 currently uses the BETA channel) "
1010 required : true
1111 default : " 26.1.2"
1212 type : choice
@@ -111,20 +111,32 @@ jobs:
111111 - name : Build and test the production plugin
112112 run : ./gradlew clean check shadowJar --no-daemon --no-build-cache --rerun-tasks
113113
114- - name : Download selected stable Paper runtime
114+ - name : Download selected Paper runtime
115115 env :
116116 PAPER_USER_AGENT : InteractionVisualizer-Phase2/1.0 (https://github.com/EllanServer/InteractionVisualizer)
117117 PAPER_VERSION : ${{ env.CAMPAIGN_PAPER_VERSION }}
118118 run : |
119119 mkdir -p phase2-dependencies
120+ case "$PAPER_VERSION" in
121+ 26.1.2) PAPER_CHANNEL=STABLE ;;
122+ 26.2) PAPER_CHANNEL=BETA ;;
123+ *) echo "Unsupported Paper version: $PAPER_VERSION" >&2; exit 64 ;;
124+ esac
120125 BUILDS=$(curl --fail --silent --show-error \
121126 -H "User-Agent: $PAPER_USER_AGENT" \
122127 "https://fill.papermc.io/v3/projects/paper/versions/$PAPER_VERSION/builds")
123- PAPER_URL=$(echo "$BUILDS" | jq -r 'first(.[] | select(.channel == "STABLE") | .downloads."server:default".url) // empty')
124- test -n "$PAPER_URL"
128+ PAPER_RECORD=$(echo "$BUILDS" | jq -c --arg channel "$PAPER_CHANNEL" \
129+ 'first(.[] | select(.channel == $channel)) // empty')
130+ test -n "$PAPER_RECORD"
131+ PAPER_URL=$(echo "$PAPER_RECORD" | jq -r '.downloads."server:default".url')
132+ PAPER_SHA256=$(echo "$PAPER_RECORD" | jq -r '.downloads."server:default".checksums.sha256')
133+ PAPER_BUILD_ID=$(echo "$PAPER_RECORD" | jq -r '.id')
125134 curl --fail --location --show-error \
126135 -H "User-Agent: $PAPER_USER_AGENT" \
127136 --output phase2-dependencies/paper.jar "$PAPER_URL"
137+ echo "$PAPER_SHA256 phase2-dependencies/paper.jar" | sha256sum --check
138+ echo "SELECTED_PAPER_CHANNEL=$PAPER_CHANNEL" >> "$GITHUB_ENV"
139+ echo "SELECTED_PAPER_BUILD_ID=$PAPER_BUILD_ID" >> "$GITHUB_ENV"
128140
129141 - name : Prepare immutable protocol client artifact
130142 run : bash tools/perf/prepare-phase2-protocol-client.sh phase2-dependencies/protocol-client
@@ -133,6 +145,8 @@ jobs:
133145 env :
134146 AB_FACTOR : ${{ env.CAMPAIGN_AB_FACTOR }}
135147 PAPER_VERSION : ${{ env.CAMPAIGN_PAPER_VERSION }}
148+ PAPER_CHANNEL : ${{ env.SELECTED_PAPER_CHANNEL }}
149+ PAPER_BUILD_ID : ${{ env.SELECTED_PAPER_BUILD_ID }}
136150 SCENARIO : ${{ env.CAMPAIGN_SCENARIO }}
137151 RUNS : ${{ env.CAMPAIGN_RUNS }}
138152 ITEMS : ${{ env.CAMPAIGN_ITEMS }}
@@ -269,6 +283,8 @@ jobs:
269283 PHASE2_PLUGIN_JAR="$PLUGIN_JAR" \
270284 PHASE2_PAPER_JAR=phase2-dependencies/paper.jar \
271285 PHASE2_PAPER_VERSION="$PAPER_VERSION" \
286+ PHASE2_PAPER_CHANNEL="$PAPER_CHANNEL" \
287+ PHASE2_PAPER_BUILD_ID="$PAPER_BUILD_ID" \
272288 PHASE2_CLIENT_ROOT=phase2-dependencies/protocol-client \
273289 PHASE2_OUTPUT_ROOT="$EVIDENCE_ROOT" \
274290 PHASE2_RUN_ID="$run_id" \
0 commit comments