|
63 | 63 | runs-on: ubuntu-latest |
64 | 64 | timeout-minutes: 100 |
65 | 65 | env: |
| 66 | + CAMPAIGN_PAPER_VERSION: "26.1.2" |
| 67 | + CAMPAIGN_PAPER_BUILD_ID: "74" |
| 68 | + CAMPAIGN_PAPER_CHANNEL: STABLE |
66 | 69 | 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' }} |
67 | 70 | CAMPAIGN_RUNS: ${{ github.event_name == 'workflow_dispatch' && inputs.runs || contains(github.event.label.name, '-formal') && '12' || '4' }} |
68 | 71 | CAMPAIGN_ITEMS: ${{ github.event_name == 'workflow_dispatch' && inputs.items || contains(github.event.label.name, '-formal') && '4096' || '1024' }} |
@@ -114,26 +117,39 @@ jobs: |
114 | 117 | - name: Build and test the production plugin |
115 | 118 | run: ./gradlew clean check shadowJar --no-daemon --no-build-cache --rerun-tasks |
116 | 119 |
|
117 | | - - name: Download stable Paper 26.1.2 |
| 120 | + - name: Download pinned stable Paper 26.1.2 build 74 |
118 | 121 | env: |
119 | 122 | PAPER_USER_AGENT: InteractionVisualizer-Phase2/1.0 (https://github.com/EllanServer/InteractionVisualizer) |
| 123 | + PAPER_VERSION: ${{ env.CAMPAIGN_PAPER_VERSION }} |
| 124 | + PAPER_BUILD_ID: ${{ env.CAMPAIGN_PAPER_BUILD_ID }} |
| 125 | + PAPER_CHANNEL: ${{ env.CAMPAIGN_PAPER_CHANNEL }} |
120 | 126 | run: | |
121 | 127 | mkdir -p phase2-dependencies |
122 | 128 | BUILDS=$(curl --fail --silent --show-error \ |
123 | 129 | -H "User-Agent: $PAPER_USER_AGENT" \ |
124 | | - https://fill.papermc.io/v3/projects/paper/versions/26.1.2/builds) |
125 | | - PAPER_URL=$(echo "$BUILDS" | jq -r 'first(.[] | select(.channel == "STABLE") | .downloads."server:default".url) // empty') |
126 | | - test -n "$PAPER_URL" |
| 130 | + "https://fill.papermc.io/v3/projects/paper/versions/$PAPER_VERSION/builds") |
| 131 | + PAPER_RECORD=$(echo "$BUILDS" | jq -c \ |
| 132 | + --arg channel "$PAPER_CHANNEL" --argjson build_id "$PAPER_BUILD_ID" \ |
| 133 | + 'first(.[] | select(.channel == $channel and .id == $build_id)) // empty') |
| 134 | + test -n "$PAPER_RECORD" |
| 135 | + [[ "$(echo "$PAPER_RECORD" | jq -r '.id')" == "$PAPER_BUILD_ID" ]] |
| 136 | + [[ "$(echo "$PAPER_RECORD" | jq -r '.channel')" == "$PAPER_CHANNEL" ]] |
| 137 | + PAPER_URL=$(echo "$PAPER_RECORD" | jq -r '.downloads."server:default".url') |
| 138 | + PAPER_SHA256=$(echo "$PAPER_RECORD" | jq -r '.downloads."server:default".checksums.sha256') |
127 | 139 | curl --fail --location --show-error \ |
128 | 140 | -H "User-Agent: $PAPER_USER_AGENT" \ |
129 | 141 | --output phase2-dependencies/paper.jar "$PAPER_URL" |
| 142 | + echo "$PAPER_SHA256 phase2-dependencies/paper.jar" | sha256sum --check |
130 | 143 |
|
131 | 144 | - name: Prepare immutable protocol client artifact |
132 | 145 | run: bash tools/perf/prepare-phase2-protocol-client.sh phase2-dependencies/protocol-client |
133 | 146 |
|
134 | 147 | - name: Run restart-isolated packet ABBA campaign |
135 | 148 | id: packet_campaign |
136 | 149 | env: |
| 150 | + PAPER_VERSION: ${{ env.CAMPAIGN_PAPER_VERSION }} |
| 151 | + PAPER_BUILD_ID: ${{ env.CAMPAIGN_PAPER_BUILD_ID }} |
| 152 | + PAPER_CHANNEL: ${{ env.CAMPAIGN_PAPER_CHANNEL }} |
137 | 153 | SCENARIO: ${{ env.CAMPAIGN_SCENARIO }} |
138 | 154 | RUNS: ${{ env.CAMPAIGN_RUNS }} |
139 | 155 | ITEMS: ${{ env.CAMPAIGN_ITEMS }} |
@@ -189,6 +205,9 @@ jobs: |
189 | 205 |
|
190 | 206 | PHASE2_PLUGIN_JAR="$PLUGIN_JAR" \ |
191 | 207 | PHASE2_PAPER_JAR=phase2-dependencies/paper.jar \ |
| 208 | + PHASE2_PAPER_VERSION="$PAPER_VERSION" \ |
| 209 | + PHASE2_PAPER_CHANNEL="$PAPER_CHANNEL" \ |
| 210 | + PHASE2_PAPER_BUILD_ID="$PAPER_BUILD_ID" \ |
192 | 211 | PHASE2_CLIENT_ROOT=phase2-dependencies/protocol-client \ |
193 | 212 | PHASE2_OUTPUT_ROOT=phase2-results/packet \ |
194 | 213 | PHASE2_RUN_ID="$run_id" \ |
|
0 commit comments