Skip to content

Commit 3f890ec

Browse files
dfa1claude
andcommitted
fix(ci): fix bench script and exec plugin skip
Add bench script for running benchmarks locally and in CI. Skip exec:exec on non-performance modules via pluginManagement (dummy executable + skip=true); override with skip=false in performance module. Fixes dep resolution failure in clean CI cache. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent a3064bb commit 3f890ec

5 files changed

Lines changed: 14 additions & 8 deletions

File tree

.github/workflows/benchmark.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,8 @@ jobs:
3737
unzip -j flatc.zip flatc
3838
sudo install -m 755 flatc /usr/local/bin/flatc
3939
40-
- name: Build
41-
run: ./mvnw compile -pl performance -am -DskipTests -q
42-
4340
- name: Run benchmarks
44-
run: ./mvnw exec:exec -pl performance -am -DskipTests
41+
run: ./bench
4542

4643
- name: Store benchmark results
4744
uses: benchmark-action/github-action-benchmark@v1

CLAUDE.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,13 @@ Never use `mvn install` or `./mvwn install`.
4747
./mvnw verify -pl integration -am -Dit.test="RustWritesJavaReadsIntegrationTest#s3_pcoVortex_javaDecodeMatchesJni"
4848

4949
# Run all benchmarks
50-
./mvnw compile -pl performance -am -DskipTests -q && ./mvnw exec:exec -pl performance -DskipTests
50+
./bench
5151

5252
# Run specific benchmark class
53-
./mvnw compile -pl performance -am -DskipTests -q && ./mvnw exec:exec -pl performance -DskipTests -Dbenchmark=RustVsJavaReadBenchmark
53+
./bench RustVsJavaReadBenchmark
5454

5555
# Run specific benchmark method (always use ClassName.methodName filter)
56-
./mvnw compile -pl performance -am -DskipTests -q && ./mvnw exec:exec -pl performance -DskipTests -Dbenchmark=RustVsJavaReadBenchmark.javaReadVolume
56+
./bench RustVsJavaReadBenchmark.javaReadVolume
5757
```
5858

5959
### File format

bench

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
./mvnw compile -pl performance -am -DskipTests -q
4+
./mvnw exec:exec -pl performance -am -DskipTests ${1:+-Dbenchmark="$1"}

performance/pom.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,12 @@
8181
</annotationProcessorPaths>
8282
</configuration>
8383
</plugin>
84-
<!-- Run benchmarks: ./mvnw compile -pl performance -am -DskipTests -q && ./mvnw exec:exec -pl performance -DskipTests [-Dexec.args="ClassName.methodName"] -->
84+
<!-- Run benchmarks: ./mvnw compile -pl performance -am -DskipTests -q && ./mvnw exec:exec -pl performance -am -DskipTests [-Dbenchmark="ClassName.methodName"] -->
8585
<plugin>
8686
<groupId>org.codehaus.mojo</groupId>
8787
<artifactId>exec-maven-plugin</artifactId>
8888
<configuration>
89+
<skip>false</skip>
8990
<executable>java</executable>
9091
<arguments>
9192
<argument>--add-opens</argument>

pom.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,10 @@
169169
<groupId>org.codehaus.mojo</groupId>
170170
<artifactId>exec-maven-plugin</artifactId>
171171
<version>3.5.0</version>
172+
<configuration>
173+
<skip>true</skip>
174+
<executable>java</executable>
175+
</configuration>
172176
</plugin>
173177
<plugin>
174178
<groupId>org.apache.maven.plugins</groupId>

0 commit comments

Comments
 (0)