Skip to content

Commit 719c3d6

Browse files
committed
Limit shared-library CI to SimpleAPI and remove pinned downstream builds
1 parent d08f861 commit 719c3d6

1 file changed

Lines changed: 10 additions & 57 deletions

File tree

Lines changed: 10 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
name: Shared libraries and downstream compatibility
1+
name: Shared libraries
22

33
on:
44
pull_request:
55
branches: [main]
66
push:
7-
branches: [main, codex/simpleapi-shared-libraries]
7+
branches: [main]
88
workflow_dispatch:
99

1010
permissions:
@@ -27,73 +27,26 @@ jobs:
2727
java-version: '21'
2828
distribution: temurin
2929
cache: maven
30-
# Pinned compatibility fixtures, not moving branches or a release/deployment job.
31-
- uses: actions/checkout@v4
32-
with:
33-
repository: BenCodez/AdvancedCore
34-
ref: 3f66545590644d87ec45d7864d831691a07830ac
35-
path: .compat/AdvancedCore
36-
persist-credentials: false
37-
- uses: actions/checkout@v4
38-
with:
39-
repository: BenCodez/VotingPlugin
40-
ref: 350caccb12053a12bb47bbe22012b875580a77d2
41-
path: .compat/VotingPlugin
42-
persist-credentials: false
43-
- name: Isolate Maven cache
44-
shell: bash
45-
run: |
46-
set -euo pipefail
47-
repo="$RUNNER_TEMP/simpleapi-candidate-m2"
48-
mkdir -p "$repo"
49-
if [ -d "$HOME/.m2/repository" ]; then cp -a "$HOME/.m2/repository/." "$repo/"; fi
50-
echo "CANDIDATE_M2=$repo" >> "$GITHUB_ENV"
51-
- name: Build shared libraries and unchanged legacy artifact
52-
run: mvn -B -ntp -Dmaven.repo.local="$CANDIDATE_M2" clean install
30+
# Repository-local validation only; downstream plugin builds are opt-in work.
31+
# Install into the runner's local Maven cache, never a remote repository.
32+
- name: Build shared libraries and legacy artifact
33+
run: mvn -B -ntp clean install
5334
- name: Collect runtime classpaths
5435
shell: bash
5536
run: |
5637
set -euo pipefail
57-
mvn -B -ntp -nsu -Dmaven.repo.local="$CANDIDATE_M2" -pl simpleapi-core,simpleapi-configurate,simpleapi-sql -am org.apache.maven.plugins:maven-dependency-plugin:3.8.1:copy-dependencies -DincludeScope=runtime -DoutputDirectory=target/runtime-deps
58-
mvn -B -ntp -nsu -Dmaven.repo.local="$CANDIDATE_M2" -f SimpleAPI/pom.xml org.apache.maven.plugins:maven-dependency-plugin:3.8.1:build-classpath -Dmdep.outputFile=target/compatibility-classpath.txt
59-
- name: Verify actual packaged artifacts and Bukkit parity
38+
mvn -B -ntp -nsu -pl simpleapi-core,simpleapi-configurate,simpleapi-sql -am org.apache.maven.plugins:maven-dependency-plugin:3.8.1:copy-dependencies -DincludeScope=runtime -DoutputDirectory=target/runtime-deps
39+
mvn -B -ntp -nsu -f SimpleAPI/pom.xml org.apache.maven.plugins:maven-dependency-plugin:3.8.1:build-classpath -Dmdep.outputFile=target/compatibility-classpath.txt
40+
- name: Verify packaged artifacts and Bukkit parity
6041
run: python3 tools/verify-shared-artifacts.py
61-
- name: Pin candidate dependency bytes
62-
shell: bash
63-
run: |
64-
set -euo pipefail
65-
candidate="$CANDIDATE_M2/com/bencodez/simpleapi/1.0.2-SNAPSHOT/simpleapi-1.0.2-SNAPSHOT.jar"
66-
cmp SimpleAPI/target/SimpleAPI.jar "$candidate"
67-
sha256sum "$candidate" > "$RUNNER_TEMP/simpleapi-candidate.sha256"
68-
- name: Build AdvancedCore against candidate
69-
shell: bash
70-
run: |
71-
set -euo pipefail
72-
mvn -B -ntp -nsu -Dmaven.repo.local="$CANDIDATE_M2" -f .compat/AdvancedCore/AdvancedCore/pom.xml clean install
73-
sha256sum -c "$RUNNER_TEMP/simpleapi-candidate.sha256"
74-
mvn -B -ntp -nsu -Dmaven.repo.local="$CANDIDATE_M2" -f .compat/AdvancedCore/AdvancedCore/pom.xml org.apache.maven.plugins:maven-dependency-plugin:3.8.1:build-classpath -Dmdep.outputFile=target/candidate-classpath.txt
75-
grep -F "$CANDIDATE_M2/com/bencodez/simpleapi/1.0.2-SNAPSHOT/simpleapi-1.0.2-SNAPSHOT.jar" .compat/AdvancedCore/AdvancedCore/target/candidate-classpath.txt
76-
sha256sum "$CANDIDATE_M2/com/bencodez/advancedcore/3.8.2-SNAPSHOT/advancedcore-3.8.2-SNAPSHOT.jar" > "$RUNNER_TEMP/advancedcore-candidate.sha256"
77-
- name: Build VotingPlugin against candidate chain
78-
shell: bash
79-
run: |
80-
set -euo pipefail
81-
mvn -B -ntp -nsu -Dmaven.repo.local="$CANDIDATE_M2" -f .compat/VotingPlugin/VotingPlugin/pom.xml clean verify
82-
sha256sum -c "$RUNNER_TEMP/simpleapi-candidate.sha256"
83-
sha256sum -c "$RUNNER_TEMP/advancedcore-candidate.sha256"
84-
mvn -B -ntp -nsu -Dmaven.repo.local="$CANDIDATE_M2" -f .compat/VotingPlugin/VotingPlugin/pom.xml org.apache.maven.plugins:maven-dependency-plugin:3.8.1:build-classpath -Dmdep.outputFile=target/candidate-classpath.txt
85-
grep -F "$CANDIDATE_M2/com/bencodez/advancedcore/3.8.2-SNAPSHOT/advancedcore-3.8.2-SNAPSHOT.jar" .compat/VotingPlugin/VotingPlugin/target/candidate-classpath.txt
86-
- name: Preserve test reports and candidate artifacts
42+
- name: Preserve test reports and shared artifacts
8743
if: always()
8844
uses: actions/upload-artifact@v4
8945
with:
9046
name: shared-library-validation
9147
retention-days: 7
9248
if-no-files-found: warn
93-
include-hidden-files: true
9449
path: |
9550
simpleapi-*/target/*.jar
9651
simpleapi-*/target/surefire-reports/*.xml
9752
SimpleAPI/target/surefire-reports/*.xml
98-
.compat/AdvancedCore/AdvancedCore/target/surefire-reports/*.xml
99-
.compat/VotingPlugin/VotingPlugin/target/surefire-reports/*.xml

0 commit comments

Comments
 (0)