Skip to content

Commit 62dbcca

Browse files
BarbatosBarbatos
authored andcommitted
ci(plugins): add Toolkit jar smoke tests to platform builds
After `./gradlew clean build` finishes, run the freshly built Toolkit.jar through a few picocli subcommands so that runtime class-loading errors in the fat jar are caught by CI rather than slipping into a release. Without this step, dependency-conflict bugs that survive `:plugins:test` can still ship in the fat jar, because: - the test classpath keeps source jars separate (classloader returns the first match), but - the fat jar merges class entries with last-write-wins, so a different copy of a duplicated class can end up in the artifact. The recent NoSuchMethodError on Options.maxBatchSize is exactly this shape of bug: tests passed, fat jar broke. The smoke test catches it. Smoke commands run on every platform build (macos / ubuntu-arm / rockylinux-x86 / debian11-x86): - `java -jar Toolkit.jar help` — exercises the top-level command tree - `java -jar Toolkit.jar db --help` — loads all db subcommands - `java -jar Toolkit.jar db archive -h` — directly exercises the leveldb Options path that previously broke - `java -jar Toolkit.jar keystore --help` — exercises the :crypto module path added by the recent keystore migration Each step adds ~10-15s; jobs run in parallel so PR critical path increases by at most ~15s.
1 parent cf6aa0e commit 62dbcca

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

.github/workflows/pr-build.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,15 @@ jobs:
5454
- name: Build
5555
run: ./gradlew clean build --no-daemon
5656

57+
- name: Toolkit jar smoke test
58+
run: |
59+
set -e
60+
JAR=plugins/build/libs/Toolkit.jar
61+
java -jar "$JAR" help
62+
java -jar "$JAR" db --help
63+
java -jar "$JAR" db archive -h
64+
java -jar "$JAR" keystore --help
65+
5766
build-ubuntu:
5867
name: Build ubuntu24 (JDK 17 / aarch64)
5968
if: ${{ github.event_name == 'pull_request' || inputs.job == 'all' || inputs.job == 'ubuntu' }}
@@ -84,6 +93,15 @@ jobs:
8493
- name: Build
8594
run: ./gradlew clean build --no-daemon
8695

96+
- name: Toolkit jar smoke test
97+
run: |
98+
set -e
99+
JAR=plugins/build/libs/Toolkit.jar
100+
java -jar "$JAR" help
101+
java -jar "$JAR" db --help
102+
java -jar "$JAR" db archive -h
103+
java -jar "$JAR" keystore --help
104+
87105
docker-build-rockylinux:
88106
name: Build rockylinux (JDK 8 / x86_64)
89107
if: ${{ github.event_name == 'pull_request' || inputs.job == 'all' || inputs.job == 'rockylinux' }}
@@ -127,6 +145,15 @@ jobs:
127145
- name: Build
128146
run: ./gradlew clean build --no-daemon
129147

148+
- name: Toolkit jar smoke test
149+
run: |
150+
set -e
151+
JAR=plugins/build/libs/Toolkit.jar
152+
java -jar "$JAR" help
153+
java -jar "$JAR" db --help
154+
java -jar "$JAR" db archive -h
155+
java -jar "$JAR" keystore --help
156+
130157
- name: Test with RocksDB engine
131158
run: ./gradlew :framework:testWithRocksDb --no-daemon
132159

@@ -172,6 +199,15 @@ jobs:
172199
- name: Build
173200
run: ./gradlew clean build --no-daemon --no-build-cache
174201

202+
- name: Toolkit jar smoke test
203+
run: |
204+
set -e
205+
JAR=plugins/build/libs/Toolkit.jar
206+
java -jar "$JAR" help
207+
java -jar "$JAR" db --help
208+
java -jar "$JAR" db archive -h
209+
java -jar "$JAR" keystore --help
210+
175211
- name: Test with RocksDB engine
176212
run: ./gradlew :framework:testWithRocksDb --no-daemon --no-build-cache
177213

0 commit comments

Comments
 (0)